Autoreset Circuit on Uno

retrolefty:

doov:
Hi There,

I'm mildly confused as to how the autoreset circuit works on the arduino uno. I assume DTR goes low when the serial transmission from the PC begins. That discharges the 100 nF cap which pulls the reset line low. With a time constant determined by the 10k pullup to 5V and the 100 nF cap the cap will recharge and the reset line will be high. I assume that the bootloader takes over right after the reset line goes high at which point it slurps up whatever it gets over the serial line as program code and then resets the processors instruction pointer. Is that correct? Is there any indication when programming is complete? How long is DTR pulled low for (I don't have a scope :(). Thanks!

D

Yes that is basically how it works. The IDE (via AVRDUDE) just pulses the DTR signal on then off to cause the AVR to reset (it also pulses the RTS signal which older boards used instead of DTR) which starts the bootloader code that then communicates to the IDE via AVRDUDE to actually then start the upload data transactions, which when completed the bootloader jumps to the sketches start in flash memory. If the bootloader gets no proper response from AVRDUDE after a specific time out period and if there is already an existing sketch loaded some prior time then the bootload jumps to the program.

Can you program other pre-upload conditions into AVRDUDE? I'm wondering if it could send a specific text sequence that a bluetooth serial connected arduino could interpret to self reset prior to being programmed over BT connection?