HT48E10 Holtek Semiconductor, HT48E10 Datasheet - Page 17

no-image

HT48E10

Manufacturer Part Number
HT48E10
Description
I/O Type 8-Bit MTP MCU
Manufacturer
Holtek Semiconductor
Datasheet
The EEPROM data memory is accessed via a
three-wire serial communication interface by writing to
EECR. It is arranged into 128 words by 8 bits. The
EEPROM data memory contains seven instructions:
READ, ERASE, WRITE, EWEN, EWDS, ERAL and
WRAL. These instructions are all made up of 10 bits
data: 1 start bit, 2 op-code bits and 7 address bits.
Before accessing the EEPROM, an initial procedure
should be executed. The following procedures show the
detail procedures step by step.
The following is an assembly program example. User
can put them into the POR program. (Note: Please refer
to the application note for the detail of the EWEN,
EWDS and WRITE subroutines.)
The following are the functional descriptions and timing diagrams of all seven instructions.
Rev. 1.50
Execute the EWEN instruction.
Execute the WRITE instruction. (The application pro-
grams need to reserve one location for this procedure.
The content of it will be changed after this procedure.)
Execute the EWDS instruction. (This one is optional. If
you don t want to write data to EEPROM immediately,
then disable it to prevent the mis-programming. )
mov
mov
mov
mov
A,01h
BP,A
A,40h
MP1,A
; set to bank 1
; set MP1 to EECR address
17
By writing CS, SK and DI, these instructions can be
given to the EEPROM. These serial instruction data pre-
sented at the DI will be written into the EEPROM data
memory at the rising edge of SK. During the READ cy-
cle, DO acts as the data output and during the WRITE or
ERASE cycle, DO indicates the BUSY/READY status.
When the DO is active for read data or as a BUSY/
READY indicator the CS pin must be high; otherwise DO
will be in a high state. For successful instructions, CS
must be low after the instruction is sent. After power-on,
the device is by default in the EWDS state. An EWEN in-
struction must be performed before any ERASE or
WRITE instruction can be executed.
call
mov
mov
mov
mov
call
call
EWEN
A, 7Fh
EEADDR, A
A, 55h
EEDATA, A
WRITE
EWDS
; subroutine to run EWEN
; instructions.
; subroutine to run WRITE
; instructions. (write 55h data to
; address 7Fh.)
; subroutine to run EWDS
; Instructions.
; (This one is optional)
October 31, 2006
www.DataSheet4U.com
HT48E10

Related parts for HT48E10