0
\$\begingroup\$

I have a ATMEGA328(AVR) connected to a Raspberry Pi(RPI) via serial using a level shifter.

The AVR has the Arduino Bootloader installed and I would like to program it via serial.

What would be the best way to connect the AVR reset pin to the RPI GPIO pin 4?

(Keep in mind that the AVR reset pin has a 5V pull-up resistor connected to it.)

\$\endgroup\$
  • \$\begingroup\$ No free pins on the level shifter? \$\endgroup\$ – RJR Jul 19 '15 at 9:22
  • \$\begingroup\$ @RJR - The Level shifters are a bi-directional BSS138 based setup. Would a level shifter do the job? \$\endgroup\$ – Bertus Kruger Jul 19 '15 at 10:17
  • 1
    \$\begingroup\$ Like this one? adafruit.com/products/757?PageSpeed=noscript don't see why not: "and any other digital interface both uni-directional and bidirectional" \$\endgroup\$ – RJR Jul 21 '15 at 6:00
1
\$\begingroup\$

A simple NPN transistor from the Reset pin to ground will work. Otherwise a optocoupler (essentially a transistor for your purposes) will also work. (Plus to your GPIO, with resistor. The input pullup is the internal reset pullup)

http://www.ustudy.in/sites/default/files/images/opto-mup-drain-inp-conf.GIF

\$\endgroup\$
1
\$\begingroup\$

Microchip has a great PDF with simple solutions for converting between 3.3V and 5V, see Tip#7 in http://ww1.microchip.com/downloads/en/DeviceDoc/chapter%208.pdf

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.