1 port pin example 1: driving outputs on port 0, 2 port pin example 2: receiving inputs on port 1, 2 external interrupt register descriptions – Maxim Integrated MAXQ610 User Manual
Page 100: 6 .2 external interrupt register descriptions -7, Maxq610 user’s guide
6-7
MAXQ610 User’s Guide
Bits 5:0: Input/Output Direction for Port 4. The bits in this register control the input/output direction for port pins P4 .0
to P4 .5 . When PD4 .n is set to 0, the corresponding port pin (P4 .n) acts as an input with characteristics determined by
PO4 .n . When PD4 .n is set to 1, the port pin acts as an output, driving the output state given by PO4 .n .
6.1.1 Port Pin Example 1: Driving Outputs on Port 0
move PO0, #000h ; Set all outputs low
move PD0, #0FFh ; Set all P0 pins to output mode
6.1.2 Port Pin Example 2: Receiving Inputs on Port 1
move PO1, #0FFh ; Set weak pullups ON on all pins
move PD1, #000h ; Set all P1 pins to input mode
nop
; Wait for external source to drive P1 pins
move Acc, PI1
; Get input values from P1 (will return FF if
; no other source drives the pins low)
6.2 External Interrupt Register Descriptions
Each bit in this register is set when a negative edge or a positive edge (depending on the ITn bit setting) is detected
on the corresponding interrupt pin . Once an external interrupt has been detected, the interrupt flag bit will remain
set until cleared by software or a reset . Setting any of these bits causes the corresponding interrupt to trigger if it is
enabled to do so .
Bit 7: External Interrupt 7 Edge Detect (IE7)
Bit 6: External Interrupt 6 Edge Detect (IE6)
Bit 5: External Interrupt 5 Edge Detect (IE5)
Bit 4: External Interrupt 4 Edge Detect (IE4)
Bit 3: External Interrupt 3 Edge Detect (IE3)
Bit 2: External Interrupt 2 Edge Detect (IE2)
Bit 1: External Interrupt 1 Edge Detect (IE1)
Bit 0: External Interrupt 0 Edge Detect (IE0)
Register Name
PD4
Register Description
Port 4 Direction Register
Register Address
M2[10h]
Register Name
EIF0
Register Description
External Interrupt Flag 0 Register
Register Address
M0[06h]
Bit #
7
6
5
4
3
2
1
0
Name
—
—
PD4 .5
PD4 .4
PD4 .3
PD4 .2
PD4 .1
PD4 .0
Reset
0
0
s
s
s
s
s
s
Access
rw
rw
rw
rw
rw
rw
rw
rw
Bit #
7
6
5
4
3
2
1
0
Name
IE7
IE6
IE5
IE4
IE3
IE2
IE1
IE0
Reset
0
0
0
0
0
0
0
0
Access
rw
rw
rw
rw
rw
rw
rw
rw