RS-232 to Prop Questions
Kevin Horton
Posts: 21
I'm a Prop and electronics newbie, so don't make any assumptions about my knowledge.
I need to receive data from an RS-232 device. I don't need to transmit from the Prop to the device - this is a receive only application. Comms are at 115,200 baud. I don't know what the voltage of the RS-232 is, as the RS-232 output is a seldom used aspect of this device, and the device specs don't provide the voltage, nor do I have an oscilloscope. I suspect the voltage is between 12 and 16v. I've got 3.3v and 5v available on the board to supply devices.
What is the simplest means to interface RS-232 with the Prop? My searching so far points at the MAX232. If I use a MAX232, given that I only need to receive from a single device, do I need all the capacitors that are shown in the datasheet, or can I leave some of them off the board? I assume that if my device is on channel 1 (pins 8, 10, 11 and 13), that I don't the capacitor on channel 2 (pins 4 and 5). What about the ones on the VS+ and VS- lines (pins 2 and 6). I surmise the capacitors are used for a charge pump to create the 30V that the device is rated to supply. If I am not transmitting to an RS-232 device, do I need any capacitors at all?
Given that I am only using a tiny subset of the MAX232's capabiities, is there a smaller, cheaper device I should consider instead?
Thanks for your advice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Kevin Horton
Ottawa, Canada
I need to receive data from an RS-232 device. I don't need to transmit from the Prop to the device - this is a receive only application. Comms are at 115,200 baud. I don't know what the voltage of the RS-232 is, as the RS-232 output is a seldom used aspect of this device, and the device specs don't provide the voltage, nor do I have an oscilloscope. I suspect the voltage is between 12 and 16v. I've got 3.3v and 5v available on the board to supply devices.
What is the simplest means to interface RS-232 with the Prop? My searching so far points at the MAX232. If I use a MAX232, given that I only need to receive from a single device, do I need all the capacitors that are shown in the datasheet, or can I leave some of them off the board? I assume that if my device is on channel 1 (pins 8, 10, 11 and 13), that I don't the capacitor on channel 2 (pins 4 and 5). What about the ones on the VS+ and VS- lines (pins 2 and 6). I surmise the capacitors are used for a charge pump to create the 30V that the device is rated to supply. If I am not transmitting to an RS-232 device, do I need any capacitors at all?
Given that I am only using a tiny subset of the MAX232's capabiities, is there a smaller, cheaper device I should consider instead?
Thanks for your advice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Kevin Horton
Ottawa, Canada
Comments
As I said I have used this method and in fact many of my RS232 products implement the extra inputs this way and these inputs have been retasked as extra serial inputs without any problems. There is always the possibility that having too high a resistance can limit the speed that you can use due to the RC filter (very small C) that is formed but even 115.2K is still considered very low speeds for digital signals.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Max232 = series 1k resistor to the prop to do the 5V to 3V translation
Max3232 = no 1k needed
Peter's solution works too. I've used that a lot with Picaxe chips, though with 22k rather than 100k. Just watch which side the 10k pulldown goes and maybe post here a schematic or a photo.
If you use the two resistor solution, the polarity is inverted, but the propeller can handle that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Anyway, here is a circuit and the actual readings for that circuit. This was interfaced to a PC which actually has higher output levels than a MAX232 type chip. The Propeller's rails are at 3.3V the whole time and if you look at the RESISTIVE RS232 circuit you see the maximum current was less than 100ua. I had a batch of units that needed extra RS232 receive inputs and I only had a single DB9 RS-232 connector although all the pins were connected to the Propeller with three inputs using resistors alone (see RS232 DTE). I could not have done this with any other processor but as we know the Propeller chip is very flexible so I was able to create the extra serial inputs on what are normally handshake lines. These are and have been working perfectly in 24/7 environment (Digital Radio) without a hitch (or glitch). There are many other applications that I use this type of circuit in all without problems. The switching threshold of the Prop and of MAX style chips are very similar.
The rise and fall times to threshold were less than 250ns which means I could use a 1M resistor instead and still be good for 115.2K baud easily, how about that!
BTW, I use a MAX232 style chip in my circuit for COMPLIANCE reasons only but many of my non-commercial circuits don't even bother.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Kevin Horton
Ottawa, Canada
Thanks everyone for the advice and assistance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Kevin Horton
Ottawa, Canada