CHAPTER 7 8-BIT TIMER
156
User’s Manual U15075EJ1V0UM00
(2)
Operation as external event counter with 16-bit resolution
The external event counter counts the number of external clock pulses input to the TMI60/P31/INTP1/TO50
pin by TM50 and TM60.
To operate as an external event counter with 16-bit resolution, settings must be made in the following
sequence.
<1> Disable operation of TM50 and TM60 (TCE50 = 0, TCE60 = 0).
<2> Disable timer output of TO60 (TOE60 = 0).
<3> Set P31 to input mode (PM31 = 1).
<4> Select the external input clock for timer 60 (see Tables 7-5 and 7-6).
<5> 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).
<6> Set a count value in CR50 and CR60.
<7> 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).
Each time the valid edge is input, the values of TM50 and TM60 are incremented.
When the count values of TM50 and TM60 simultaneously match the values set in CR50 and CR60
respectively, both TM50 and TM60 are cleared to 00H and counting continues. At the same time, an
interrupt request signal (INTTM60) is generated (INTTM50 is not generated).
Figure 7-17 shows the timing of the external event counter operation.
Caution
Be sure to stop the timer operation before overwriting the count clock with different data.
Содержание mPD789425
Страница 2: ...2 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 6: ...6 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 10: ...10 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 24: ...24 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 36: ...36 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 46: ...46 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 176: ...User s Manual U15075EJ1V0UM00 176 MEMO ...
Страница 196: ...User s Manual U15075EJ1V0UM00 196 MEMO ...
Страница 210: ...User s Manual U15075EJ1V0UM00 210 MEMO ...
Страница 262: ...262 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 278: ...278 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 296: ...296 User s Manual U15075EJ1V0UM00 MEMO ...
Страница 298: ...User s Manual U15075EJ1V0UM00 298 MEMO ...
Страница 316: ...User s Manual U15075EJ1V0UM00 316 MEMO ...