BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Tue Jan 23, 2018 11:03 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: RS-232 or TTL serial - have it both
PostPosted: Thu Aug 26, 2010 7:17 pm 
Offline
Citizen

Joined: Fri Aug 20, 2010 5:34 am
Posts: 17
RS-232 or TTL serial port? Have it both ways.

While I struggle to learn simple programming and need lot of help, I rigged up Serial LCD for troubleshooting. You can get RS-232 to TTL converter on ebay for less than the cost of parts (MAX232, capacitors, DB9F connector and pin header). It is already built, ready to hook up. I used NEC PS-2501 optocouplers to tie the two sources (the TTL end of the converter and pcb screw terminals for TTL serial data) together and to the LCD using the optocoupler's open collector outputs and pullup resistor. I also added voltage regulator ORed through diode to the LCD's 5V. Now I can power the LCD with anything from 5V to 24V, I can send serial data from two sources, RS-232 source (PC,etc) and also from TTL serial source - as long as they don't talk at the same time. There wouldn't be any damage done, but your data won't display correctly, or won't get recognized by the LCD (garbled data). There is no rewiring, no plugging / unplugging. Great little helper.

If you're going to build similar gizmo, choose optocouplers with short ON/OFF delays and make sure you use proper resistors on the input side. While some micros like Microchip are capable of driving high loads, others are limited to 2-3mA (MAX232 can sink 10mA minimum). Something like 2.2k or 2.7k resistors for the input LED pullup should be safe for most chips. The chip is pulling the cathode low (sinking current). My LCD is switch configurable up to 19kbps. I use it at 9600bps. If you need faster speed, the optocouplers may be to slow. In that case you need little more advanced (probably also more expensive) setup.


Top
 Profile  
 
 Post subject: Re: RS-232 or TTL serial - have it both
PostPosted: Sat Sep 18, 2010 11:13 pm 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
Neat! :D
Since the bit time of a 19.2KBaud signal is 52uS, the NEC parts Tr of 5uS makes it plenty fast enough. You might even do 115.2KBaud with this.

Can you provide a schematic for us less imaginative types? ;)
Thanks for thr post.

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO