Notes On Register Access; Writing To Tcnt And Tcsr - Hitachi H8/500 Series Hardware Manual

Table of Contents

Advertisement

Bit 2
Bit 1
CKS2
CKS1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1

13.2.3 Notes on Register Access

The watchdog timer's TCNT and TCSR registers differ from other registers in being more difficult
to write. The procedures for writing and reading these registers are given below.
1. Writing to TCNT and TCSR: These registers must be written by word access. Programs
cannot write to them by byte access. The word must contain the write data and a password.
The watchdog timer's TCNT and TCSR registers both have the same write address. The write
data must be contained in the lower byte of the word written at this address. The upper byte
must contain H'5A (password for TCNT) or H'A5 (password for TCSR). See figure 13-2.
The result of the access depicted in figure 13-2 is to transfer the write data from the lower byte
to the TCNT or TCSR.
Write to TCNT
Write to TCSR
Downloaded from
Elcodis.com
electronic components distributor
Bit 0
CKS0
Clock Source
0
ø/2
1
ø/32
0
ø/64
1
ø/128
0
ø/256
1
ø/512
0
ø/2048
1
ø/4096
H'FFEC
H'FFEC
Figure 13-2 Writing to TCNT and TCSR
Description
Overflow Interval (ø = 10MHz)
51.2µs (Initial value)
819.2µs
1.6ms
3.3ms
6.6ms
13.1ms
52.4ms
104.9ms
15
H'5A
15
H'A5
239
8 7
Write data
8 7
Write data
0
0

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8/532

Table of Contents