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

no-image

sh66k51a

Manufacturer Part Number
sh66k51a
Description
2k 4-bit Micro-controller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
System Register $16 - $17
PAIN…PEIN: In the key matrix’s application, control PORTA - PORTE input and output access.
0: Enable PORTA - PORTE pull-high resistor and I/O access, Ports in normal state
1: Disable PORTA - PORTE pull-high resistor and its I/O access
Port Interrupt
The PORTB and PORTC are used as port interrupt sources. Since PORT I/O is bit programmable I/O, so only the input port
can generate an external interrupt. Any one of the PORTB and PORTC input pin transitions from V
generate an interrupt request. Further falling edge transition would not be able to make an interrupt request until all of the
input pins have returned to V
Port interrupt PROGRAMMING NOTES:
If user wants to generate an interrupt when a falling edge from V
executed.
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 resistor or set PULLEN to “1”).
3. And further falling edge transition would not be able to make interrupt request until all of the pins return to V
When PORTC is shared to the segment, user can only generate interrupt on PORTB.
Address
$16
$17
INT application.
PAIN
Bit 3
-
PORTC.n
PORTB.n
PBIN
Bit 2
-
(
DD
Key Matrix’s IO Ports control register)
Note: n = 0, 1, 2, 3
PBCR.n
PCCR.n
. The following is the port interrupts function block-diagram.
PCIN
Bit 1
-
PDIN
PEIN
Bit 0
PORT Interrupt Block Diagram
R/W
R/W
R/W
Edge Detector
18
Falling
Control PORTA - PORTD input and output access enable
or disable. Used in key matrix’s application
Control PORTE input and output access enable or
disable. Used in key matrix’s application
DD
to GND emerges on the port, the following must be
IEP
IRQP
Remarks
Port Interrupt
DD
SH66K51A
to GND would
DD
in PBC

Related parts for sh66k51a