sh66k31c SinoWealth Micro-Electronics Corp. Ltd, sh66k31c Datasheet - Page 12

no-image

sh66k31c

Manufacturer Part Number
sh66k31c
Description
Mask 4-bit Micro-controller
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
7. Timer
The device has one 8-bit auto re-load timer/counter.
The timer/counter has the following features:
The following is a simplified timer block diagram.
The timers provide the following functions:
- Programmable interval timer function.
- Read counter value.
7.1. Timer0 Configuration and Operation
The Timer0 consists of an 8-bit write-only timer load register
(TL0L, TL0H) and an 8-bit read-only timer counter (TC0L,
TC0H). Each of them has low order digits and high order
digits. Writing data into the timer load register (TL0L, TL0H)
can initialize the timer counter.
The low-order digit should be written first, and then the
high-order digit. The timer counter is automatically loaded
7.2. Timer Mode Register
The timer can be programmed in several different prescalers by setting Timer Mode register (TM0).
The 8-bit counter prescaler overflow output pulses. The Timer Mode registers (TM0) are 3-bit registers used for the timer
control as shown in Table 1. These mode registers select the input pulse sources into the timer.
Table 1. Timer0 Mode Register
- 8-bit up-counting timer/counter.
- Automatic re-load counter.
- 8-level prescaler.
- Interrupt on overflow from $FF to $00.
TM0.2
T0
System
0
0
0
0
1
1
1
1
clock
EOR
T0E
TM0.1
0
0
1
1
0
0
1
1
MUX
T0S
TM.2
TM0.0
Prescaler
t
TM.1
0
1
0
1
0
1
0
1
osc
TM.0
SYNC
Prescaler Divide Ratio
COUNTER
/2
8-BIT
11
(initial)
/2
/2
/2
/2
/2
/2
/2
9
7
5
3
2
1
0
12
with the contents of the load register when the high order
digit is written or counter counts overflow from $FF to $00.
Timer Load Register: Since the register H controls the
physical READ and WRITE operations.
Please follow these steps:
Write Operation:
Read Operation:
Low nibble first
High nibble to update the counter
High nibble first
Low nibble followed.
System clock/T0
System clock/T0
System clock/T0
System clock/T0
System clock/T0
System clock/T0
System clock/T0
System clock/T0
Clock Source
Load Reg. L
Latch Reg. L
8-bit timer counter
Load Reg. H
SH66K31C

Related parts for sh66k31c