301
8025I–AVR–02/09
ATmega48P/88P/168P/328P
25.7
Parallel Programming
25.7.1
Enter Programming Mode
The following algorithm puts the device in Parallel (High-voltage) Programming mode:
1.
Set Prog_enable pins listed in
to “0000”, RESET pin to 0V and
V
CC
to 0V.
2.
Apply 4.5 - 5.5V between V
CC
and GND.
Ensure that V
CC
reaches at least 1.8V within the next 20 µs.
3.
Wait 20 - 60 µs, and apply 11.5 - 12.5V to RESET.
4.
Keep the Prog_enable pins unchanged for at least 10µs after the High-voltage has been
applied to ensure the Prog_enable Signature has been latched.
5.
Wait at least 300 µs before giving any parallel programming commands.
6.
Exit Programming mode by power the device down or by bringing RESET pin to 0V.
If the rise time of the V
CC
is unable to fulfill the requirements listed above, the following alterna-
tive algorithm can be used.
1.
Set Prog_enable pins listed in
to “0000”, RESET pin to 0V and
V
CC
to 0V.
2.
Apply 4.5 - 5.5V between V
CC
and GND.
3.
Monitor V
CC
, and as soon as V
CC
reaches 0.9 - 1.1V, apply 11.5 - 12.5V to RESET.
Table 25-15. XA1 and XA0 Coding
XA1
XA0
Action when XTAL1 is Pulsed
0
0
Load Flash or EEPROM Address (High or low address byte determined by BS1).
0
1
Load Data (High or Low data byte for Flash determined by BS1).
1
0
Load Command
1
1
No Action, Idle
Table 25-16. Command Byte Bit Coding
Command Byte
Command Executed
1000 0000
Chip Erase
0100 0000
Write Fuse bits
0010 0000
Write Lock bits
0001 0000
Write Flash
0001 0001
Write EEPROM
0000 1000
Read Signature Bytes and Calibration byte
0000 0100
Read Fuse and Lock bits
0000 0010
Read Flash
0000 0011
Read EEPROM