View previous topic :: View next topic |
Should JBM be lynched for not using a level converter? |
Yes |
|
33% |
[ 1 ] |
No |
|
66% |
[ 2 ] |
|
Total Votes : 3 |
|
Author |
Message |
JBM
Joined: 12 May 2004 Posts: 54 Location: edinburgh, Scotland
|
RS232 WITHOUT level converter |
Posted: Tue May 25, 2004 10:45 am |
|
|
Simple question (which I will no doubnt take a lot of flack for)
What RS232 interfacing circuitry can I use to receive data from my PC that does NOT use a voltage level converter like a MAX232?
I have done this many times with the PICAXE system and not had any problems. I can send data to my PC fine without a level converter - I'm just having a few 'issues' transmitting to the PIC.
Any suggestions? Ideas? |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Tue May 25, 2004 12:25 pm |
|
|
I've used a transistor to convert the level from +/- 12v to TTL. The transistor(NPN) won't conduct when the RS232 goes negative which gives you your 0v and the transistor can be tied to a 5V source (limiting the current by a resistor) you can get a nice 5v signal out. You'll need to calculate how much your base resistor should be to limit the current at 12v but this is a fairly simple way to do it. This only works with the RXD line.
Ronald |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Tue May 25, 2004 12:36 pm |
|
|
I use TTL level serial all the time, sometimes for hundreds of meters at 1200 baud in a low noise environment like a shielded cable at the bottom of the sea. If there could be a difference in ground potential or if high voltages are bundled in the same cable I tend to AC couple the serial line. Just put a cap, maybe 1uF in series and a resistor, maybe 100k from the reciever input to whichever rail gives a Stop bit.
If you have one device WITH a level converter talking to another WITHOUT a converter it gets a little harder. On the TTL to RS232 line you should AC couple as above except tie the 100K to a voltage that just barely gives a Stop bit. Probably use a resistor divider instead of a single resistor.
On the RS232 to TTL line use a series resistor and a diode clamp to prevent the RS232 voltages from damaging the TTL input. A 1K resistor and a 5V zener will clamp to +5V and -0.7V. I would add another 1K resistor from the zener to the TTL input so the TTL input diodes can clean up any overshoot. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
JBM
Joined: 12 May 2004 Posts: 54 Location: edinburgh, Scotland
|
Thanks but.... |
Posted: Tue May 25, 2004 3:36 pm |
|
|
After installing a new set of eyes, I found the problem. The RS232 pin was connected to 0V.
*slap*
Thanks for your ideas |
|
|
|