sh66p51 SinoWealth Micro-Electronics Corp. Ltd, sh66p51 Datasheet - Page 19

no-image

sh66p51

Manufacturer Part Number
sh66p51
Description
Otp 2k 4-bit Micro-controller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
sh66p51AF
Manufacturer:
SINOWEATH
Quantity:
214
Part Number:
sh66p51AF
Manufacturer:
SINOWEATH
Quantity:
20 000
Part Number:
sh66p51AH
Manufacturer:
SINOWEATH
Quantity:
3 000
Part Number:
sh66p51P
Manufacturer:
SINOWEA
Quantity:
8 000
I/O Share Control Register
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 reset.
Controlling the Pull-high MOS
These ports contain pull-high MOS controlled by the program. PULLEN register controls On/Off of all pull-high MOS
simultaneously. Pull-high MOS is controlled by the port data registers (PA, PB, PC, PD, PE) of each port also. Thus, the
pull-high MOS 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.
Port Function Control is below:
PULLEN
Ports as Key Matrix
SH66P51’s I/O can make up of key matrix and PORTC - PORTD can use as LCD segment output as same time. In this
application, user should control that scanning key matrix share the timing of LCD display. Only when user scan key matrix,
all of Ports are used as I/O; otherwise PORTC, PORTD 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 operation of scan key, Ports which don’t share as LCD segment output
should be set as I/O, disabled it’s pull high resistor and input/output access by write system register ($16 - $1C) ’s
corresponding bit. Execute above operation can prevent LCD voltage input to the general I/O Ports and Port’s pull high or
output affect the LCD segment’s waveform.
When user wants to scan key, all ports, which make up of the key matrix 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
$14
$15
$13
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(power-on initialization)
Port Pull-low enables control
O/S1
Bit 3
OXS
Bit 3
CPS2
O/S0
Bit 2
Bit 2
-
DUTY1
CPS1
OXM
Bit 1
Bit 1
DUTY0
OXON
CPS0
Bit 0
Bit 0
R/W
R/W
R/W
R/W
R/W
19
Bit0: Turn on OSCX oscillator
Bit1: CPU clocks select (1: OSCX/0: OSC)
Bit3: OSCX type selection
Bit0, 1: Select LCD DUTY (1/3 or 1/4 or 1/5 or 1/6)
Bit2: Set PORTC as LCD Segment1 - 4
Bit3: Set PORTD as LCD Segment5 - 8
Bit2 - 0: Carrier counter source pre-divider
Bit3: Port pull high enable control
Remarks
Remarks
SH66P51

Related parts for sh66p51