Sharing ISP pins when using dragon

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello...

After spending a few minutes marveling at my first blinking LED I started thinking about what else I could do with the tiny45 mounted on my board...I'd really like to be able to use those ISP pins for something else.

Right now I have all the IO pins except the one driving the LED tri-stated. Measuring the voltage at MOSI, MISO and SCK pins on the chip shows 5V. I realize this is not coming from the chip, but is actually coming from the dragon. This is causing some concern. What would happen if, for example, the code I just loaded and started running made one of those pins an output and immediately drove it low (before I could pull the ISP connector off the board)? It seems the contention might damage either the tiny45 or the dragon.

I've read AVR042 hoping that would answer my question, but it seems to only address treatment of other inputs, and not this potential issue of the chip output contending with the programmer.

The dragon docs don't really explain where the 5V is coming from (i.e. is it a weak pullup or is it actively being driven high).

Am I basically stuck with using those pins only as inputs, or am I missing something? It seems to me that the dragon should be tri-stating the serial lines when it's not driving RESET low.

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

It seems to me that the dragon should be tri-stating the serial lines when it's not driving RESET low.

Perhaps it is. If the AVr pins and the Dragon pins are indeed high-Z, what value would you expect to read? I'd expect any value to be valid

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Perhaps it is. If the AVr pins and the Dragon pins are indeed high-Z, what value would you expect to read? I'd expect any value to be valid

To me more specific about what I did, I actually took a voltmeter and measured the pins externally. I'm not simply reading the input pins in code or staring at a debugger.

I did this with everything connected, measuring the pins, and then I did this by disconnecting the ISP lines, and measuring the tiny45 pins and the lines from the dragon separately. The lines from the dragon measured 5V (actually 5.1, which matches the voltage on my 5V rail), where the pins on the tiny45 measured about .15V.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The point I'm making is that floating pins can have any value. And yes, indeed, leakage or other from the ISP circuitry could pull them high when read with a meter/'scope.

Probably you can use them just fine in your app, as you can a chip mounted in an STK500. If you really want to test, then 1) be sure that you "close" your ISP e.g. AVRStudio 2) Apply 100k/10k/1k resistors in sequence to the suspect pins and ground, and see what the violtage readings are.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried your suggestion and with 1k I see about 2.59V across it. The voltages at 100k (5.08), 10k (4.8), and 1k, lead me to think there is probably about a 1k resistance in series with the output.

I wouldn't expect a line that is floating to be able to source 2.5mA, so I'm guessing it's not floating. But, I agree that there's probably enough resistance on the output that it wouldn't be the end of the world if it was taken to ground accidentally.

Still, I think I will probably wind up building one of the buffer circuits I've been finding on the forum. Better to lose a $0.70 chip because I did something stupid than my $50 board.

I'll just be careful 'till then.

Thanks,
Phil