Stellaris Lm4F120 Launchpad 3.3V -> 5V

9-06-2013, 15:56 От: admin Посмотрели: 983
Доброго дня или вечера, есть такой вопрос. у меня есть такой девайс. Если его использовать как управляющее устройство для реле или транзисторов..  При


int ledPin = PF_4; // LED connected to digital pin 13
void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}

void loop()
{
analogWrite(ledPin, 255); // sets the LED on
analogWrite(ledPin, 0); // sets the LED off
}




Выдает 3.3 вольта... можно ли сделать чтобы 5 вольт было!?. а то 3.3 маловато... а обвязку делать лень) можно ли малой кровью)





The only tricky part would be the 5V output.  The Stellaris Launchpad does have access to a 5 volt rail from the USB connection, but the GPIO can only drive 3.3V output.  You could achieve a 5V output if you set the GPIO to open drain output, and used a pull-up resistor to tie the GPIO to 5 volts.  When you need the GPIO low, Stellaris would drive it low.  When you need it at 5V, Stellaris will set the GPIO to open drain, and the pull-up will bring the signal up to 5 volts.

Hope this helps, and have fun!

You must use some consideration in the value of such pull-up R.  Stellaris GPIO usually default into 2mA sink (pull to ground) capability.  Thus a 2K7 pull-up will be w/in the default capability of the GPIO - and realize well-shaped waveforms should "reasonable" capacitance be encountered.  (too small a pull-up may be damaging to your MCU's GPIO!)



You have a wealth of GPIO on the board suggested.  Programming effort greatly simplifies should you route your driving signal to "multiple" timer input pins - in parallel.  In this means - you create a unique interrupt handler (per timer) which can more easily manage the differing count requirements - eliminating any possible conflicts created by the necessarily more complex - single interrupt handler.  (be sure that you properly label each/every of these timer IRQs w/in your, "Start-Up" file...)



Вроде ответ но не понимаю
Раздел: Песочница или Вопрос-Ответ

Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться, либо войти на сайт под своим именем.

Обсудить на форуме


На момент добавления Stellaris Lm4F120 Launchpad 3.3V -> 5V все ссылки были рабочие.
Все публикации статей, книг и журналов, представлены на этом сайте, исключительно для ознакомления,
авторские права на эти публикации принадлежат авторам статей, книг и издательствам журналов!
Подробно тут | Жалоба
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.


Опрос

Ваши предпочтения в TRX


Одинарное преобразование
Двойное преобразование
Прямое преобразование
SDR
Другое
Мне всё равно

Популярные новости
Календарь новостей
«    Май 2024    »
ПнВтСрЧтПтСбВс
 12345
6789101112
13141516171819
20212223242526
2728293031