I'm having a hell of time getting AVR ISP header on my circuit board to actually allow me to flash the chip. Basically, with an ATTINY85 you pretty much have to share programming pins with pins used by your program. I think something about this sharing is causing issues.
In the below schematic,
J4 go to a board with 7 addressable APA102 RGB LEDs.
J3 provides clock and data SPI signals, and
J4 provides power and ground.
I have LED clock on the pin
SCK of the ISP headers, and the LED data pin on
PB4 which is not shared with the ISP headers at all.
PB3 controls a high power switch on the LEDs to prevent them from drawing current in sleep mode.
When I tried to flash a program with this setup, it seemed to work at first, though I could see red pulses on the LEDs, which surprised me. But the last step of the upload, the verification step checks the program was written correctly, failed. And now the chip can no longer be programmed since avrdude just gives
avrdude: initialization failed, rc=-1
I managed to remove the chip form the board and put it in a socket by itself in a breadboard. In that state, I was able to flash it no problem, and it worked great when I soldered it back on to the board. But when I tried to flash it again on that board, the exact same thing happened. Clearly something in my circuit is to blame. But I'm not sure what.
What is preventing my circuit from allowing it to flash the ATTINY85? And, if necessary, what can I do to insulate the components from programming signals that they shouldn't need to be aware of?
Chakra Pendant by Squeegy 46acb26f5f80a881 - Upverter http://upverter.com/Squeegy/46acb26f5f80a881/Chakra-Pendant/embed_img/14256226900000/
^ click that and you can browse both the schematic and the PCB because Upverter is neat.