ATMega reset circuit explanation

Thread Starter

ilium007

Joined Aug 24, 2013
139
I am building a standalone ATMega 2560 based board and I'm trying to understand the DTR / push button reset circuit.

I have copied (I believe accurately) the Arduino Mega reset circuit from the official open source schematics from the Arduino website as shown below:

1577542084478.png

The push button part of the circuit are self explanatory, RESET held high by the weak 10k pullup at R1 and pulled low when SW1 is pressed however I'm not 100% certain what C8 is doing. C8 would have charge across it after it is charged via R1. Is it just there to ensure RESET definitely goes low and remains low until charged again via R1?

The DTR side of things... again RESET is held high via R1. When DTR is pulled and held low it remains low until C8 charges again via R1. I am not sure why R2 (a fairly string pulldown) is in the circuit.

Thanks again.
 

DickCappels

Joined Aug 21, 2008
10,171
R1 is there to pull up the reset pin, Not sure D1 is ever needed but it would prevent the reset pin from putting the chip in the high voltage programming mode in the event that there was a transiert about (from memory) 9 volts. C8 would keep button bounce from causing multiple resets from one press of the reset button, and C9 differientates the falling edge of the DTR (Data Terminal Ready) signal from the external UART so that there is only one short restu pulse.
 

Thread Starter

ilium007

Joined Aug 24, 2013
139
R1 is there to pull up the reset pin, Not sure D1 is ever needed but it would prevent the reset pin from putting the chip in the high voltage programming mode in the event that there was a transiert about (from memory) 9 volts. C8 would keep button bounce from causing multiple resets from one press of the reset button, and C9 differientates the falling edge of the DTR (Data Terminal Ready) signal from the external UART so that there is only one short restu pulse.
Excellent, thanks for the explanation.
 

Thread Starter

ilium007

Joined Aug 24, 2013
139
R1 is there to pull up the reset pin, Not sure D1 is ever needed but it would prevent the reset pin from putting the chip in the high voltage programming mode in the event that there was a transiert about (from memory) 9 volts. C8 would keep button bounce from causing multiple resets from one press of the reset button, and C9 differientates the falling edge of the DTR (Data Terminal Ready) signal from the external UART so that there is only one short restu pulse.
I’m still confused as to what R2 is doing pulling down DTR? R2 will allow C8 to discharge faster than R1 can charge it.
 

MrChips

Joined Oct 2, 2009
30,805
Here is my take on this.

C8 at 22pF is too small to eliminate switch bounce.

D1 serves two purposes.
Firstly, it protects the /RESET pin from overvoltage on the /RESET signal. This can happen on the rising edge of DTR. When DTR goes from low to high it will push the /RESET voltage upwards to Vcc + DTR voltage. The diode limits the voltage to one diode drop above Vcc.
Secondly, on power down, it allows C9 to discharge faster. Without D1, the MCU will fail to reset properly on a quick power-off power-on sequence.

The only purpose I can see for R2 is to provide a discharge path for C9 so that on power up C9 is discharged and provides a POWER-ON RESET function while C9 has not yet charged through R1.
 

MrChips

Joined Oct 2, 2009
30,805
The time constant of 10kΩ/22pF is 220ns. The only thing the capacitor will do is attenuate RF interference.
A more practical value would be 100nF.
/RESET needs to be held low longer than 2.5μs.
 
Top