Hardware Reference
In-Depth Information
Input change : flags 8000 values F0F0
Outputs : 070F
Input change : flags 8000 values 70F0
Outputs : 0F0F
^C
$
While this was running, I carefully grounded pin 28 of the MCP28017 chip, which is
input GPA7 . This is reflected immediately in the message:
Input change : flags 8000 values 70F0
The flags value reported as 8000 is decoded next, showing that GPA7 did indeed
change in value:
INTFA
INTFB
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
The value reported as 70F0 is from the INTCAPx register pair:
INTCAPA
INTCAPB
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
0
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
This shows us that the GPA7 pin is found in the zero state at the time of the interrupt.
All remaining inputs show high (0s indicate output pins).
While I grounded the GPA7 pin only once, you can see from the session output that
several events occur. This is due to the bounce of the wire as it contacts. You'll also note
that some events are lost during this bounce period. Look at the input events:
1 Input change: flags 8000 values 70F0
2 Input change: flags 8000 values F0F0
3 Input change: flags 8000 values F0F0
4 Input change: flags 8000 values F0F0
5 Input change: flags 8000 values F0F0
6 Input change: flags 8000 values 70F0
 
Search WWH ::




Custom Search