sh66k12 SinoWealth Micro-Electronics Corp. Ltd, sh66k12 Datasheet - Page 9

no-image

sh66k12

Manufacturer Part Number
sh66k12
Description
Mask 4-bit Microcontroller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
5. I/O PORT
SH66K12 has 16 I/O pins. Each I/O pins are bit programmable. I/O pins are CMOS (Default) or Open Drain by code option.
(a) PORTA, PORTB, PORTC and PORTD
Each of these ports contains 4 bit I/O pins. Port I/O mapping address is shown as follows:
If ports are pull-high internally, it is weak drive. The equivalent circuit is below:
6. Timer
SH66K12 has two 8-bit timers. The timer/counter has the
following features:
The following is a simplified timer block diagram.
(a) Timer0 and Timer1 Configuration and Operation
Both the Timer0 and Timer1 consist of an 8-bit write-only
timer load register (TL0L, TL0H; TL1L, TL1H) and an 8-bit
read-only timer counter (TC0L, TC0H; TC1L, TC1H). Each of
them has low order digits and high order digits. Writing data
into the timer load register (TL0L, TL0H; TL1L, TL1H) 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
with the contents of the load register when the high order
digit is written or counter counts overflow from $FF to $00.
- 8-bit up-counting timer/counter.
- Automatic re-loads counter.
- 8-bit prescaler.
- Interrupt on overflow from $FF to $00.
Fosc/4
Address
PRE-SCALER
T0M (T1M)
$0A
$0B
$08
$09
Tosc
SYNC
PORT C.3
PORT D.3
PORT A.3
PORT B.3
Bit3
8-BIT COUNTER
Wr-Time
Data-Out
Data-In
PORT C.2
PORT D.2
PORT A.2
PORT B.2
Bit2
9
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.
I/O PAD
Load Reg. L
Latch Reg. L
PORT C.1
PORT D.1
PORT A.1
PORT B.1
8-bit timer counter
Bit1
Load Reg. H
PORT C.0
PORT D.0
PORT A.0
PORT B.0
SH66K12
Bit0

Related parts for sh66k12