261
Atmel ATmega16/32/64/M1/C1 [DATASHEET]
7647K–AVR–12/13
25.7
Serial Programming Pin Mapping
25.8
Parallel Programming
25.8.1 Enter Programming Mode
The following algorithm puts the device in Parallel (High-voltage) > Programming mode:
1.
Set Prog_enable pins listed in Table 25-9. to “0000”, RESET pin to “0” and VCC to 0V. 2.
Apply 4.5 - 5.5V between VCC and GND. Ensure that VCC reaches at least 1.8V within the next 20s.
3.
Wait 20 - 60s, and apply 11.5 - 12.5V to RESET.
4.
Keep the Prog_enable pins unchanged for at least 10s after the high-voltage has been applied to ensure the
Prog_enable signature has been latched.
5.
Wait at least 300s 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 VCC is unable to fulfill the requirements listed above, the following alternative algorithm can be used.
1.
Set Prog_enable pins listed in Table 25-9. to “0000”, RESET pin to “0” and VCC to 0V. 2.
Apply 4.5 - 5.5V between VCC and GND.
3.
Monitor VCC, and as soon as VCC reaches 0.9 - 1.1V, apply 11.5 - 12.5V to RESET.
4.
Keep the Prog_enable pins unchanged for at least 10s after the high-voltage has been applied to ensure the
Prog_enable signature has been latched.
5.
Wait until VCC actually reaches 4.5 -5.5V before giving any parallel programming commands.
6.
Exit programming mode by power the device down or by bringing RESET pin to 0V.
Table 25-12. No. of Words in a Page and No. of Pages in the Flash
Device
Flash Size
Page Size
PCWORD
No. of Pages
PCPAGE
PCMSB
ATmega16M1
8Kwords
(16Kbytes)
64 words
(128 bytes)
PC[5:0]
128
PC[12:6]
12
ATmega32M1/C1
16Kwords
(32Kbytes)
64 words
(128 bytes)
PC[5:0]
256
PC[13:6]
13
ATmega64M1/C1
32K words
(64K bytes)
128 words
(256 bytes)
PC[6:0]
256
PC[14:7]
14
Table 25-13. No. of Words in a Page and No. of Pages in the EEPROM
Device
EEPROM Size
Page Size
PCWORD
No. of Pages
PCPAGE
EEAMSB
ATmega16M1
512 bytes
4 bytes
EEA[1:0]
128
EEA[8:2]
9
ATmega32M1/C1
1024 bytes
4 bytes
EEA[1:0]
256
EEA[9:2]
9
ATmega64M1/C1
2048 bytes
8 bytes
EEA[2:0]
256
EEA[9:2]
9
Table 25-14. Pin Mapping Serial Programming
Symbol
Pins
I/O
Description
MOSI_A
PD3
I
Serial data in
MISO_A
PD2
O
Serial data out
SCK_A
PD4
I
Serial clock