Shop OBEX P1 Docs P2 Docs Learn Events
How does a capacitor on pin 2 of an FTDI chip do the reset? — Parallax Forums

How does a capacitor on pin 2 of an FTDI chip do the reset?

Martin_HMartin_H Posts: 4,051
edited 2012-04-30 20:01 in General Discussion
I have a programming cable based on an FTDI chip that works with both the Propeller chip and an AVR with the Arduino boot loader. I never really gave this much thought because I figured this must be a standard both are following. However, last night I discovered something weird that really confused the heck out of me.

I knew that the Propeller chip was reset when the reset pin was brought low, but last night I learned that the Arduino is reset when its reset pin is brought high. So the two chips are exactly the other way around from each other, but the same signal works for both of them. How does this work?

Obviously that little capacitor is doing some black magic.

Comments

  • LeonLeon Posts: 7,620
    edited 2012-04-18 07:06
    Which FTDI chip? There are several of them.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-18 07:19
    The FTDI FT232RL chip to convert USB to TTL serial.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-18 07:24
    The series capacitor differentiates the pulse coming from the FTDI chip so the leading edge of the reset pulse produces a positive going reset pulse and the trailing edge of the reset pulse produces a negative going reset pulse. The Propeller has a pullup resistor on the reset line and protective diodes to Vdd and ground, so the negative going pulse is the one that has an effect. The Arduino has a pulldown resistor and protective diodes, so the positive going pulse is the one that has an effect.
  • LeonLeon Posts: 7,620
    edited 2012-04-18 07:26
    All AVRs have an active low reset, the same as the Propeller. Reset has a pull-up on the Uno.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-18 07:31
    Thanks Mike. I think I get the role of the capacitor.

    Leon, then what I read must be wrong, except I thought I was seeing that behavior so I must be missing something.
  • pedwardpedward Posts: 1,642
    edited 2012-04-18 09:17
    Since the reset circuit uses an NPN transistor, I took the capacitor to be a pulse decoupler. The reset will only fire on the leading edge of the DTR input from the FT232 chip, preventing the reset line from being held for a long time.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-18 09:21
    Sorry all, I was thinking of the Stamp's reset circuitry where there's not an NPN transistor involved and, as pedward mentioned, the main purpose of the capacitor is to prevent /RESET from being held low.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-18 10:09
    BTW The genesis of this question is that I'm experimenting with a wireless programmer that works with the Arduino. I'm trying to adapt it to work with the Propeller and later the Basic Stamp. Since I use the same FTDI cable with both the Propeller and my bare bones Arduino I figure this might be possible. I know about the FlashFly, but I usually learn more by trying to get something like this to work on my own.

    The wireless programmer is a 3.3 volt device and includes Tx, Rx, DTR, inverted DTR, and Arduino DTR as its outputs. The Arduino DTR is low pulses high, then goes low when DTR is asserted. On the high pulse the Arduino is reset, so that's why I assumed Arduino reset logic is reversed, but I'm thinking that perhaps in the 3.3 to 5 volt conversion shield the logic is inverted.

    I've been able to interface Tx and Rx to the Propeller and that works great. So the DTR signal is all that's left, but when I hooked up the Arduino DTR line I noticed that the Propeller was stuck in reset. That's when I realized I needed to understand the DTR and capacitor on my FTDI cable because something important was lacking in my understanding.

    Given this thread I may either stick a 0.1 uF cap between DTR and the Propeller's reset line, or stick an inverter between Arduino DTR and the Propeller. I think either may work.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-18 17:49
    Success! Thanks for all your help.
  • john_sjohn_s Posts: 369
    edited 2012-04-30 18:49
    Martin_H wrote: »
    Success! Thanks for all your help.

    So which one did work for you - a 0.1 uF cap between DTR and the Propeller's reset line, or an inverter between Arduino DTR and the Propeller ?
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-30 18:59
    A 0.1 uf capacitor between the Wixels Arduino_dtr pin and the Propeller's reset pin. This thread was just to understand the role of the capacitor. I put the details of the implementation over in the Propeller forum

    http://forums.parallax.com/showthread.php?139534-Wireless-Programming-of-a-Propeller-chip-(video)
  • john_sjohn_s Posts: 369
    edited 2012-04-30 20:01
    Thank you Martin - I keep a certain 'interest' in ftdi quirks :-)
Sign In or Register to comment.