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

no-image

sh66l06a

Manufacturer Part Number
sh66l06a
Description
1k 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 and PB) 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 and PBCR) 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 Interrupt
The PORTB is used as the port interrupt source. Following is the port interrupt function block-diagram.
Port Interrupt (PB 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.
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
Bit 2
Note: n = 0, 1, 2, 3
X
X
1
PBCR.n
Bit 1
X
X
1
Bit 0
X
X
-
PBFR
Edge Detector
R/W
R/W
Falling
9
Bit3: Port pull-up control register
Port Pull-high enable
Port Pull-high disable
IEP
IRQP
Port Interrupt
Remarks
SH66L06A

Related parts for sh66l06a