Rev. 1.0, 02/00, page 354 of 1141
17.2.4
Notes on Register Access
The watchdog timer's WTCNT and WTCSR registers differ from other registers in being more
difficult to write to. The procedures for writing to and reading these registers are given below.
•
Writing to WTCNT and WTCSR
These registers must be written to by a word transfer instruction. They cannot be written to
with byte transfer instructions.
Figure 17.2 shows the format of data written to WTCNT and WTCSR. WTCNT and WTCSR
both have the same write address. For a write to WTCNT, the upper byte of the written word
must contain H'5A and the lower byte must contain the write data. For a write to WTCSR, the
upper byte of the written word must contain H'A5 and the lower byte must contain the write
data. This transfers the write data from the lower byte to WTCNT or WTCSR.
<WTCNT write>
<WTCSR write>
Address : H'FFBC
Address : H'FFBC
H'5A
Write data
15
8 7
0
0
H'A5
Write data
15
8 7
0
0
Figure 17.2 Format of Data Written to WTCNT and WTCSR
•
Reading WTCNT and WTCSR
These registers are read in the same way as other registers. The read addresses are H'FFBC for
WTCSR, and H'FFBD for WTCNT.