ML51/ML54/ML56
Sep. 01, 2020
Page
382
of 719
Rev 2.00
ML
51
/ML
54
/ML
5
6 S
E
RI
E
S
TECHNI
CA
L
RE
F
E
R
E
NC
E
M
A
NU
A
L
ML51/M
L54
/M
L56
Series
Tec
hnical Reference
Manual
6.4.3
Pin Interrupt (PIT)
The ML51/ML54/ML56 Series provides pin interrupt input for each I/O pin to detect pin state if button
or keypad set is used. A maximum 8-channel pin interrupt detection can be assigned by I/O port
sharing. The pin interrupt is generated when any key is pressed on a keyboard or keypad, which
produces an edge or level triggering event. Pin interrupt may be used to wake the CPU up from Idle or
Power-down mode.
Each channel of pin interrupt can be enabled and polarity controlled independently by PIPEN and
PINEN register. PICON selects which port that the pin interrupt is active. It also defines which type of
pin interrupt is used
– level detect or edge detect. Each channel also has its own interrupt flag. There
are total eight pin interrupt flags located in PIF register. The respective flags for each pin interrupt
channel allow the interrupt service routine to poll on which channel on which the interrupt event
occurs. All flags in PIF register are set by hardware and should be cleared by software.
(PIPS7[2:0])
Px.0
Px.1
Px.2
Px.3
P0
P1
P2
P3
P4
P5
Px.4
Px.5
Px.6
Px.7
(PIPS7[6:4])
(PIPS1[2:0])
Px.0
Px.1
Px.2
Px.3
P0
P1
P2
P3
P4
P5
Px.4
Px.5
Px.6
Px.7
(PIPS1[6:4])
(PIPS0[2:0])
Px.0
Px.1
Px.2
Px.3
P0
P1
P2
P3
P4
P5
Px.4
Px.5
Px.6
Px.7
(PIPS0[6:4])
Pin Interrupt
PIF0
PINEN0
PIPEN0
PIT0
PIF1
PINEN1
PIPEN1
PIT1
PIF7
PINEN7
PIPEN7
PIT67
0
1
0
1
0
1
Pin Interrupt Channel 0
Pin Interrupt Channel 1
Pin Interrupt Channel 7
000
001
010
011
100
101
000
001
010
011
100
101
000
001
010
011
100
101
000
111
110
101
100
011
010
001
000
111
110
101
100
011
010
001
000
111
110
101
100
011
010
001
P6
110
P6
110
P6
110
Figure 6.4-5 Pin Interface Block Diagram
Pin interrupt is generally used to detect an edge transient from peripheral devices like keyboard or
keypad. During idle state, the system prefers to enter Power-down mode to minimize power
consumption and waits for event trigger. Pin interrupt can wake up the device from Power-down mode.