PDA

View Full Version : Problem - Matrix keypad and Interrupts



Andy Wood
- 21st October 2011, 02:43
I have a 2 row, 6 column matrix keypad connected to Port B of a PIC18F4620. The rows are on RB6-7 and the cols are RB0-5. I am using MisterE's keypad routine and it is generating this warning at compile time:

Warning [202] Argument out of range. Least significant bits used.

The keypad works as expected even though the warning is generated. Not sure why I am getting the warning?


I am also trying to use Darrels' Instant Interrupts to make interrupt driven input from the keypad instead of scanning. When I try to use RBC_INT as an interrupt source, the compiler generates the following error:

Error[101] INT_ENABLE - Priority State Not Found

I can use other interrupt sources (eg.TMR1_INT) without any issues though.

These have me stumped - any input greatly appreciated.

Andy

mackrackit
- 21st October 2011, 03:32
Another crystal ball problem...
Some code will help folks figure out the problem.

Andy Wood
- 24th October 2011, 03:44
Hi Dave,

The problems were created by the nut behind the keyboard. The first problem was caused by not defining the keypad connection correctly. The second problem was due to some redundant code enabling an interrupt source (TMR1-INT) which was no longer defined in the interrupt list. Sometimes you can't see the forest for the trees.....

Andy