3
\$\begingroup\$

Hello i have a cheap ftdi that i am going to recreate on a pcb so i can flash my ATmega2560 chip onboard, the ftdi has a DTR line which is pulled low when the sequence starts but it stays low instead of going low then high after 1ms to 50ms, so i need to find out how i could create a simple circuit which when is pulled low then goes high, how can i do this, i have some simple components to hand.

my stocked parts:

103 ceramic caps

25uF aluminium caps

220uF aluminium caps

some blue ceramic caps labeled "10"

practically all common resistors values

5v zener diodes

5v switching diodes

npn transistors

n channel mosfets

5v reflecting diodes

can i make something using those ? Else I can get what's needed.

Many thank from Edwin


Sorry it's an atmel atMega 2560 chip on a pcb i have the serial lines and reset,5v,ground and two gpios on a pin out. So I can only flash with a ftdi. And my ftdi DTR line stay low and i need to just pluse the rest line so I need to figure out how to use this low signal to pull the reset low but then high right after.

IF I was to try this on my arduino Mega or Uno holding down the reset does not work it's a pulse going low then high to load the boot manager. So hence the dfti DTR staying low will not work if directly connected to RST.

\$\endgroup\$
  • \$\begingroup\$ Your title says "reset an Arduino". Arduinos have an onboard circuit that times the reset pulse, so they do not require DTR to go high after 1-50ms. DTR normally stays low during the bootloading sequence. \$\endgroup\$ – Bruce Abbott Jan 20 '18 at 15:42
  • 1
    \$\begingroup\$ You'd ideally use a "104" (0.1 uF) capacitor in series, but a "105" (1 uF) might work. The 25 uF would be getting a bit big for this job. You may need to use the trickier "manual reset" technique while waiting for parts, or perhaps you can salvage a suitable capacitor out of something broken. \$\endgroup\$ – Chris Stratton Jan 20 '18 at 17:14
  • 2
    \$\begingroup\$ I don't think you understood my answer. Even if the line (DTR/RTS) remains low during the bootloading sequence, by adding a capacitor in series with this line, the capacitor will charge up from zero to the value of Vcc and this is the behavior you will see at the reset pin. So for a moment, the reset will go low (capacitor starts to charge), but as the capacitor voltage rises up, so does the voltage at the reset pin. This is essentially a reset pulse. \$\endgroup\$ – Big6 Jan 20 '18 at 17:51
3
\$\begingroup\$

This is the schematic of the Arduino pro mini and take a look at the reset mechanism:

enter image description here

There are two ways to reset the device: By holding down the reset push-botton/switch or by driving the line (DTR or RTS) low.

Note: Some applications for arduino use DTR, others use RTS, but both seem to work. I used RTS and had no issues.

Now, back to the reset. When the DTR/RTS is pulled low, the capacitor, \$C_2\$, starts to charge up from zero to the \$V_{cc}\$ value. This is essentially asserting a reset, because the time it takes to reach logic one (maybe 0.7*Vcc), is enough for the micro to interpret it as a logic 0 (up to 0.3*Vcc).

Also, usually the FTDI applications use pullup resistors connected to the DTR/RTS lines since these are open drain. Like this one:

enter image description here

The pullup is not mandatory in this case because the Pro Mini, has one on board on its reset pin, but it doesn't hurt either.

Like I said, DTR or RTS may work, I am speaking based on my personal experience with this but that's how I got it to work. Also, it seems like Arduino supports the use of either, just test it out and see what happens.

I found all the images on the SparkFun website. The FTDI image is for the 'FTDI cable' which uses the RTS line. The 'FTDI breakout' board, as they call it on there, uses the DTR line instead and no pullups...

Arduino Pro Mini

FTDI Cable

FTDI Breakout board

\$\endgroup\$
1
\$\begingroup\$

Thanks i have it working now.

I have the DTR pin of the ftdi going to a 103 ceramic cap then the other leg of the cap connected to the Megas reset, and too a 10k resistor which is connected to the vcc of the ftdi which is 5v. I made a nice pic below to show the connections clearly

ftdi connections

\$\endgroup\$
  • \$\begingroup\$ Glad it helped. \$\endgroup\$ – Big6 Jan 20 '18 at 23:19

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.