Toshiba TMP92CM22FG Computer Hardware User Manual


 
TMP92CM22
2007-02-16
92CM22-99
3.7 8-Bit Timers (TMRA)
The TMP92CM22 features 4 built-in 8-bit timers.
These timers are paired into four modules: TMRA01 and TMRA23. Each module consists of two
channels and can operate in any of the following four operating modes.
8-bit interval timer mode
16-bit interval timer mode
8-bit programmable square wave pulse generation output mode (PPG: Variable duty
cycle with variable period)
8-bit pulse width modulation output mode (PWM: Variable duty cycle with constant
period)
Figure 3.7.1 and
Figure 3.7.2 show block diagrams for TMRA01 and TMRA23.
Each channel consists of an 8-bit up counter, an 8-bit comparator and an 8-bit timer register.
In addition, a timer flip-flop and a prescaler are provided for each pair of channels.
The operation mode and timer flip-flops are controlled by five controls SFR (Special-function
registers).
Each of the two modules (TMRA01 and TMRA23) can be operated independently. All
modules operate in the same manner; hence only the operation of TMRA01 is explained here.
The contents of this chapter are as follows.
3.7.1 Block diagrams
3.7.2 Operation of Each Circuit
3.7.3 SFRs
3.7.4 Operation in Each Mode
(1) 8-bit timer mode
(2) 16-bit timer mode
(3) 8-bit PPG (Programmable pulse generation) output mode
(4) 8-bit PWM (Pulse width modulation) output mode
(5) Mode settings
Table 3.7.1 Registers and Pins for Each Module
Module
Specification
Timer A01 Timer A23
Input pin for external clock
TA0IN
(Shared with PC0)
None
External pin
Output pin for timer
flip-flop
TA1OUT
(Shared with PC1)
TA3OUT
(Shared with PC5)
Timer RUN register TA01RUN (1100H) TA23RUN (1108H)
Timer register
TA0REG (1102H)
TA1REG (1103H)
TA2REG (110AH)
TA3REG (110BH)
Timer mode register
TA01MOD
(1104H)
TA23MOD
(110CH)
SFR
(Address)
Timer flip-flop control
register
TA1FFCR
(1105H)
TA3FFCR
(110DH)