I have a 4x4 keypad connected to portb with the pull ups enabled. Previously I had been checking the keypad in my main code, but now would like to change my code to use interrupts rather.
I tried int_rb, but couldn't come right
I then tried int_rtcc - and didn't come right.
I now have timer1 enabled and it is occassionally reading the keypad.
Is this the best way of trying to read the keypad through interrupts?
I am using a pic18f4523
My crystal is 20MHz
and timer1 is setup as follows
Code:
setup_timer_1(T1_INTERNAL|T1_DIV_BY_1); //26.2 ms overflow
setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
enable_interrupts(INT_TIMER1);
enable_interrupts(GLOBAL);
Many thanks
Delene
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
Posted: Mon Nov 07, 2011 8:23 am
In Search enter the three words: keypad, matrix and interrupts then set to "Search for All terms" and you will find this:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum