Saturday, 17 February 2018

microcontroller - 5v output to 3.3v?


I have a microcontroller and a Raspberry Pi, both running off of the same 5v supply, in parallel. The microcontroller has 4 5v output pins and the other is a Raspberry Pi, that can only accept inputs of 3.3v and less.


Obviously I cannot directly connect the outputs to the inputs - that'll fry the Raspberry Pi.


How can I connect 5v outputs to the GPIO pins on the Raspberry Pi?



Answer



Use a level translator such as the one sold by sparkfun.


Hook one VCC to 5V and the other to 3.3V on the Rasberry Pi.



No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...