Pages: [1]   Go Down
Author Topic: LED's on the ICSP pins  (Read 678 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 141
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do I give the ICSP Pins a dual use? After programming the MCU, I would like to re purpose these Pins for some SMD LED indicators. Is it just a case of finding a high enough resistor, which also allows enough current to LED's for sufficient brightness? Any recommendations?
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2512
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Assuming your using an UNO then the ICSP header pins are already shared with digital pins (11-13) and are not extra pins.
Logged

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Offline Offline
Full Member
***
Karma: 0
Posts: 141
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nope I'm using my own board design and so when using the ICSP header, these pins need to have low impedance load other wise the programmer will fail. I'm after some advice as to what constitutes a low impedance load in this case.
Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use the same method as with the led on pin 13 on official boards. Put an opamp between the output and the LED.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 141
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Brilliant didn't think of looking up the schematic for that. So in that case I will use LMV358's and a 1K series resistor with an LED on Pins 11, 12, 13. And that will still enable me to program it using ICSP right?
http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nope I'm using my own board design and so when using the ICSP header, these pins need to have low impedance load other wise the programmer will fail. I'm after some advice as to what constitutes a low impedance load in this case.

I think you mean any loads wired to the pins need to be high impedance (consume less current) so as to not increase the current driving requirement that the programmer has to supply to the ICSP pins. Yes op amps can isolate the led current load from the pins, but so can a cheap mosfet transistor like a 2N7000 which is cheaper and takes up less space.  Of course you still need a series current limiting resistor for any leds no matter what is driving them directly.

Lefty

Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Brilliant didn't think of looking up the schematic for that. So in that case I will use LMV358's and a 1K series resistor with an LED on Pins 11, 12, 13. And that will still enable me to program it using ICSP right?
http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf


If you are going to use three LEDs you will need three op amps.
One 324 (quad op amp) might be better than two 358's (dual op amp).

Or you could follow Lefty's advice and use three mosfets like the small 2N7000.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12849
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I frequently have LEDs + current limiting resistors connected to ISP pins.  The current consumption is a bit south of 16 ma.

Commercial programmers (like the Pololu AVR Programmer) sometimes have series resistors on the ISP lines.  I guess the series resistors plus an LED and resistor may cause problems (it has never caused problems for me).

A piezoelectric buzzer has caused problems for me (Teensy was the programmer).  Adding a small value resistor (22 ohms) eliminated the problem.
Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have had problems from time to time but it usually works ok with just a 1k series resistor.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 145
Posts: 5460
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anything with a high impedance should be OK to connect to the SPI bus and the bus will still work. A LED with limiting resistor should be OK. The easiest way to find out for sure is to just try it.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6613
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To ensure that you can program via ICSP, it's best to use the SPI pins either as outputs driving high resistance loads (e.g. LCD displays), or as inputs for connecting normally-open push buttons.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Pages: [1]   Go Up
Jump to: