T89C51RD2-SMSIM Atmel, T89C51RD2-SMSIM Datasheet - Page 50
![IC MICRO CTRL 64K FLASH 68PLCC](/photos/6/71/67127/453-68-plcc_sml.jpg)
T89C51RD2-SMSIM
Manufacturer Part Number
T89C51RD2-SMSIM
Description
IC MICRO CTRL 64K FLASH 68PLCC
Manufacturer
Atmel
Series
89Cr
Datasheet
1.T89C51RD2-SMSIM.pdf
(104 pages)
Specifications of T89C51RD2-SMSIM
Core Processor
8051
Core Size
8-Bit
Speed
40MHz
Connectivity
SPI, UART/USART
Peripherals
POR, PWM, WDT
Number Of I /o
48
Program Memory Size
64KB (64K x 8)
Program Memory Type
FLASH
Eeprom Size
2K x 8
Ram Size
1.25K x 8
Voltage - Supply (vcc/vdd)
4.5 V ~ 5.5 V
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
68-PLCC
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Data Converters
-
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
EEPROM Data Memory
General Description
Write Data in the Column
Latches
Programming
50
T89C51RD2
The EEPROM memory block contains 2048 bytes and is organized in 32 pages (or
rows) of 64 bytes. The necessary high programming voltage is generated on-chip using
the standard Vcc pin of the microcontroller.
The EEPROM memory block is located at the addresses 0000h to 07FFh of the XRAM
memory space and is selected by setting control bits in the EECON register.
A read in the EEPROM memory is done with a MOVX instruction.
A physical write in the EEPROM memory is done in two steps : write data in the column
latches and transfer of all data latches in a EEPROM memory row (programming).
The number of data written in the page may vary from 1 to 64 (the page size). When
programming, only the data written in the column latch are programmed. This provides
the capability to program the whole memory by bytes, by page or by a number of bytes
in a page.
Data is written by byte to the column latches as if it was in an external RAM memory.
Out of the 16 address bits of the data pointer, the 10 MSB are used for page selection
and 6 are used for byte selection. Between two EEPROM programming, all addresses in
the column latches must remain in the same page, thus the 10MSB must be unchanged.
The following procedure is used to write in the colums latches :
•
•
•
•
•
The EEPROM programming consists on the following actions :
•
•
•
•
•
Example : .....
Map the program space (Set bit EEE of EECON register)
Load DPTR with the address to write
Load A register with the data to be written
Execute a MOVX @DPTR, A
If needed loop the three last instructions until the end of a 64bytes page
write one or more bytes in a page in the column latches. Normally, all bytes must
belong to the same page; if this is not the case, the first page address is latched and
the others are discarded.
Set EETIM with the value corresponding to the XTAL frequency.
Launch the programming by writing the control sequence (52h or 50h followed by
A2h or A0h) to the EECON register (see Table 32).
EEBUSY flag in EECON is then set by hardware to indicate that programming is in
progress and that EEPROM segment is not available for read.
The end of programming is signaled by a hardware clear of the EEBUSY flag.
Wait :
MOV
EETIM,#3Ch
MOV
ANL
JNZ
MOV
MOVX
MOV
MOV
....
A,EECON
@DPTR,A
; DPTR = EEPROM data pointer, A = Data to write
EECON,#02h
EECON,#50h or 52h
EECON,#A0h or A2h
A,#01h
Wait
; 12MHz*5 = 3Ch
; Write Sequence
; EEE=1 EEPROM mapped
; Write data to EEPROM
4243G–8051–05/03