Author Topic: setting up for different options with different programming pinouts  (Read 2008 times)

0 Members and 1 Guest are viewing this topic.

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18181
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
I'm looking at using an ATtiny20 or 24, I'm not sure which although it's looking like the 24 as I can actually get it but the pinouts are different for the avrisp2 programmer. Can i lay my board out so that each track from the programming header goes to both options of the programming pins (non coincide with different ones) so that either chip I use it will work. Will this case a problems if I have a signal on a pin that was not expecting it or do all the pins go off when in programming mode ?

Also on the ATtiny24 there is no SCK pin but there us a USCK pin, is that the same ?
 

Online ajb

  • Super Contributor
  • ***
  • Posts: 2807
  • Country: us
All of the GPIO pins go tri-state when in programming mode except for the ISP pins and the clock pins which will do whatever they've been configured to do via the CLKSEL fuses.  If your design can spare the extra pins you shouldn't have any problems tying the different ISP pins together.  As an alternative, you could use a couple of 0-ohm resistors as jumpers to route the ISP signals to suit whichever part is populated on the board.  As far as which pins you need to use, check the section in the datasheet on serial programming, as some ports use different pins than others for ISP.  It's usually the SPI pins on the Mega/Tiny parts, but not always!
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 18181
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
ok, so what happens to the programming pins during normal operation? As far as i know by default all IO pins start as high impedance input pins so should not be a problem if I'm not using those pins for anything else.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4236
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
You should refer to the manaul or datasheet for specifics, but all pins are floating during reset, except reset. Shortly after that a few pins go different, including programming pins.
This also includes possible bootloader selection pins, which might also change pin modes for serial/can/usb/crystals.

If you must use the isp pins for other purposes you must make sure you do not interfere with the programming capabilities. And any possible programming interference does not harm the board or application. (or any humans/animals in that case)
For example, you should not put a H-bridge on the programming pins, since the H-bridge is able to create a short circuit.
When connecting stuff to programming pins also consider that a LED might still work, but a strong pullup or pulldown (or capacitor) will make your chip unprogrammable. You'd have to buy pre-programmed chips for your boards... $$$.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf