High Voltage Serial Programming ← |
↑ ScratchMonkey High Voltage Programming |
→ Tiny Programming Interface |
HVPP is the high voltage protocol for ATtiny and ATmega MCUs with 20 pins or more.
HVPP requires 19 signals (including power and ground), as shown in this illustration. For High Voltage programming, the timing of the power pin matters, so it is software controlled through the SVCC pin, rather than simply through the 5V pin of the Arduino. The HVRESET a.k.a. ⚡️RESET⚡️ signal is used to control one of the circuits shown in the High Voltage programming section to generate the 12V signal to be applied to RESET pin of the target microcontroller. The other signals go directly to the target microcontroller.
The HVSP signals need to be connected to the corresponding signals on your target microcontroller / board. Details for each target are discussed in the Connection Diagrams chapter.
The details of HVPP control signal assignment are somewhat messy, primarily because on 20 pin MCUs, some of the control signals are multiplexed two to a single pin, and the ATtiny26/261/461/861 family does this in a somewhat different way from the ATtiny2313/4313 family of MCUs. The following table gives an mapping from CTRLn names to the names in the MCU datasheets:
Pin | ATtiny861 | ATtiny4313 | Others |
---|---|---|---|
CTRL0 | - | - | BS2 |
CTRL2 | WR | OE | OE |
CTRL3 | XA0 | WR | WR |
CTRL4 | XA1/BS2 | BS1/PAGEL | BS1 |
CTRL5 | PAGEL/BS1 | XA0 | XA0 |
CTRL6 | - | XA1/BS2 | XA1 |
CTRL7 | OE | - | PAGEL |
For 20 pin MCUs not listed here, you need to figure out whether pp_controlstack in the avrdude configuration resembles the ATtiny861 or the ATtiny4313, and connect pins accordingly. As far as I can tell, the ATtiny26/261/461/861 is unique, and all other 20 pin MCUs use the ATtiny4313 scheme.
High Voltage Serial Programming ← |
↑ ScratchMonkey High Voltage Programming |
→ Tiny Programming Interface |