English
Language : 

SM59R16A2 Datasheet, PDF (30/67 Pages) SyncMOS Technologies,Inc – 8-Bit Micro-controller
SM59R16A2/SM59R08A2
8-Bit Micro-controller
64KB/32KB ISP Flash & 2KB RAM embedded
8.1 Timer 2 function
Timer 2 can operate as timer, event counter, or gated timer as explained later.
8.1.1 Timer mode
In this mode Timer 2 can be incremented in every 12 machine cycles or in every 24 machine cycles
depending on the 2:1 prescaler. The prescaler is selected by bit T2PS in register T2CON.
8.1.2 Event counter mode
In this mode, the timer is incremented when external signal T2 change value from 1 to 0. The T2
input is sampled in every cycle. Timer 2 is incremented in the cycle following the one in which the
transition was detected.
8.1.3 Gated timer mode
In this mode, the internal clock which incremented timer 2 is gated by external signal T2.
8.1.4 Reload of Timer 2
Reload (16-bit reload from the crc register) can be executed in the following two modes:
Mode 0: Reload signal is generate by a Timer 2 overflows - auto reload
Mode 1: Reload signal is generate by a negative transition at the corresponding input pin T2EX.
8.2 Compare function
In the four independent comparators, the value stored in any compare/capture register is compared
with the contents of the timer register. The compare modes 0 and 1 are selected by bit T2CM. In
both compare modes, the results of comparison arrives at Port 1 within the same machine cycle in
which the internal compare signal is activated. The port pins P1.2 to P1.5 are the outputs of CC0 to
CC3.
8.2.1 Compare Mode 0
In mode 0, when the value in Timer 2 equals the value of the compare register, the output signal
changes from low to high. It goes back to a low level on timer overflow. In this mode, writing to the
port will have no effect, because the input line from the internal bus and the write-to-latch line are
disconnected. The following figure illustrates the function of compare mode 0.
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M034
30
Ver.B SM59R16A2/SM59R08A2 06/2009