Datasheet
31.8. Serial Downloading
Both the Flash and EEPROM memory arrays can be programmed using the serial SPI bus while RESET
is pulled to GND. The serial interface consists of pins SCK, MOSI (input) and MISO (output). After
RESET is set low, the Programming Enable instruction needs to be executed first before program/erase
operations can be executed.
Note: The pin mapping for SPI programming is listed in the following section. Not all parts use the SPI
pins dedicated for the internal SPI interface. Throughout the description about Serial downloading, MOSI
and MISO are used to describe the serial data in and serial data out respectively. For ATmega64A, these
pins are mapped to PDI and PDO.
31.9. Serial Programming Pin Mapping
Even though the SPI Programming interface re-uses the SPI I/O module, there is one important
difference: The MOSI/MISO pins that are mapped to PB2 and PB3 in the SPI I/O module are not used in
the Programming interface. Instead, PE0 and PE1 are used for data in SPI Programming mode as shown
in the following table.
Table 31-13 Pin Mapping SPI Serial Programming
Symbol Pins I/O Description
MOSI (PDI) PE0 I Serial Data in
MISO (PDO) PE1 O Serial Data out
SCK PB1 I Serial Clock
Figure 31-7 Serial Programming and Verify
(1)
VCC
GND
XTAL1
AVCC
+2.7 - 5.5V
(2)
PDI
PDO
SCK
RESET
+2.7 - 5.5V
PE0
PE1
PB1
Note:
Atmel ATmega64A [DATASHEET]
Atmel-8160E-ATmega64A_Datasheet_Complete-09/2015
396