atmega161-4pi ATMEL Corporation, atmega161-4pi Datasheet - Page 115
![no-image](/images/manufacturer_photos/0/0/79/atmel_corporation_sml.jpg)
atmega161-4pi
Manufacturer Part Number
atmega161-4pi
Description
8-bit Microcontroller With 16k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
1.ATMEGA161-4PI.pdf
(159 pages)
- Current page: 115 of 159
- Download datasheet (2Mb)
EEPROM Write Prevents
Writing to SPMCR
Reading the Fuse and Lock
bits from Software
1228D–AVR–02/07
Note that an EEPROM write operation will block all software programming to Flash.
Reading the Fuse and Lock bits from software will also be prevented during the
EEPROM write operation. It is recommended that the user check the status bit (EEWE)
in the EECR Register and verify that the bit is cleared before writing to the SPMCR
Register.
It is possible to read both the Fuse and Lock bits from software. To read the Lock bits,
load the Z-pointer with $0001 and set the BLBSET and SPMEN bits in SPMCR. If an
LPM instruction is executed within three CPU cycles after the BLBSET and SPMEN bits
are set in SPMCR, the Lock bits will be written to the destination register. The BLBSET
and SPMEN bits will auto-clear upon completion of reading the Lock bits or if no
LPM/SPM instruction is executed within three/four CPU cycles. When BLBSET and
SPMEN are cleared, LPM will work as described in “Constant Addressing Using the
LPM Instruction” on page 16 and in the Instruction Set manual.
The algorithm for reading the Fuse bits is similar to the one described above for reading
the Lock bits. But when reading the Fuse bits, load $0000 in the Z-pointer. When an
LPM instruction is executed within three cycles after the BLBSET and SPMEN bits are
set in the SPMCR, the Fuse bits can be read in the destination register as shown below.
Fuse and Lock bits that are programmed will be read as zero.
Bit
Bit
7
–
7
–
BOOTRST
6
6
–
SPIEN
BLB12
5
5
BLB11
SUT
4
4
BLB02
3
3
–
CKSEL[2]
BLB01
2
2
ATmega161(L)
CKSEL[1]
LB2
1
1
CKSEL[0]
LB1
0
0
R0/Rd
R0/Rd
115
Related parts for atmega161-4pi
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ATmega16](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
![U641B](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
INTERVAL AND WIPE/WASH WIPER CONTROL IC WITH DELAY
Manufacturer:
ATMEL Corporation
Datasheet:
![U4082B](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Low-Voltage Voice-Switched IC for Hands-Free Operation
Manufacturer:
ATMEL Corporation
Datasheet:
![U4089B](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
MONOLITHIC INTEGRATED FEATUREPHONE CIRCUIT
Manufacturer:
ATMEL Corporation
Datasheet:
![U4255BM-M](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
AM-FM Receiver IC U4255BM-M
Manufacturer:
ATMEL Corporation
Datasheet:
![U4089B-P](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Monolithic Integrated Feature Phone Circuit
Manufacturer:
ATMEL Corporation
Datasheet:
![TDA4470](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Multistandard Video-IF and Quasi Parallel Sound Processing
Manufacturer:
ATMEL Corporation
Datasheet:
![ATF22V10B-25PC](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
High-performance EE PLD
Manufacturer:
ATMEL Corporation
Datasheet:
![AT89C51ED2-IM](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
8-bit Flash Microcontroller
Manufacturer:
ATMEL Corporation
Datasheet:
![AT24C01](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
2-Wire Serial EEPROM
Manufacturer:
ATMEL Corporation
Datasheet: