sh6613d SinoWealth Micro-Electronics Corp. Ltd, sh6613d Datasheet - Page 15

no-image

sh6613d

Manufacturer Part Number
sh6613d
Description
4k 4-bit Microcontroller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
9. Timer 0
SH6613D 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:
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 of them 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 Table1.
The register selects the input clock sources in the timer.
Table1: 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
TM0.3
0
0
0
0
0
0
0
0
• Programmable internal timer function
• Read the counter values
High nibble to update the counter
TM0.2
Write Operation:
0
0
0
0
1
1
1
1
Low nibble first
TM0.1
0
0
1
1
0
0
1
1
TM0.0
0
1
0
1
0
1
0
1
1: Auto-Reload function
7
(128).
15/33
15
(65536).
Prescaler
External
/2048
/512
/128
/32
/8
/4
/2
Low nibble follows
Read Operation
High nibble first
System clock
System clock
System clock
System clock
System clock
System clock
System clock
Clock Source
INT
0
SH6613D
V1.0

Related parts for sh6613d