English
Language : 

HD404369 Datasheet, PDF (62/117 Pages) Hitachi Semiconductor – 4-bit HMCS400-Series microcomputer
HD404369 Series
• Timer mode register B1 (TMB1: $009): Four-bit write-only register that selects the free-running/reload
timer function, input clock source, and the prescaler division ratio as shown in figure 40. It is reset to $0
by MCU reset.
Writing to this register is valid from the second instruction execution cycle after the execution of the
previous timer mode register B1 write instruction. Setting timer B’s initialization by writing to timer
write register B (TWBL: $00A, TWBU: $00B) must be done after a mode change becomes valid.
When selecting the input capture timer operation, select the internal clock as the input clock source.
Timer mode register B1 (TMB1: $009)
Bit
Initial value
Read/Write
Bit name
3
0
W
TMB13
2
0
W
TMB12
1
0
W
TMB11
0
0
W
TMB10
Free-Running/Reload
TMB13 Timer Selection
0
Free-running timer
1
Reload timer
TMB12 TMB11 TMB10
0
0
0
1
1
0
1
1
0
0
1
1
0
1
Input Clock Period and Input
Clock Source
2048tcyc
512tcyc
128tcyc
32tcyc
8tcyc
4tcyc
2tcyc
D2/EVNB (external event input)
Figure 40 Timer Mode Register B1 (TMB1)
• Timer mode register B2 (TMB2: $026): Three-bit write-only register that selects the detection edge of
signals input to pin EVNB and input capture operation as shown in figure 41. It is reset to $0 by MCU
reset.
• Timer write register B (TWBL: $00A, TWBU: $00B): Write-only register consisting of the lower digit
(TWBL) and the upper digit (TWBU). The lower digit is reset to $0 by MCU reset, but the upper digit
value is invalid (figures 42 and 43).
Timer B is initialized by writing to timer write register B (TWBL: $00A, TWBU: $00B). In this case,
the lower digit (TWBL) must be written to first, but writing only to the lower digit does not change the
timer B value. Timer B is initialized to the value in timer write register B at the same time the upper
digit (TWBU) is written to. When timer write register B is written to again and if the lower digit value
needs no change, writing only to the upper digit initializes timer B.
60