CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

RS232 WITHOUT level converter

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  

Should JBM be lynched for not using a level converter?
Yes
33%
 33%  [ 1 ]
No
66%
 66%  [ 2 ]
Total Votes : 3

Author Message
JBM



Joined: 12 May 2004
Posts: 54
Location: edinburgh, Scotland

View user's profile Send private message

RS232 WITHOUT level converter
PostPosted: Tue May 25, 2004 10:45 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 25, 2004 12:25 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue May 25, 2004 12:36 pm     Reply with quote

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

View user's profile Send private message

Thanks but....
PostPosted: Tue May 25, 2004 3:36 pm     Reply with quote

After installing a new set of eyes, I found the problem. The RS232 pin was connected to 0V.

*slap*

Thanks for your ideas
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group