- Why is a capacitor needed between the DTR pin of the FTDI chip and Reset? I know it’s for auto-reset, but why not just connect the DTR pin directly to RESET and toggle the DTR pin from the computer?
cksa361:
- Why is a capacitor needed between the DTR pin of the FTDI chip and Reset? I know it’s for auto-reset, but why not just connect the DTR pin directly to RESET and toggle the DTR pin from the computer?
Basically it turns the DTR# line into a one-shot reset. This behavior is rather convenient because in cases where the serial host is providing “normal” DTR behavior, this means the board will reset once as soon as the connection is open.
If you hooked up DTR# directly to reset (or through a series resistor) then when DTR is set (and DTR# goes low) the board would reset. It would then stay in this reset mode (unable to run any instructions, including the bootloader) for as long as DTR is set. So the host has to do somewhat “unnatural” DTR behavior: set the DTR state temporarily to reset the board and then clear the DTR state while communicating with the bootloader…
With the cap: if DTR# is high, the capacitor discharges. If DTR# goes low, there’s a little time delay as the capacitor charges up. Initially, when the DTR# line goes low (that is, DTR is set) the capacitor is still discharged, which means the voltage drop across it is low - so until the capacitor is charged again, bringing one side of the capacitor low will bring the other side low as well. But the capacitor quickly charges up again… So it is the action of setting DTR (moving it from the unset to set state), rather than the condition of having it set, which causes the Arduino (2009) to reset.