Go Down

Topic: adding LED's to Rx/Tx lines of 328 TFQP SMD to show uploading action (Read 1 time) previous topic - next topic

SouthernAtHeart

Using the surface mount version of the 328 chip, can you add LED's somehow to the rx/tx pins to show the upload event happening, like on the UNO? ...without interfering with the upload, of course?
thanks.

magagna

How are you uploading code from your computer to the ATMega328/?
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Coding Badly


Will the TX/RX pins be used for anything other than serial communications?

MarkT


Using the surface mount version of the 328 chip, can you add LED's somehow to the rx/tx pins to show the upload event happening, like on the UNO? ...without interfering with the upload, of course?
thanks.


The RX TX LEDs on Arduinos are signals from the USB interface chip, not the 328.  Of course the RX/TX pins on the 328 are active during uploads too - but these pins are also D0 and D1 so not hard to connect to.
[ I won't respond to messages, use the forum please ]

BillO

You could add a small MOSFET like the 2N7000 to drive the LED.  This would act as a buffer and not interfere with the use of the signals.  They run about 10 cents a piece.  See the attached.
Facts just don't care if you ignore them.

CrossRoads

I think you could just add them with a 1K resistor, only adds a few mA of load to whatever is driving the lines - like D13 did with the LED on Duemilanove's and the original Uno (on Rev 2, Rev 3 they used the LM358 op amp to drive it instead). Or use a 5K resistor for less load (~0.5mA) and just a dimmer indication.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

BillO

He most likely could if he was never going to use the pins for any other I/O than the serial with fairly low impedance drive, something like a like  FTDI or MAX232 chip.  Using the MOSFET though is a more general solution.
Facts just don't care if you ignore them.

CrossRoads

Agreed, MOSFET is more general, but in this case not needed as he is specifically looking to monitor upload activity.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

BillO

True.  I'd go with your suggestion of 5K in that case.  The newer super bright LEDs can still be very noticeable with just tiny amount of current running through them.
Facts just don't care if you ignore them.

SouthernAtHeart

My apologies for not acknowledging the responses here.  Glad for the tips shared, and think I follow both.  A 5K w/LED if I'm not using the pins for anything but serial port, and the MOSFET schematic if I use them for other I/O stuff that could be affected by the impedance.
I'm going to start adding These SMD parts to my boards.

SouthernAtHeart

I went with the 5K resistors.  Got my first board back for the fab shop with this setup, but they don't work right.  When I plug my FTDI cable into my board, the LEDs are lit up all the time.  I can see them flashing when I load a sketch.  Are the Rx/Tx lines of the FTDI cable normally high?
Here's the schematic of the LED's I added to the Rx/Tx lines.

CrossRoads

That's the way I have them on my 1284 mini breakout board, and I think they work correctly.  Will have to power one up & confirm.
http://www.crossroadsfencing.com/BobuinoRev17/schematic1.9.png
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

magagna


Are the Rx/Tx lines of the FTDI cable normally high?


You've got your implementation backwards. The FTDI design has the LED anodes (+) going to VCC and the cathodes (-) going to the IO pins on the chip.
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

CrossRoads

I think the LEDs referred to are connected to the uC Rx & x lines as added indicaters, not pins 22 & 23 of the FTDI chip.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

SouthernAtHeart


I think the LEDs referred to are connected to the uC Rx & x lines as added indicaters, not pins 22 & 23 of the FTDI chip.

Correct.
I tested this FTDI cable I use from Sparkfun, and both the Rx/Tx lines are high when I have it plugged in my USB port.
So I may need to just skip the indicator LEDs.  They were just to give a visual on loading sketches.

Go Up