AT89LP52 Atmel Corporation, AT89LP52 Datasheet - Page 16

no-image

AT89LP52

Manufacturer Part Number
AT89LP52
Description
Manufacturer
Atmel Corporation
Datasheet

Specifications of AT89LP52

Flash (kbytes)
8 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-1C
Max I/o Pins
36
Uart
1
Sram (kbytes)
0.25
Eeprom (bytes)
256
Self Program Memory
IAP
Operating Voltage (vcc)
2.4 to 5.5
Timers
3
Isp
SPI
Watchdog
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89LP52-20AU
Manufacturer:
Atmel
Quantity:
250
Part Number:
AT89LP52-20AU
Manufacturer:
Atmel
Quantity:
10 000
Company:
Part Number:
AT89LP52-20AU
Quantity:
15 490
Part Number:
AT89LP52-20JU
Manufacturer:
Atmel
Quantity:
110
Part Number:
AT89LP52-20JU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT89LP52-20MU
Manufacturer:
Atmel
Quantity:
490
not accessible while DMEN = 0. FDATA can be accessed only by 16-bit (MOVX @DPTR)
addresses. MOVX @Ri instructions to the FDATA address range will access external memory.
Addresses above the FDATA range are mapped to XDATA.
3.3.2.1
Write Protocol
The FDATA address space accesses an internal nonvolatile data memory. This address space
can be read just like EDATA by issuing a MOVX A,@DPTR; however, writes to FDATA require a
more complex protocol and take several milliseconds to complete.
For internal execution the AT89LP51/52 uses an idle-while-write architecture where the CPU is
placed in an idle state while the write occurs. When the write completes, the CPU will continue
executing with the instruction after the MOVX @DPTR,A instruction that started the write. All
peripherals will continue to function during the write cycle; however, interrupts will not be ser-
viced until the write completes.
For external execution the AT89LP51/52 uses an execute-while-write architecture where the
CPU continues to operate while the write occurs. The software should poll the state of the BUSY
flag to determine when the write completes. Interrupts must be disabled during the write
sequence as the CPU will not be able to vector to the internal interrupt table and care should be
taken that the application does not jump to an internal address until the write completes.
To enable write access to the nonvolatile data memory, the MWEN bit (MEMCON.4) must be set
to one. When MWEN = 1 and DMEN = 1, MOVX @DPTR,A may be used to write to FDATA.
FDATA uses flash memory with a page-based programming model. Flash data memory differs
from traditional EEPROM data memory in the method of writing data. EEPROM generally can
update a single byte with any value. Flash memory splits programming into write and erase
operations. A Flash write can only program zeroes, i.e change ones into zeroes (
). Any
1
0
ones in the write data are ignored. A Flash erase sets an entire page of data to ones so that all
bytes become FFH. Therefore after an erase, each byte in the page can only be written once
with any possible value. Bytes can be overwritten without an erase as long as only ones are
changed into zeroes. However, if even a single bit needs updating from zero to one (
);
0
1
then the contents of the page must first be saved, the entire page must be erased and the zero
bits in all bytes (old and new data combined) must be written. Avoiding unnecessary page
erases greatly improves the endurance of the memory..
The AT89LP51/52 includes 2 data pages of 128 bytes each. One or more bytes in a page may
be written at one time. The AT89LP51/52 includes a temporary page buffer of 64 bytes, or half of
a page. Because the page buffer is 64 bytes long, the maximum number of bytes written at one
time is 64. Therefore, two write cycles are required to fill the entire 128-byte page, one for the
low half page (00H–3FH) and one for the high half page (40H–7FH) as shown in
Figure
3-7.
Figure 3-7.
Page Programming Structure
00
3F
Page Buffer
Data Memory
Low Half Page
High Half Page
00
3F
40
7F
AT89LP51/52
16
3709D–MICRO–12/11

Related parts for AT89LP52