Pages: [1] 2   Go Down
Author Topic: adding LED's to Rx/Tx lines of 328 TFQP SMD to show uploading action  (Read 1695 times)
0 Members and 1 Guest are viewing this topic.
South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 654
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you uploading code from your computer to the ATMega328/?
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12194
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

[ I won't respond to messages, use the forum please ]

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* MOSFET LED SWITCH.jpg (16.88 KB, 348x566 - viewed 60 times.)
Logged

Facts just don't care if you ignore them.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27114
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Facts just don't care if you ignore them.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27114
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Agreed, MOSFET is more general, but in this case not needed as he is specifically looking to monitor upload activity.
Logged

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.

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Facts just don't care if you ignore them.

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 654
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 654
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* Screen Shot 2013-07-05 at 11.29.22 PM.png (15.06 KB, 383x487 - viewed 32 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27114
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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.

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27114
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 654
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* 09717-01.jpg (96.35 KB, 600x600 - viewed 24 times.)
Logged

Pages: [1] 2   Go Up
Jump to: