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 CCS Technical Support

OT: LED connected to UART pins

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







OT: LED connected to UART pins
PostPosted: Fri Nov 11, 2005 9:08 am     Reply with quote

Hi!

Sorry for this off-topic one, but I'm not sure where else to ask...

If I want two LEDs connected to the UART RX/TX pins for indication of trafic. Is it OK to connect with a resistor to the TTL line (before a 485 chip) or do I need a buffer like AC05 or simular? Runing at 3.3 volt if it makes any difference...

GreatfullApreciating any help.

/Jonte
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Fri Nov 11, 2005 9:21 am     Reply with quote

I have seen similiar applications where there are LEDs to indicate two motor encoder lines.

They definitely do not run it right through an LED as this would cause a significant voltage drop that the microcontroller might mis-interpret the logic levels.

So i think the answer to your question is: Don't distort the logic levels by running it thru an LED.

I don't know what buffer to use though.
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Nov 11, 2005 10:22 am     Reply with quote

Quote:
If I want two LEDs connected to the UART RX/TX pins for indication of trafic. Is it OK to connect with a resistor to the TTL line (before a 485 chip) or do I need a buffer like AC05 or simular? Runing at 3.3 volt if it makes any difference...


Yes you can connect the LEDs directly to the TTL lines but keep the current consumption low (<5mA). This means your series resistor should be >= 300R
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Nov 11, 2005 11:41 am     Reply with quote

Quote:

but keep the current consumption low (<5mA). This means your series resistor should be >= 300R


3.3v / 300 ohms = 11 ma
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Nov 11, 2005 12:00 pm     Reply with quote

(3.3V - Vled) / 300 <= 7mA
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Nov 11, 2005 1:03 pm     Reply with quote

You're right.
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

RE
PostPosted: Mon Nov 14, 2005 12:44 am     Reply with quote

Hi,

I have done something similar, but I used a 74123 for this purpose. With this IC you can actually see the LEDs flashing, this is otherwise not possible by just simply connecting the LED to the pins.

thanks
arunb
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