ATtiny22/22L
35
Table 13. Supply Voltage During Programming
High-Voltage Serial Programming
This section describes how to program and verify Flash Program memory, EEPROM Data memory, Lock bits and Fuse bits
in the ATtiny22/L.
Figure 30. High-Voltage Serial Programming
High-Voltage Serial Programming Algorithm
To program and verify the ATtiny22/L in the high-voltage serial programming mode, the following sequence is
recommended (See instruction formats in Table 14):
1.
Power-up sequence: Apply 4.5 - 5.5V between V
CC
and GND. Set PB5 and PB0 to “0” and wait at least 100 ns.
Toggle PB3 at least 4 times with minimum 100 ns pulse-width. Set PB3 to “0”. Wait at least 100 ns. Apply 12V to
PB5 and wait at least 100 ns before changing PB0. Wait 8 µs before giving any instructions.
2.
The Flash array is programmed one byte at a time by supplying first the address, then the low and high data byte.
The write instruction is self-timed, wait until the PB2 (RDY/BSY) pin goes high.
3.
The EEPROM array is programmed one byte at a time by supplying first the address, then the data byte. The write
instruction is self-timed, wait until the PB2 (RDY/BSY) pin goes high.
4.
Any memory location can be verified by using the Read instruction which returns the contents at the selected
address at serial output PB2.
5.
Power-off sequence:Set PB3 to “0”.
Set PB5 to “1”.
Turn V
CC
power off.
When writing or reading serial data to the device, data is clocked on the rising edge of the serial clock, see Figure 31, Fig-
ure 32 and Table 15 for details.
Part
Low-voltage Serial Programming
High-voltage Serial Programming
ATtiny22/L
2.7 - 6.0V
4.5 - 5.5V
ATtiny22/L
2.7 - 6.0V
4.5 - 5.5V
RESET
XTAL1/PB3
GND
VCC
PB2
PB1
PB0
SERIAL DATA OUTPUT
SERIAL INSTR. INPUT
SERIAL DATA INPUT
SERIAL CLOCK INPUT
11.5 - 12.5V
4.5 - 5.5V
ATtiny22/L