Friends
How can I make additional led for indicating RX TX signals without using "digitalWrite" code.
I want additional indicators to my project and I cant use digitalWrite because if I fix Led using codes, there is some time matching problem happen in my output.
So can anyone fix this?
I cant use digitalWrite because if I fix Led using codes, there is some time matching problem happen in my output.
I have no idea what this means. What problems have you had ? Please post an example schematic and/or code that illustrates the problem or explain it in much greater depth
How can I make additional led for indicating RX TX signals without using "digitalWrite" code.
You could use direct port manipulation but if the problem is that you do not know the pin number or need it to change during program execution then you might just as well use digitalWrite()
On the UNO, the RX and TX LEDs are driven by the on board 16U2 co-processor. You could modify the 16U2 USB to serial firmware on the UNO, so that it echoes the LED states to the digital I/O pins on the 16U2 ICSP header. Those could drive LEDs directly (with the proper current limiting resistors).
Keep in mind the serial data traffic is unlikely to provide adequate ‘on’ timing for a clearly visible LED activity indicator.
I’ve done this many times, with a tiny function to turn the LED on, and start a LED timer... e.g. 50mS...
The LED is turned off after the timer expires, making nice clear indications when serial traffic has been observed.
If additional traffic is seen, the timer is restarted - making for a longer ‘blink’.
if I fix Led using codes, there is some time matching problem happen in my output.
What problem? are you trying to "read" what is going on bit by bit with the LEDs?
-jim lee