CHAPTER 7 8-BIT TIMER
User’s Manual U15075EJ1V0UM00
153
7.4.2 Operation as 16-bit timer counter
Timer 50 and timer 60 can be used as a 16-bit timer counter using cascade connection. In this case, 8-bit timer
counter 50 (TM50) is the higher 8 bits and 8-bit timer counter 60 (TM60) is the lower 8 bits. 8-bit timer 60 controls
reset and clear.
The following modes can be used for the 16-bit timer counter.
•
Interval timer with 16-bit resolution
•
External event counter with 16-bit resolution
•
Square-wave output with 16-bit resolution
(1)
Operation as interval timer with 16-bit resolution
The interval timer with 16-bit resolution repeatedly generates an interrupt at a time interval specified by the
count value preset in 8-bit compare register 50 (CR50) and 8-bit compare register 60 (CR60).
To operate as an interval timer with 16-bit resolution, settings must be made in the following sequence.
<1> Disable operation of 8-bit timer counter 50 (TM50) and 8-bit timer counter 60 (TM60) (TCE50 = 0,
TCE60 = 0).
<2> Disable timer output of TO60 (TOE60 = 0).
<3> Set the count clock for timer 60 (see Tables 7-5 and 7-6).
<4> Set the operation mode of timer 50 and 8-bit timer 60 to 16-bit timer counter mode (see Figures 7-4
and 7-5).
<5> Set a count value in CR50 and CR60.
<6> Enable the operation of TM50 and TM60 (TCE60 = 1
Note
).
Note
Start and clear of the timer in the 16-bit timer counter mode are controlled by TCE60 (the value of
TCE50 is invalid).
When the count values of TM50 and TM60 match the values set in CR50 and CR60 respectively, both TM50 and
TM60 are simultaneously cleared to 00H and counting continues. At the same time, an interrupt request signal
(INTTM60) is generated (INTTM50 is not generated).
Table 7-7 shows interval time, and Figure 7-16 shows the timing of the interval timer operation.
Cautions 1. Be sure to stop the timer operation before overwriting the count clock with different data.
2. In the 16-bit timer counter mode, TO50 cannot be used. Be sure to set TOE50 = 0 to disable
TO50 output.
Summary of Contents for mPD789425
Page 2: ...2 User s Manual U15075EJ1V0UM00 MEMO ...
Page 6: ...6 User s Manual U15075EJ1V0UM00 MEMO ...
Page 10: ...10 User s Manual U15075EJ1V0UM00 MEMO ...
Page 24: ...24 User s Manual U15075EJ1V0UM00 MEMO ...
Page 36: ...36 User s Manual U15075EJ1V0UM00 MEMO ...
Page 46: ...46 User s Manual U15075EJ1V0UM00 MEMO ...
Page 176: ...User s Manual U15075EJ1V0UM00 176 MEMO ...
Page 196: ...User s Manual U15075EJ1V0UM00 196 MEMO ...
Page 210: ...User s Manual U15075EJ1V0UM00 210 MEMO ...
Page 262: ...262 User s Manual U15075EJ1V0UM00 MEMO ...
Page 278: ...278 User s Manual U15075EJ1V0UM00 MEMO ...
Page 296: ...296 User s Manual U15075EJ1V0UM00 MEMO ...
Page 298: ...User s Manual U15075EJ1V0UM00 298 MEMO ...