sm59d04g2 SyncMOS Technologies,Inc, sm59d04g2 Datasheet - Page 21

no-image

sm59d04g2

Manufacturer Part Number
sm59d04g2
Description
8-bits Micro-controller 16kb+ Isp Flash & 1kb Ram Embedded
Manufacturer
SyncMOS Technologies,Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
sm59d04g2C25JP
0
SM59D04G2
8-Bits Micro-controller
16KB+ ISP Flash & 1KB RAM embedded
6
Timer 0 and Timer 1
These timer and counter functions are presented in the same module. The “timer” or “counter”
function is selected by the control bits C/ T in SFR TMOD. Timer 0 and Timer 1 have four operation
modes, which are selected by bit-pairs (M1, M0) in SFR TMOD. Mode 0, 1, and 2 are the same for
both timer and counters. Mode 3 is different. The four operating modes are described below:
6.1
Mode 0
In this mode, the timer register is configured as a 13-bit register. Take Timer 1 as the example, as
the counter rolls over from all 1s to all 0s, it sets the Timer 1 interrupt flag TF1. The counter input is
enabled by the timer when TR1 = 1 and either GATE = 0 or
= 1, here setting GATE = 1
INT
1
allows the timer to be controlled by external input
INT , to facilitate pulse width measurements.
1
TR1 is a control bit in the SFR TCON and GATE is in TMOD.
The 13-bit register consists of all 8 bits of TH1 and the lower 5 bits of TL1. The upper 3 bits of TL1
are indeterminate and should be ignored. Setting the run flag (TR1) does not clear the registers.
Mode 0 operation is the same for Timer 0 and Timer 1. So substituting TR0, TF0 and
for the
INT
0
corresponding Timer 1 signals in the last paragraph, we can know the operation of Mode 0 for Timer
0. But there are two different GATE bits, one is for Timer 1(TMOD.7) and the other one is for Timer 0
(TMOD.3).
/12
OSC
C/ = 0
T
TL1
TH1
TF1
Interrupt
(5 bits)
(8 bits)
C/ = 1
T
Control
T1 pin
TR1
GATE
pin
INT
1
Fig. 6-1: Mode 0 operation for Timer 1
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M031
21
Ver.C SM59D04G2 07/2009

Related parts for sm59d04g2