How to program an Attiny84A in HVSP mode with the STK500

Thread Starter

szabikka

Joined Sep 3, 2014
117
Dear Forum members,

I'd like to program an Attiny84A MCU in High Voltage Serial Programming (HVSP) mode with an STK500. Problem is, the chip can not be placed on the board as-is. It would require the STK505 expansion module to connect directly to the STK500. Since I do not own an STK505, I placed the microcontroller on a breadboard and tried to route the pins to the PROGDATA and PROGCTRL headers with jumper wires. I used the user manual of the STK500 and STK505 boards and a schematic of the STK505 to make the connections. I will include these references here in pdf format. My connections were as follows: I connected the VCC, GND, PB0 (XTAL1) and PB3 (RESET) pin of the Attiny84A to VTG, GND, XT1 and RST pin on the PORTE/AUX header of the STK500, respectively. I connected the PA6 (MOSI), the PA5 (MISO) and PA4 (USCK) pin of the MCU to the DATA0 (pin1), DATA1 (pin2) and DATA2(pin3) of the PROGDATA header of the STK500, respectively. Then I connected the PA0, PA1, PA2 and PA3 pins of the MCU to the NC (pin1), the CT1(RDY/BSY) (pin2), the CT2(/OE) (pin3) and CT3(/WR) pin of the PROGCTRL header of the STK500, respectively. I also placed the required jumpers on the STK500 (the VTARGET, AREF, RESET, XTAL1, OSCSELand BSEL2 ones). I used AVRDUDE to first simply read the high fuse byte of the Attiny84A. The first read was successful, it read the signature byte and the high fuse byte, however when I tried to write the flash memory or read the high fuse byte again after the first attempt the signature byte was incorrectly read and then AVRDUDE did not proceed further. I did not change any connections and later attempts to read the high fuse byte yielded the same result. Sometimes it worked, sometimes not and I could never write the flash memory. Is anything wrong with my connection or maybe the problem is the breadboarding/jumper wiring and the lot of stray capacitance associated with them? I would like to note, that using the same breadboarding method I was always successful when programming the Attiny84A in ISP mode, using its respective connections of course. I would use ISP again, but I need the reset pin of the MCU as an I/O pin for my project, so ISP is out of the question.

Thank you for helping out!
 

Attachments

crugorocks

Joined May 1, 2025
31
Use a perfboard to recreate the STK505-to-ATtiny84A connections cleanly and tightly, with the exact signal routing and header pinouts from the STK505 schematic. Breadboard connections may cause distortion.
 
Top