English
Language : 

HT69F340 Datasheet, PDF (106/235 Pages) Holtek Semiconductor Inc – TinyPowerTM I/O Flash MCU with LCD & EEPROM
HT69F340/HT69F350/HT69F360
TinyPowerTM I/O Flash MCU with LCD & EEPROM
Programming Considerations
The TM Counter Registers and the Capture/Compare CCRA or CCRP register, being either 10-bit or
16-bit, all have a low and high byte structure. The high bytes can be directly accessed, but as the low
bytes can only be accessed via an internal 8-bit buffer, reading or writing to these register pairs must
be carried out in a specific way. The important point to note is that data transfer to and from the 8-bit
buffer and its related low byte only takes place when a write or read operation to its corresponding
high byte is executed.
As the CCRA and CCRP registers are implemented in the way shown in the following diagram and
accessing this register is carried out in a specific way described above, it is recommended to use the
“MOV” instruction to access the CCRA or CCRP low byte register, named xTMnAL or PTMnRPL,
in the following access procedures. Accessing the CCRA or CCRP low byte register without
following these access procedures will result in unpredictable values.
TM Counte� Registe� (Read only)
xTMnDL xTMnDH
�-�it Buffe�
xTMnAL xTMnAH
xTMn CCRA Registe� (Read/W�ite)
PTMnRPL PTMnRPH
PTMn CCRP Registe� (Read/W�ite)
Data Bus
The following steps show the read and write procedures:
• Writing Data to CCRA or CCRP
♦♦ Step 1. Write data to Low Byte xTMnAL or PTMnRPL
––Note that here data is only written to the 8-bit buffer.
♦♦ Step 2. Write data to High Byte xTMnAH or PTMnRPH
––Here data is written directly to the high byte registers and simultaneously data is latched
from the 8-bit buffer to the Low Byte registers.
• Reading Data from the Counter Registers and CCRA or CCRP
♦♦ Step 1. Read data from the High Byte xTMnDH, xTMnAH or PTMnRPH
––Here data is read directly from the High Byte registers and simultaneously data is latched
from the Low Byte register into the 8-bit buffer.
♦♦ Step 2. Read data from the Low Byte xTMnDL, xTMnAL or PTMnRPL
––This step reads data from the 8-bit buffer.
Rev. 1.30
106
November 18, 2016