
!
JA32050
Timers and WDT
The JA32050 contains two16-bit timers (TMR0, TMR1) and one watchdog timer (WDT). The registers related
to timers are TMR (timer content) and TMRC (timer control).
TMR0 (05h,06h) & TMR0C (07h)
The TMR0 is a 16-bit count-up counter. The clock source may come from system clock (Fsys/4),
internal RC clock, external pulse input (SC) or external 32k crystal. The default value of the control
register TMR0C is 00. The definition of TMR0C is listed as following:
Labels
TON0 (TMR0)
Bits
0
Function
Timer0 enable/disable definition bit
0 = Disable; 1 = Enable
Timer clock rate selection bits (prescale)
Reserved
TS2, TS1, TS0
3 - 1
4
TMR/WDT
5
To assign pre-scale counter to Timer0 or WDT
0: Timer
1: WDT
To define the operation mode
00= Timer mode (system clock/4)
01= Timer mode (internal RC clock)
10= Event count mode from external SC pin
11= Timer mode (32.768k Hz crystal)
TM1, TM0
7, 6
Both TMR0 and WDT share with an 8-bit prescaler. If the prescaler is assigned to TMR0, the WDT clock will
be 1:1 to the clock source (no prescale function), vice versa. The ratio table is shown below:
TS2
0
0
0
0
1
1
1
1
TS1
0
0
1
1
0
0
1
1
TS0
0
1
0
1
0
1
0
1
TMR Rate
1:2
1:4
1:8
1:16
1:32
1:64
1:128
1:256
WDT Rate
1:1
1:2
1:4
1:8
1:16
1:32
1:64
1:128
TMR1 (08h, 09h) & TMR1C (0Ah)
The TMR01is a 16-bit count-up counter. The clock source may come from system clock, internal RC
clock, external pulse input or external 32k crystal. The default value of the control register TMR1C is 00.
The definition of TMR0C is listed as following:
Labels
Bits
TON1
0
Timer1 enable/disable definition bit
0 = Disable; 1 = Enable
TS2, TS1, TS0
3 - 1
Timer clock source selection bits
4
Reserved
Function
TMROUT
5
This bit has to be set to “0”; SC is configured as input pin.
TM1, TM0
7, 6
To define the operation mode
00= Timer mode (system clock/4)
01= Timer mode (internal RC clock)
10= Event count mode from External SC pin
11= Timer mode (32.768k crystal)
There is an 8-bit prescaler dedicated to TMR1. The ratio table is shown below:
Preliminary
TEL
Κ
886-3-5770755 FAX
Κ
886-3-5770756 E-mail
Κ
sales@jaztek.com.tw Web-site
Κ
www.jaztek.com.tw
19-8
Ver.0.0