1
\$\begingroup\$

I have an ATmega328 connected to a Raspberry Pi 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 ATmega reset pin to the Pi's GPIO pin 4?

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

\$\endgroup\$
3
  • 1
    \$\begingroup\$ No free pins on the level shifter? \$\endgroup\$
    – RJR
    Commented Jul 19, 2015 at 9:22
  • 1
    \$\begingroup\$ @RJR - The Level shifters are a bi-directional BSS138 based setup. Would a level shifter do the job? \$\endgroup\$ Commented Jul 19, 2015 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
    Commented Jul 21, 2015 at 6:00

2 Answers 2

2
\$\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)


(source: ustudy.in)

\$\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 and acknowledge you have read our privacy policy.

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