Pages: [1]   Go Down
Author Topic: Doubling up ICSP pins - recommendations?  (Read 2417 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are there any recommendations or guidelines as to what you can attach to the pins shared with the ICSP interface - I'm currently working on a Tiny85 project that I would like to leave ICSP access to, but this obviously ties up most of the I/Os - I'm looking at using LEDs on most but may have a jumpered input on one pin.

Cheers
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 533
Posts: 26942
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

Can you use SPI to control shift registers to send data out/drive LEDs? Daisy chain them with one other pin used for ssPin/latch.
Then ICSP pins are still available as ICSP pins without being disturbed by the rest of your circuit.
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.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ideally I was going for the very minimum component count due to size limitations (I'm already using an SMD package which would make programming outside of the board impossible once assembled). I did wonder if driving the LED through a transistor rather than direct would prevent the programmer being affected though...
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 533
Posts: 26942
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

Driving LED, driving transistor, no difference to the programmer.
Don't want an external component driving the pins while the programmer is driving it.
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.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I probably wasn't clear enough in my goals - a typical programmed scenario would be each of the 5 I/Os on the '85 would be outputs connected to LEDs (with approprate resistor), however I assumed when the device is being programmed, having the LED still connected to the same pins as being used for the ISCP would cause problems, especially if the programmer could not provide the current to drive the LED too.

What I wasn't sure of was if all the '85 outputs were connected to transistors to switch the LED current, whether that would still be consided 'risky' for the programmer?

In the name of experimentation I tried it out - with LEDs direct, definite fail with programmer failing to detect the device. But with 85 driving LEDs trough uln2803 gates, I was able to program successfully.

I fully appreciate just because it appears to work doesn't mean it's not actually doing untold or undetected damage, which is what prompted the question in the first place.

But as I understand it with the 2803, I'm only ever connecting outputs to inputs (run time) and outputs & inputs to inputs (program time) but never outputs to outputs so it should be safe.

Logged

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


What are you using for a programmer?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

TinyISP at the moment...
Logged

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


As in the TinyISP sketch with an Arduino board?

Or, as in USBtinyISP the dedicated programmer sold by AdaFruit?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry - USBTinyISP...
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I recently had trouble using a 330 ohm resistor and an LED in series with sck pin of the icsp header, that got fixed after i used a 1k resistor, here's some about icsp design considerations you might find useful.
http://www.kanda.com/avr-isp-circuits.html


http://www.cika.com/soporte/Information/Microchip/DevTools/PM3_ICSP_DesignGuide(DS51474a).pdf

oh and i was also using a USBtinyISP for programming.
« Last Edit: March 21, 2013, 04:11:59 pm by oscar_barajas » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just what I was looking for! Thanks!
Logged

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

Sorry - USBTinyISP...

The USBtinyISP includes 1.5K series resistors which will limit the current when there is a wiring problem but will also create a voltage divider with things like an LED + resistor.  If you use a programmer that does not include series resistors (or the resistors are a lower value), you will be able to have a wider variety of things connected to the ISP pins.  For example, I routinely use an Uno as a programmer and have never had a problem with LEDs on the ISP pins.
« Last Edit: March 22, 2013, 12:54:43 am by Coding Badly » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're very welcome, those links helped me a lot, also, as stated in one of the examples on the first link (see note) and just as used in the arduino uno rev 3. using a buffer allows you to really add more uses to your icsp pins like being able to read an input and still program your device. will do on my next arduino clone board revision. Have fun! smiley-cool
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I only buy LED's with 15 - 20 candela output and I've found that a 10K current limiting resistor provides enough light from the 20 candela LED's to be useful with normal room lighting. I build devices that are battery operated and low current is a requirement. I just plugged a green LED into a breadboard. Cathode grounded a 10K resistor from +5V (4.1Vdc measured) and measured 2.5V across the LED subtracting that from 4.1V = 1.6V divided by 10000 = 160 uA and provides a visible light that could be more visible and draw half the 160uA too if it was pulsed off and on at a 50% duty cycle. There is a small increase in price for the 5 mm high output LED's.. I buy the 5 color assortments and surprisingly the light output from batch to batch has been strangely uniform... An odditie when buying loose parts from China.. IMO

Bob
« Last Edit: March 30, 2013, 03:14:37 pm by Docedison » Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Pages: [1]   Go Up
Jump to: