I'm enjoying using the USBtinyISP and learning more about how the insides of the AVRs work. I thought it would be handy to build a board to program the two kinds of MCUs I play with - Attiny and ATmega. I guessed I could share the SPI lines, reset and GND and just switch VCC between the two. I put in indicator LEDs on each side of the SPDT switch so I could check which one had power. Works brilliantly and I somehow got all the soldering right. AVRDUDE happily loaded my first "blink" test program onto a ATmega168 and an LED connected to PB0 blinked as advertised.
Then I did the same on the ATtiny13 and away the LED went as expected. BUT so did the power indicator on the other board. When I attempt to blink an LED on any one of the SPI pins of either chip, the power indicator LED on the other (switched off) side flashes in unison with it. I couldn't find any shorts, so I breadboarded the circuit to help understand the problem but the same happens.
Any thoughts on what might be going on?
AVR Programming Board Semi-Fail
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: AVR Programming Board Semi-Fail
Is it that lighting the LED causes the power indicator LED to turn off?
Are you using a current-limiting resistor on the LED?
Are you using a current-limiting resistor on the LED?
- marke3
- Posts: 205
- Joined: Sat Feb 08, 2014 5:24 pm
Re: AVR Programming Board Semi-Fail
The blue power indicator LED lights up at the same time as the blinked green LED. In the second photo, the breadboard is switched to the ATmega168 and the program is blinking the green LED connected to the SCK pin (white wires). All the LEDs have resisters soldered along one pin.
As the SCK pins are wire together to use the common programming header, it seems when the 168 pin is pulled high, current then passes into the AtTiny and out it's VCC pin and lights the blue indicator lamp to the left.
As the SCK pins are wire together to use the common programming header, it seems when the 168 pin is pulled high, current then passes into the AtTiny and out it's VCC pin and lights the blue indicator lamp to the left.
- marke3
- Posts: 205
- Joined: Sat Feb 08, 2014 5:24 pm
Re: AVR Programming Board Semi-Fail
I just pulled the ATTiny out of the breadboard and gave it 5v at each pin and measured the VCC pin. All I/O pins gave me 4.25v except PB5 - the reset pin - it gave me 2.5v. I guess I just expected the unpowered AVR not to conduct at all, but it does.
I'll try to remember never to assume, right?
I'll try to remember never to assume, right?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: AVR Programming Board Semi-Fail
I do it all the time!marke3 wrote:I'll try to remember never to assume, right?
- marke3
- Posts: 205
- Joined: Sat Feb 08, 2014 5:24 pm
Re: AVR Programming Board Semi-Fail
... which is how we learn. So I learnt that diodes are useful.
A couple of 1N4001's in line with the VCC and it works perfectly.Please be positive and constructive with your questions and comments.