sh6622a SinoWealth Micro-Electronics Corp. Ltd, sh6622a Datasheet - Page 8

no-image

sh6622a

Manufacturer Part Number
sh6622a
Description
Mask 4-bit Microcontroller
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
4. Timer0
SH6622A has one 8-bit timer. The time/counter has the following features:
. 8-bit timer/counter
. Readable and writeable
. Automatic reloadable counter
. 8-prescaller scale is available
. Internal and external clock select
. Interrupt on overflow from $FF to $00
. Edge select for external event
Following is a simplified timer block diagram:
4.1. Configuration and Operation
Timer-0 consists of an 8-bit write-only timer load register
(TL0L, TL0H), and an 8-bit read-only timer counter (TC0L,
TC0H). The counter and load register both have low order
digits and high order digits. The timer counter can be
initialized by writing data into the timer load register (TL0L,
TL0H). Load register programming: Write the low-order digit
first and then the high-order digit. The timer counter is loaded
with the content of load register automatically when the high
order digit is written or counter counts overflow from $FF to
$00.
Timer Load Register: Since the register H would control the
physical READ and WRITE operation. Please follow these
rules:
4.2. Timer0 Interrupt
The timer overflow will generate an internal interrupt request, when the counter counts overflow from $FF to $00. If the interrupt
enable flag is enabled, then a timer interrupt service routine will proceed. This can also be used to wake CPU from HALT mode.
Write Operation:
T0
Low nibble first;
High nibble to update the counter.
Fosc/4
T0E
T0S
SYSTEM CLOCK
8
PRE-SCALER
Read Operation:
T0M
Load Reg. L
Latch Reg. L
High nibble first;
Low nibble followed.
T0C
8-bit timer counter
8-BIT COUNTER
Load Reg. H
SH6622A

Related parts for sh6622a