sh66l10a SinoWealth Micro-Electronics Corp. Ltd, sh66l10a Datasheet - Page 10

no-image

sh66l10a

Manufacturer Part Number
sh66l10a
Description
2k 4-bit Micro-controller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
Controlling the Pull-up MOS
System Register $15:
These ports contain pull-up MOS controlled by program. System register $15 Bit3 (PPULL) simultaneously controls ON/OFF of
all pull-up MOS. Pull -up MOS is also controlled by the port data registers (PA, PB, PC, and PD) of each port. (Write 0 could turn
off the pull-up MOS.) Thus the pull-up MOS can be turned ON/OFF individually.
If the “Single solar supply application” code option is enabled, the pull-up MOS is also controlled by the port I/O control registers
(PACR, PBCR, PCCR, and PDCR) of each port. Only when the port is used as input, the PPULL (System register $15 Bit3) is
available. That means when the port is used as output, the relevant pull-up MOS will be turned off even if the PPULL system
register $15 Bit3 is set to 1 as well as the port data register.
PORTB, PORTC Interrupt
The PORTB and PORTC are used as the port interrupt sources. Following is the port interrupt function block-diagram.
Port Interrupt (PBC INT) programming notes:
If “Single solar supply application” is enabled:
In order to correctly return from the port interrupt-processing subroutine, the low level applying on the port must be
released before the relative IRQ flag clearing and IE resetting. Otherwise, it is possible to reenter the active interrupt.
When PORTC is used as segment, user can generate interrupt only on PORTB.
External Interrupt
PORTA.0 is shared with external interrupt (Low active).
If the “Single solar supply application” code option is disabled, an external interrupt will occur when a low level emerges on the
PORTA.0.
If the “Single solar supply application” code option is enabled, the external interrupt is available only when
In order to correctly return from the external (PORTA.0) interrupt-processing subroutine, the low level applying on the
PORTA.0 must be released before the relative IRQ flag clearing and IE resetting. Otherwise, it is possible to reenter
the active interrupt.
Address
If user wants to generate an interrupt when a low level emerges on the port, the following must be executed.
$15
1. Set the port as input port, fill port data register with “1” and avoid port floating.
2. Pull-high the port (Use external pull-high resistance or set PULL to “1”).
1. Set the port as input port, fill port data register with “1” and avoid port floating.
2. Pull-high the port (Use external pull-high resistance or set PPULL to “1”).
PPULL
Bit 3
1
0
PB.n
PC.n
O/S2
Bit 2
Note: n = 0, 1, 2, 3
X
X
PCCR.n
PBCR.n
O/S1
Bit 1
X
X
Bit 0
PBCFR
X
X
-
Edge Detector
R/W
R/W
Falling
10
Bit3: Port pull-up control register
Port Pull-high enable
Port Pull-high disable
IEP
IRQP
Remarks
Port Interrupt
SH66L10A

Related parts for sh66l10a