EM78P312N
8-Bit Microcontroller
5.9.1 Timer Mode
In Timer mode, counting up is performed using the internal clock. When the contents of the
Internal clock |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 | 1 | 2 | 3 | 4 | 5 | n | 0 | 1 | 2 | 3 | ||||
TCR2 | n |
|
|
|
|
|
|
| match |
|
| counter |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
| clear |
|
|
TC2 interrupt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fig. 5-19 Timer Mode Timing Chart
5.9.2 Counter Mode
In Counter mode, counting up is performed using the external clock input pin (TC2 pin) and either rising or falling can be selected by setting TC2ES. When the contents of the
TC2 Pin |
|
|
|
|
|
|
|
|
|
|
|
|
0 | 1 | 2 | 3 | 4 | n | 0 | 1 | 2 | 3 | |||
TCR2 | n |
|
|
|
|
| match |
|
| counter |
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
| clear |
|
|
TC2 interrupt |
|
|
|
|
|
|
|
|
|
|
|
|
| Fig. |
|
|
|
|
|
5.9.3 Window Mode
In Window mode, counting up is performed on the rising or falling edge of the pulse that is logical AND of an internal clock and the TC2 pin (window pulse). When the contents of the
Writing to the TCR2L, the comparison is inhibited until TCR2H is written.
36 • | Product Specification (V1.0) 10.03.2006 |
(This specification is subject to change without further notice)