RTS# & CTS# pins
bryan costanich
Posts: 29
I have the UM232R from ftdi: http://www.ftdichip.com/Products/EvaluationKits/UM232R.htm and i'm interfacing it with the basic chip.
According to the datasheet (http://www.ftdichip.com/Documents/DataSheets/Modules/DS_UM232R.pdf) pins 3 and 10 go to CTS# and RTS# on the MCU respectively. the datasheet says this is for handshaking.
question: are there pins on the basic chip for this?
i was looking at the schematic for the bs2e (http://www.parallax.com/dl/docs/prod/schem/BS2pe24SchematicRevB.pdf) and while i see that pin 4 (ATN) goes to DTR on the serial port, i don't really know what this means.
anyone have an idea?
According to the datasheet (http://www.ftdichip.com/Documents/DataSheets/Modules/DS_UM232R.pdf) pins 3 and 10 go to CTS# and RTS# on the MCU respectively. the datasheet says this is for handshaking.
question: are there pins on the basic chip for this?
i was looking at the schematic for the bs2e (http://www.parallax.com/dl/docs/prod/schem/BS2pe24SchematicRevB.pdf) and while i see that pin 4 (ATN) goes to DTR on the serial port, i don't really know what this means.
anyone have an idea?
Comments
Now, most BS2 serial uses don't use RTS/CTS or "hardware handshake" (same thing). Instead, the BS2 sends data using the TX line, and just expects the 'target' to be fast enough to deal with the small amount of data the BS2 can send.
So usually you don't need to worry about the RTS/CTS lines, and in fact can use them as additional TX/RX drivers.
Oh, and the BS2 DOES implement a 'hardware handshake' on its SEROUT/SERIN, but I've found it such a pain in the butt I don't use it. But the BS2 does support it.
To answer your question about DTR, the Stamp Editor uses it to RESET the BASIC Stamp. So that line is brought HIGH briefly during Identification or Programming. For communication it is not used. It is by default another type of handshaking line called, “Data Terminal Ready”. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
for the DTR to Reset#, is that documented someplace? .e.g what are the values for the capacitor and resistor?
So, on your own circuit, if you wire DTR directly, and then try to use hyperterminal, hyperterminal holding DTR high will hold the BS2 in reset. Your program won't run.
So, to get around this, on the BOE Parallax has installed two 0.1 uF capacitors -- one in parallel, one in series -- in the DTR line. These two capacitors insure that when a 'stupid' program like Hyperterm raises DTR, the BS2 sees only a 'blip' -- enough to reset the BS2, but it won't then hold the BS2 in reset. ('Stupid' above because there's no way to turn off DTR in Hyperterm.).
For the actual schematic, you can look at the BOE schematic (I think it's in the PBasic manual).
however, if i'm only using the bs2 stamp editor to program, i can dispense with that, yes? and if i hook the DTR to the RESET# and use the usb drivers, will it send the reset command to the reset# pin?
----
In order to meet requirement (i) the USB Bus Power is used to control the RESET# Pin of the FT232R device. When the USB Host or Hub is powered up the internal 1.5kΩ resistor on USBDP is pulled up to 3.3V, thus identifying the device as a full speed device to USB. When the USB Host or Hub power is off, RESET# will go low and the device will be held in reset. As RESET# is low, the internal 1.5kΩ resistor will not be pulled up to 3.3V, so no current will be forced down USBDP via the 1.5kΩ pull-up resistor when the host or hub is powered down. To do this pin 14 (USB) is connected to PU2 and PU1 is connected to RST#. Failure to do this may cause some USB host or hub controllers to power up erratically.
----
which leads me to believe that Pin20 on the 232R is for the resetting of the 232r itself, not for the attached microcontroller. if that is the case, how is the reset sent from the 232R to the microcontroller.
i need to be able to program the stamp from this interface, so i need to know how to send the reset pulse.
so, i built that and still can't seem to get the chip to identify in the basic stamp editor. i'm going to load up eagle and put the schematic together and post it to see if anyone can see what's wrong.
-b
http://www.parallax.com/detail.asp?product_id=28850
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I've attached the schematic of how i've got mine currently setup based on the conversations that we've had. i've got pin 4 of the bs2 (ATN) connected to pin2 of the UM232R (DTR) with the capacitors as specified. Is this incorrect?
http://www.parallax.com/dl/docs/prod/boards/BoeUSBrevB.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
thanks for your help.
-b
the chip is marked on the print as a F232BM I assume yours is F232R. Looks like you have the same pins though with different pin numbers. On the Parallax print TXD TXR and DTR come off pins 25 24 21 respectively and ATN comes off the collector of Q1.
Jeff T.
gotta go to radioshack to get some pnp transistors before i can test it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Rick Brooks
I'll add the 5v amplification/deamplification circuits tot eh TXD and RXD lines today. i was under the impression that it wasn't needed for the USB module i have, but i think they just omitted it from their schematics.
Rick, why would you want to invert TXD and RXD? one device's transmit is another's reception, no?
You are correct…I forgot this version (Rev had the extra capacitor…But the transistors aren’t just drivers…They invert the signal…The Stamp Module is looking for an inverted signal so without those transistors you would have to reprogram the EEPROM on the FTDI chip to invert these lines for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
hmm...
what's the extra capacitor for?
if i program the ftdi chip to invert the lines, do i still need to build transistor circuits for the 5v amp/deamp?
by the way, thanks everyone for your help. i'm a software guy, so this has been a fun challenge for me.
i think i even understand what i've designed here. [noparse]:)[/noparse] hahahhaha.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
attached is a photo of it.
by the way, is there a repository someplace to put schematics and such related to the basic stamp someplace? this is a working BS2 to UM232R design, so if someone else is thinking of doing that, then this schematic can serve them.
-b
joining late in this discussion, - I have just read everything to get caught up.
My situation is similar to Bryan (except for the working part, of course). I am using the 232R, trying to communicate directly to a 2p40 IC (just the interpreter, not the stamp module). I can't get a response from the interpreter.
I am trying to follow a schematic from one of Chris's earlier posts (OEM BS2.zip). I can see the low pulse come in on the RESET and RX lines on the interpreter - but no action.
Any hints, suggestions.
thanks in Advance
Jamie