
Rev. 2.0, 11/00, page 302 of 1037
13.3
Operation
13.3.1
Operation as the Interval Timer
When the TMB17 bit of the TMB is set to 0, the Timer B works as an 8-bit interval timer.
When reset, since the TCB is cleared to H'00 and as the TMB17 bit is cleared to 0, the Timer B
continues counting up as the interval timer without interrupts right after resetting.
As the clock source for the Timer B, selection can be made from seven different types of
internal clocks being output from the prescaler unit by the TMB12 to TMB10 bits of the TMB or
an external clock through the TMBI input pin can be chosen instead.
When the clock signal is input after the reading of the TCB reaches H'FF, the Timer B overflows
and the TMBIF bit of the TMB will be set to 1. At this time, when the TMBIE bit of the TMB is
1, interrupt occurs.
When overflowing occurs, the reading of the TCB returns to H'00 before resuming counting up.
When a value is set to the TLB while the interval timer is in operation, the value which has been
set to the TLB will be loaded to the TCB simultaneously.
13.3.2
Operation as the Auto Reload Timer
When the TMB17 of the TMB is set to 1, the Timer B works as an 8-bit auto reload timer.
When a reload value is set in the TLB, the value is loaded onto the TCB at the same time, and
the TCB starts counting up from the value.
When the clock signal is input after the reading of the TCB reaches H'FF, the Timer B overflows
and the TLB value is loaded onto the TCB, then the TCB continues counting up from the loaded
value. Accordingly, overflow interval can be set within the range of 1 to 256 clocks depending
on the TLB value.
Clock source and interrupts in the auto reload operation are the same as those in the interval
operation. When the TLB value is re-set while the auto reload timer is in operation, the value
which has been set to the TLB will be loaded onto the TCB simultaneously.
13.3.3
Event Counter
The Timer B works as an event counter using the TMBI pin as the event input pin. When the
TMB12 to TMB10 are set to 111, the external event will be selected as the clock source and the
TCB counts up at the leading edge or the trailing edge of the TMBI pin inputs.
Summary of Contents for Hitachi H8S/2191
Page 123: ...Rev 2 0 11 00 page 96 of 1037...
Page 149: ...Rev 2 0 11 00 page 122 of 1037...
Page 197: ...Rev 2 0 11 00 page 170 of 1037...
Page 247: ...Rev 2 0 11 00 page 220 of 1037...
Page 249: ...Rev 2 0 11 00 page 222 of 1037...
Page 347: ...Rev 2 0 11 00 page 320 of 1037...
Page 357: ...Rev 2 0 11 00 page 330 of 1037...
Page 417: ...Rev 2 0 11 00 page 390 of 1037...
Page 431: ...Rev 2 0 11 00 page 404 of 1037...
Page 439: ...Rev 2 0 11 00 page 412 of 1037...
Page 457: ...Rev 2 0 11 00 page 430 of 1037...
Page 525: ...Rev 2 0 11 00 page 498 of 1037...
Page 543: ...Rev 2 0 11 00 page 516 of 1037...
Page 845: ...Rev 2 0 11 00 page 818 of 1037...