BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
Programming Considerations
The TM Counter Registers and the Capture/Compare CCRA and CCRP registers, 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 these register pairs is carried out in a specific way as described above, it is recommended
to use the "MOV" instruction to access the CCRA and CCRP low byte registers, named xTMnAL
and PTMRPL, using the following access procedures. Accessing the CCRA or CCRP low byte
registers without following these access procedures will result in unpredictable values.
The following steps show the read and write procedures:
• Writing Data to CCRA or CCRP
Step 1. Write data to Low Byte xTMnAL or PTMRPL
♦
– Note that here data is only written to the 8-bit buffer.
Rev. 1.00
Clock input
CTMn
CCR output
CTM Function Pin Block Diagram (n=0~1)
Clock/capture input
CCR capture input
PTM
CCR output
PTM Function Pin Block Diagram
xTMn Counter Register (Read only)
xTMnDL
xTMnDH
8-bit Buffer
xTMnAL
xTMnAH
xTMn CCRA Register (Read/Write)
PTMRPL
PTMRPH
PTM CCRP Register (Read/Write)
Data Bus
79
CTCKn
CTPn
CTPnB
PTCK
PTPI
PTP
PTPB
October 26, 2018
Need help?
Do you have a question about the BS86DH12C and is the answer not in the manual?