287
Chapter 10
Timer
Preliminary User’s Manual U15839EE1V0UM00
(c) Example: Cycle measurement
By setting the TMCC00 and TMCC01 registers as described below Timer C can measure the
cycle of signals input to the TICn0 pin.
The valid edge of the TIC00 pin is selected according to the IES01 and IES00 bits of the SESC0
register.
(Similar the valid edge of the TIC01 pin is selected according to the IES11 and IES10 bits of the
SESC0 register.)
Either the rising edge, the falling edge, or both edges can be selected as the valid edges of both
pins.
Setting method:
(1)
set corresponding port pins (P5) to Timer C input (PM5 to input, PMC5 to Timer C0)
(2)
set CAE bit of TMCC00 register to 1 for activating the Timer C peripheral
(3)
set the valid edge of the TICn0 pin with the IES01 and IES00 bits of the SESC0 register (here for
rising edge: IES01 = 0, IES00 = 1)
(4)
set CMS1 and CMS0 bits of TMCC01 register to 0
(5)
set CE bit to enable the counter and start operation
Operation:
(1)
the valid edge input of the TICn0 pin is set as the trigger for capturing the TMC0 register value in
the CCC00 register.
(2)
When this value is captured, an INTCCC00 interrupt is generated.
(Similarly, the valid edge input of the TICn0 pin is set as the trigger for capturing the TMC0 register
value in the CCC01 register. When this value is captured, an INTCCC01 interrupt is generated.)
Summary of Contents for mPD703128
Page 6: ...6 Preliminary User s Manual U15839EE1V0UM00 ...
Page 20: ...20 Preliminary User s Manual U15839EE1V0UM00 ...
Page 32: ...32 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 154: ...154 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 238: ...238 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 356: ...356 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 522: ...522 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 600: ...600 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 610: ...610 Preliminary User s Manual U15839EE1V0UM00 ...
Page 612: ......