sh66k51a SinoWealth Micro-Electronics Corp. Ltd, sh66k51a Datasheet - Page 17

no-image

sh66k51a

Manufacturer Part Number
sh66k51a
Description
2k 4-bit Micro-controller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
Controlling the Pull-high Resistor
These ports contained pull-high resistor controlled by the program. PULLEN register controls On/Off of all pull-high resistors
simultaneously. Pull-high resistor is also controlled by the port data registers (PA, PB, PC, PD, PE) of each port. Thus, the
pull-high resistor can be turned on and off individually.
To turn on the pull-high resistor, PULLEN must be set to “1”, and write “1” to the port data register.
System Register $13 (Pull-high resistor control register)
PULLEN
System Register $14 - $15
OXS: 0: OSCX set as ceramic oscillator (Default)
O/S0: 0: select PORTC as I/O ports
O/S1: 0: select PORTD as I/O ports
The default value of O/S0, O/S1 is “1”, after Power on/Pad/LVR reset. It means that the PORTC, PORTD is shared to
Segment 1 - 8 and output GND after Power on/Pad/LVR reset. So, the PORTC, PORTD shouldn’t be pulled high by
external signal source to avoid the additional leakage current when resetting.
Ports as Key Matrix
SH66K51A’s I/O can be made up of key matrix and PORTC - PORTD can use as LCD segment output at the same time. In
this application, user should control the scanning key matrix sharing the timing of LCD display. Only when user scans the
key matrix that all the Ports are used as I/O; otherwise PORTC, PORTD is use as LCD segment output to drive LCD panel.
The Ports used as I/O or segment is controlled by software.
In scan key application, when user doesn’t execute the operation of scan key, those Ports that don’t share as the LCD
segment output should be set as I/O, disable it’s pull high resistor and input/output access by write system register ($16 -
$1C) ’s corresponding bit. Execute the above operation can prevent LCD voltage input to the general I/O Ports and Port’s
pull high or the output will affect the LCD segment’s waveform.
When user wants to scan key all ports, which made up of the key matrix, it should be used as general I/O, the ports’ pull
high resistor and input access should be enabled by clear the system register ($16, $17) ’s corresponding bit.
Address
Address
$13
$14
$15
1: OSCX set as RC oscillator, and set OSCXI/OSCXO as PORTE
1: select PORTC as LCD Segment 1 - 4 (Default)
1: select PORTD as LCD Segment 5 - 8 (Default)
PULLEN
1 = Enable PORT pull-high
0 = Disable PORT pull-high (default)
Port pull-high enables control
O/S1
Bit 3
Bit 3
OXS
CPS2
O/S0
Bit 2
Bit 2
-
(
I/O Share Control Register)
DUTY1
CPS1
OXM
Bit 1
Bit 1
DUTY0
OXON
CPS0
Bit 0
Bit 0
R/W
R/W
R/W
R/W
R/W
17
Bit2 - 0: Carrier counter source pre-divider
Bit3: Port pull high enable control
Bit0: Turn on OSCX oscillator
Bit1: CPU clocks select (1: OSCX / 0: OSC)
Bit3: OSCX type selection
Bit0, 1: Select LCD duty (1/3, 1/4, 1/5 or 1/6)
Bit2: Set PORTC as LCD SEG1 - 4
Bit3: Set PORTD as LCD SEG5 - 8
Remarks
Remarks
SH66K51A

Related parts for sh66k51a