Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC status lights

Status
Not open for further replies.

richb

New Member
Hi

I would like to add an LED to TX and RX on the pic so that when data is rx/tx, this is shown on the status lights.

I've currently hooked LEDs to the pins, but unfrotunately they stay active continually.

Any ideas guys, had a look on different schematics, but not found anything yet?

Thanks
Rich
 
It's more likely that either the data is just going fast enough to give you that impression...or that your steady state, i.e no data transferring, has the same sense as you have your LEDs connected in...so if the steady state is high on both pins, arrange it so that the LED anode is to Vdd, cathode to tx/rx but if the steady state is low, then arrange the LEDs with the cathode to Vss and anode to Vdd. Obviously you require current limiting resistors on both LEDs.

A better way would be to use a tricolour LED and a couple of other port pins if you have them spare. Set each one on whenever there was data in either the receive buffer or transmit buffer, and switch them off again when the buffers were empty...that way you will know at a glance whether data is flowing and in which direction or both directions etc by the colour of the LED...
 
ive got this working on my PIC...ive got a green and yellow LED with its CATHODE connecdted to the rx/tx pins and the other end going to limiting res and finally to +V

Whenever i recieve data, it flashes very quick, and thats with 5bytes being sent..

the pin is coming 4rm the TTL OUT of a MAX233A

Hope this helps
 
Yeah, it sounds to me like you got your polarity wrong. IIRC, TTL serial is normally high (it's been a while since I bit banged it) so in that case you need the LED between Vcc and the pins, as the other guys said.
 
Please be careful with choice of limiting resistor here... i had a low value and messuped up my whole communications, 200 ohms @ least...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top