DatasheetQ Logo
Electronic component search and free download site.
Transistors,MosFET ,Diode,Integrated circuits

HT66F20 View Datasheet(PDF) - Holtek Semiconductor

Part Name
Description
Manufacturer
HT66F20 Datasheet PDF : 246 Pages
First Prev 31 32 33 34 35 36 37 38 39 40 Next Last
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
· EEC Register
Bit
7
6
5
4
3
2
1
0
Name
¾
¾
¾
¾
WREN
WR
RDEN
RD
R/W
¾
¾
¾
¾
R/W
R/W
R/W
R/W
POR
¾
¾
¾
¾
0
0
0
0
Bit 7 ~ 4
Unimplemented, read as ²0²
Bit 3
WREN: Data EEPROM Write Enable
0: Disable
1: Enable
This is the Data EEPROM Write Enable Bit which must be set high before Data EEPROM write
operations are carried out. Clearing this bit to zero will inhibit Data EEPROM write operations.
Bit 2
WR: EEPROM Write Control
0: Write cycle has finished
1: Activate a write cycle
This is the Data EEPROM Write Control Bit and when set high by the application program will
activate a write cycle. This bit will be automatically reset to zero by the hardware after the write
cycle has finished. Setting this bit high will have no effect if the WREN has not first been set high.
Bit 1
RDEN: Data EEPROM Read Enable
0: Disable
1: Enable
This is the Data EEPROM Read Enable Bit which must be set high before Data EEPROM read
operations are carried out. Clearing this bit to zero will inhibit Data EEPROM read operations.
Bit 0
RD: EEPROM Read Control
0: Read cycle has finished
1: Activate a read cycle
This is the Data EEPROM Read Control Bit and when set high by the application program will
activate a read cycle. This bit will be automatically reset to zero by the hardware after the read
cycle has finished. Setting this bit high will have no effect if the RDEN has not first been set high.
Note: The WREN, WR, RDEN and RD can not be set to ²1² at the same time in one instruction. The WR and RD can
not be set to ²1² at the same time.
Reading Data from the EEPROM
To read data from the EEPROM, the read enable bit,
RDEN, in the EEC register must first be set high to en-
able the read function. The EEPROM address of the
data to be read must then be placed in the EEA register.
If the RD bit in the EEC register is now set high, a read
cycle will be initiated. Setting the RD bit high will not initi-
ate a read operation if the RDEN bit has not been set.
When the read cycle terminates, the RD bit will be auto-
matically cleared to zero, after which the data can be
read from the EED register. The data will remain in the
EED register until another read or write operation is exe-
cuted. The application program can poll the RD bit to de-
termine when the data is valid for reading.
Writing Data to the EEPROM
To write data to the EEPROM, the write enable bit,
WREN, in the EEC register must first be set high to en-
able the write function. The EEPROM address of the
data to be written must then be placed in the EEA regis-
ter and the data placed in the EED register. If the WR bit
in the EEC register is now set high, an internal write cy-
cle will then be initiated. Setting the WR bit high will not
initiate a write cycle if the WREN bit has not been set. As
the EEPROM write cycle is controlled using an internal
timer whose operation is asynchronous to
microcontroller system clock, a certain time will elapse
before the data will have been written into the EEPROM.
Detecting when the write cycle has finished can be im-
plemented either by polling the WR bit in the EEC regis-
ter or by using the EEPROM interrupt. When the write
cycle terminates, the WR bit will be automatically
cleared to zero by the microcontroller, informing the
user that the data has been written to the EEPROM. The
application program can therefore poll the WR bit to de-
termine when the write cycle has ended.
Rev. 1.10
32
February 1, 2010
 

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]