115
ATmega161(L)
1228B–09/01
•
The BODLEVEL Fuse selects the brown-out detection level and changes the start-
up times. See “Brown-out Detection” on page 28. Default value is unprogrammed
(“1”).
•
When the BODEN Fuse is programmed (“0”), the Brown-out Detector is enabled.
See “Brown-out Detection” on page 28. Default value is unprogrammed (“1”).
•
CKSEL2..0: See Table 4, “Reset Delay Selections
,” 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 separate
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.
Parallel Programming
This section describes how to parallel program and verify Flash program memory,
EEPROM data memory, Lock bits and Fuse bits in the ATmega161. Pulses are
assumed to be at least 500 ns unless otherwise noted.
Signal Names
In this section, some pins of the ATmega161 are referenced by signal names describing
their functionality during parallel programming (see Figure 76 and Table 42). Pins not
described in the following table are referenced by pin name.
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