Hi All,
I have recently build a custom circuit based around the ATMEGA328P, and have tried to flash the chip with the Arduino bootloader.
This did not work to start with, and the reason seemed to be that I had put a 0.1uF capacitor between the reset pin on my breakout board, and the reset pin on the uC.
I was advised to do this, as I was told that it would help with using the reset functionality on external USB-232 converters. But this capacitor seemed to stop the the ISP from working. When I put the reset cable of the ISP directly against the reset pin on the uC instead of routing it through the capacitor, everything works perfectly.
I had a look at the schematic for the Arduino Uno, and I see that there is a capacitor between the reset pin of the uC and the DTR pin of the 232 chip, but the connection to the ICSP reset pin is direct.
Can someone please explain to me the difference between how the 232 chip resets the uC and how an external ICSP resets it, and why the capacitor stops the ICSP from successfully resetting.
If anyone can help me improve my understanding, that would be greatly appreciated.
Regards,
-Steve
An ISP programmer needs direct access to the reset pin to program the chip.
An FTDI adapter needs access to a DTR pin. The capacitor you have connected to the reset pin of the MCU provides a DTR pin for your custom board. This is the way a Pro Mini is arranged. If you have a look at the Pro Mini schematic you can see how the DTR pin is simply a capacitor that goes to the reset pin of the MCU. On some Pro Mini boards the DTR pin is labeled GRN (green) because some FTDI adapters have a green DTR wire.
The DTR signal from the FTDI adapter goes from high to low and stays low during the entire serial connection. The capacitor turns that signal into a momentary pulse low, to reset the MCU and make the bootloader run.
Thanks.
If the FTDI chip pulls the the line from high to low and stays that way, then am I right in thinking that the capacitor changes this constant LOW signal into a LOW pulde, which allows the Arduino to turn back on, and activate the bootloader?
If that is the case, why does the capacitor stop the ISP from resetting the ATMEGA? What is the signal that the ICSP outputs to the reset pin, and why does the capacitor cause problems with it?
Thanks
When uploading using the bootloader, all you need to do is reset the chip, so you only need a momentary pulse on the RESET signal, which will start the bootloader.
When using ISP programming, the RESET signal has to stay low (keeping the chip in reset state) during the entire programming process, so a momentary pulse through a cap is insufficient. You can think of ISP programming as occurring because the chip receives SPI commands WHILE BEING HELD IN RESET.