Signature bytes, Programming the flash and eeprom, Atmega161(l) – Rainbow Electronics ATmega161L User Manual
Page 117

117
ATmega161(L)
1228C–AVR–08/02
•
CKSEL2..0: See Table 4, “Reset Delay Selections
(3)
,” on page 26, for which
combination of CKSEL2..0 to use. Default value is “010”.
The status of the Fuse bits is not affected by Chip Erase. Note that the Fuse bits are
locked if Lock bit1 (LB1) or Lock bit2 (LB2) is programmed. Program the Fuse bits
before programming the Lock bits.
Signature Bytes
All Atmel microcontrollers have a 3-byte signature code that identifies the device. This
code can be read in both Serial and Parallel modes. The three bytes reside in a sepa-
rate address space, and for the ATmega161 they are:
1.
$000: $1E (indicates manufactured by Atmel)
2.
$001: $94 (indicates 16 KB Flash memory)
3.
$002: $01 (indicates ATmega161 device when $001 is $94)
Programming the Flash
and EEPROM
Atmel’s ATmega161 offers 16K bytes of In-System Reprogrammable Flash Program
memory and 512 bytes of EEPROM Data memory.
The ATmega161 is normally shipped with the On-chip Flash program and EEPROM
Data memory arrays in the erased state (i.e., contents = $FF) and ready to be pro-
grammed. This device supports a High-voltage (12V) Parallel Programming mode and a
Low-voltage Serial Programming mode. The +12V is used for programming enable only,
and no current of significance is drawn by this pin. The Serial Programming mode pro-
vides a convenient way to download the program and data into the ATmega161 inside
the user’s system.
The Program memory array on the ATmega161 is organized as 128 pages of 128 bytes
each. When programming the Flash, the program data is latched into a page buffer. This
allows one page of program data to be programmed simultaneously in either Program-
ming mode.
The EEPROM Data Memory array on the ATmega161 is programmed byte-by-byte in
either Programming mode. An auto-erase cycle is provided with the self-timed EEPROM
programming operation in the Serial Programming mode.
During programming, the supply voltage must be in accordance with Table 41.
Table 41. Supply Voltage during Programming
Part
Serial Programming
Parallel Programming
ATmega161L
2.7 - 5.5V
4.5 - 5.5V
ATmega161
4.0 - 5.5V
4.5 - 5.5V