SPC81A1
6.15. Timer/Counter
The SPC81A1 contains two 12-bit timer/counters, TMA and TMB
respectively. TMA can be specified as a timer or a counter, but
TMB can only be used as a timer. In the timer mode, TMA and
TMB are re-loaded up-counters.
When timer overflows from
$0FFF to $0000, the carry signal will make the timer automatically
reload to the user’s pre-set value and be up-counted again. At the
same time, the carry signal will generate the INT signal if the
corresponding bit is enabled in the INT ENABLE Register. If TMA
is specified as a counter, users can reset by loading #0 into the
counter. After the counter has been activated, the value of the
counter can also be read from the counters at the same time.
Clock source of Timer/Counter can be selected as follows:
Timer/Counter
Clock Source
12-BIT TIMER
CPU CLOCK (T) or T/4
TMA
12-BIT COUNTER
T/64, T/8192, T/65536 or EXT
CLK
TMB
12-BIT TIMER
T or T/4
MODE SELECT REGISTER TMA only, select timer or counter
TIMER CLOCK SELECTOR Select T or T/4
© Sunplus Technology Co., Ltd.
Proprietary & Confidential
8
SEP. 06, 2001
Version: 1.3