0
\$\begingroup\$

enter image description here

I want to have this "debug" header with 10 pins (I could probably get away with 9) and I am wondering if the DTR pin is ok to be filtered by a capacitor for ICSP.

This is how I am sourcing these pins: enter image description here

Note the capacitor in magenta. Will that affect the RST line for ICSP?

Why? Why not?

\$\endgroup\$
  • \$\begingroup\$ No, because when the capacitor is charged, it acts like an open circuit. \$\endgroup\$ – Ron Beyer Jan 23 at 18:19
  • 1
    \$\begingroup\$ Why do you want the capacitor as you've drawn it? What is the intent of DTR? Think about the scenario when DTR is low, the capacitor will have 3.3V across it. If DTR is driven high to 3.3V, the capacitor, for a short time, will remain to have 3.3V across it. That puts 6.6V on PC6 of the MCU. \$\endgroup\$ – BEE Jan 23 at 19:23
1
\$\begingroup\$

I am wondering if the DTR pin is ok to be filtered by a capacitor for ICSP

No. The typical "Arduino-style" practice is to capacitively couple a signal such as DTR to the ATmega reset pin, so that a toggle of that control signal will reset the processor, but for portability the processor is able to run with either setting of the signal.

In contrast, typical usage of the ISP protocol requires that the reset signal be taken low and held there for an extended period of time. That would not work with capacitive coupling.

However, you can relocate this "problem" from the board itself, to your programmer or software.

  • If you do not need broad serial software compatibility, you could directly connect the reset to a header pin, and have to have software of any computer with a serial adapter where that is connected through consistently set that signal (electrically) high to allow the MCU to actually run.

  • You could put a capacitor in your programmer cable along with a physical switch to bypass it for ISP mode

  • You could make two different cable versions with and without the capacitor and label / color code them by purpose.

  • You could use some sort of more custom USB-serial interface in your off-board programming adapter (perhaps a custom one made from an ATmega16u2 as the Uno itself uses?) with some sort of other scheme for controlling the reset that only appropriate software would know how to trigger.

It is also perhaps possible that if you review the details of ISP programming you might be able to do it in a bunch of short steps after toggling the line before the charge bled off the capacitor. This however seems like it might be more clever than smart.

Note that an FTDI USB-serial chip (especially a base model typically intended for asynchronous serial) isn't a great way to do ISP anyway - you may really want to look at a solution where you use a "programmer" (perhaps an Arduino with the ISP sketch) for ISP but a "USB-UART" for communication, or perhaps unify the two in a custom ISP sketch firmware (though avoid software serial!!)

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Great answer. Solved my problem. \$\endgroup\$ – bem22 Jan 24 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.