3
\$\begingroup\$

I am very new to the electrical design and had a very basic question. I am trying to program a Atmega328p using the MCP2221 interfacing chip. I picked this chip due to it being the only converter I can find in a dip package/ so package. Looking at my design I have connected the reset pin from the chip through a 100nF cap to the reset pin on the atmega. I got this design from the arduino uno ftdi setup. Would this work in order to program the atmega when it already has the arduino bootloader loaded on it?

Thanks.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ As long as you can control the reset, it should. The MCP2221 is a "standard" USB to TTL UART adapter. \$\endgroup\$ – Passerby Jul 23 '16 at 20:48
  • \$\begingroup\$ If I was to connect one of the GPIO of the MCP2221 to a NPN to pull the reset line low would that work? After the reset start programming. \$\endgroup\$ – Goodwin Jul 23 '16 at 21:16
1
\$\begingroup\$

Looking at my design I have connected the reset pin from the chip through a 100nF cap to the reset pin on the atmega.

This is definitely not right.

The RESET pin on the MCP2221 is an input, not an output. The only thing that connecting it this way would do is possibly reset the MCP2221 when the reset button is pressed, causing it to disconnect from your computer for a moment.

There's no great way to hook this up, as the MCP2221 does not have any secondary UART signals (e.g, RTS/CTS, DTR/DSR). You could potentially connect one of the GPIOs to the capacitor to get the desired result, but note that this will require some software changes to the programmer to support it. A better option might be to use the MCP2200, which has RTS/CTS pins that can be used as-is by the programmer.

\$\endgroup\$
  • 1
    \$\begingroup\$ ...at the cost of having to find or create a driver that treats that like one of the signals typically used for this purpose, or creating a custom tool to toggle it just before programming... \$\endgroup\$ – Chris Stratton Jul 24 '16 at 3:55
  • \$\begingroup\$ @ChrisStratton Right. But it won't work at all hooked up to the RESET pin, so it's not like that's any better. \$\endgroup\$ – duskwuff Jul 24 '16 at 6:19

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.