Hardware Reference
In-Depth Information
DEFVALx Register
This register is associated with interrupt processing. Interrupts are produced from
conditions arising from input GPIO pins only. An interrupt can be generated if the
input differs from the
DEFVALx
register or if the input value has
changed
. In the project
presented, we simply zero this value because it is not used when detecting
changed
inputs.
DEFVALx Register
GPIO
Address
Bit
7
6
5
4
3
2
1
0
A
0x06
R
Y
Y
Y
Y
Y
Y
Y
Y
B
0x07
W
Y
Y
Y
Y
Y
Y
Y
Y
Reset
0
0
0
0
0
0
0
0
DEFVALx Bit Value
0
Interrupt when input not 0
1
Interrupt when input not 1
INTCONx Register
This register specifies how input comparisons will be made. In our project, we set all
these bits to 0 so that inputs interrupt on
change
.
INTCONx Register
GPIO
Address
Bit
7
6
5
4
3
2
1
0
A
0x08
R
Y
Y
Y
Y
Y
Y
Y
Y
B
0x09
W
Y
Y
Y
Y
Y
Y
Y
Y
Reset
0
0
0
0
0
0
0
0
INTCONx Bit Value
0
Input compared against its previous value
1
Input compared against DEFCONx bit value