Interfacing with DTR line of a serial device
··· I'm interfacing a basic stamp with a Lacross weatherstation.· The weatherstation console·has a serial port for connection to a PC.··The protocol requires asserting the DTR line·at the beginning of communication and releasing it at the end of communication.· I know for RS232 the in and out·lines need to be passed through a RS232 level converter or use the·basic stamp dedicated serial pins.· What I don't know is if lines like DTR also need to be pased through a level converted or if they use TTL levels. Any help is appreciated.·
Comments
It's customary to pass all RS-232 propagated pins and signals through a level converter (such as a MAX-232) when any are required. This is why they make such converters with more than just two (Tx, and Rx) "channels". Thus, if you were to use (actual) handshaking, you would pass those lines through as well.
WARNING: DO NOT use pin port 16 or DEBUG for this application when connected to the unit in question. A number of unnecessary and time consuming surprises will be in store!
Bring the control line (DTR) along as noted above, through the level converter to a PBASIC Stamp pin port (other then 16), and use a HIGH command during command processing, and then de-assert it with a LOW command after command processing is finished. Insofar as you are concerned in your program, it's just another control line that needs to be manipulated.
Slightly strange business, but simple enough to accomodate
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
I've used this technique for many years with industrial truck scale systems.
Cheers