sh6614 SinoWealth Micro-Electronics Corp. Ltd, sh6614 Datasheet - Page 18

no-image

sh6614

Manufacturer Part Number
sh6614
Description
4k 4-bit Microcontroller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
9. Timer 0
SH6614/B/C has one 8-bit timer. The timer consists of an 8-bit up counter and an 8-bit preload register.
The timers provide the following functions:
- Programmable internal timer function
- Read the counter values
9.1. Timer 0 configuration and operation
The timer 0 consists of an 8-bit write-only timer load register (TL0L, TL0H) and an 8-bit read-only timer counter (TC0L, TC0H).
Each has low order digits and high order digits. The timer counter can be initialized by writing data into the timer load register
(TL0L, TL0H). Write the low-order digit first and then the high-order digit. The timer counter is loaded with the content of the load
register automatically when the high order digit is written or counts overflow happens. The timer overflow will generate an
interrupt, if the interrupt enable flag is set.
The timer can be programmed in several different system clock sources by setting the Timer Mode register (TM0).
Timer 0 reads and writes operations follow these rules:
9.2. Timer0 mode register (TM0)
The 8-bit counter counts prescaler overflow output pulses. TM0 are 4-bit registers used for timer control as shown in Table 1.
The register selects the input clock sources in the timer.
Table 1. Timer0 Mode registers ($02)
TM0.3 control function:
0: without Auto-Reload function
9.3. Warm-up counter
In RC mode, the warm-up counter prescaler is divided by 2
In CRYSTAL mode, the warm-up counter prescaler is divided by 2
High nibble to update the counter
TM0.3
0
0
0
0
0
0
0
0
Write Operation
Low nibble first
TM0.2
0
0
0
0
1
1
1
1
TM0.1
0
0
1
1
0
0
1
1
TM0.0
1: Auto-Reload function
0
1
0
1
0
1
0
1
Low nibble follows
Read Operation
High nibble first
7
(128).
18
15
(65536).
Prescaler
External
/2048
/512
/128
/32
/8
/4
/2
Clock Source
System clock
System clock
System clock
System clock
System clock
System clock
System clock
SH6614/B/C
INT
0

Related parts for sh6614