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.
-
\$\begingroup\$ As long as you can control the reset, it should. The MCP2221 is a "standard" USB to TTL UART adapter. \$\endgroup\$Passerby– Passerby2016年07月23日 20:48:53 +00:00Commented Jul 23, 2016 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– Goodwin2016年07月23日 21:16:25 +00:00Commented Jul 23, 2016 at 21:16
1 Answer 1
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.
-
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– Chris Stratton2016年07月24日 03:55:59 +00:00Commented Jul 24, 2016 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\$user39382– user393822016年07月24日 06:19:10 +00:00Commented Jul 24, 2016 at 6:19
-
\$\begingroup\$ Worth noting that the MCP2200 does not have a DTR pin. So I still can't use it to program an ESP32 which needs both serial output control lines RTS and DTR. The FT232R is still the only chip that ever supports these two pins. \$\endgroup\$ygoe– ygoe2022年10月11日 18:33:02 +00:00Commented Oct 11, 2022 at 18:33
Explore related questions
See similar questions with these tags.