Chris Camerlin wrote: > > Hey everyone, > I'm trying to use a 4x4 keypad to unlock a door strike using the > PIC16F84. > The keypad format is like this: > 1 2 3 A > 4 5 6 B > 7 8 9 C > * 0 # D > I think I have read the truth table wrong when writing the code. > The truth table is as follows: > b 1 1 0 0 0 1 0 0 0 > u 2 0 1 0 0 1 0 0 0 > t 3 0 0 1 0 1 0 0 0 > t 4 0 0 0 1 1 0 0 0 > o 5 1 0 0 0 0 1 0 0 button locations: > n 6 0 1 0 0 0 1 0 0 1 2 3 4 > > 7 0 0 1 0 0 1 0 0 5 6 7 > 8 > l 8 0 0 0 1 0 1 0 0 9 10 11 12 > o 9 1 0 0 0 0 0 1 0 13 14 15 16 > c 10 0 1 0 0 0 0 1 0 > a 11 0 0 1 0 0 0 1 0 > t 12 0 0 0 1 0 0 1 0 > i 13 1 0 0 0 0 0 0 1 > o 14 0 1 0 0 0 0 0 1 > n 15 0 0 1 0 0 0 0 1 > 16 0 0 0 1 0 0 0 1 > 5 6 7 8 1 2 3 4 > terminal location > > *1's indicate connected terminals when switch is closed > Any help would be appreciated. > Thanks > Chris Camerlin Hi, Chris (This is in the "Tech" section I was talking about, you're doing programming of your chip with that truth table, right? So this is either ON topic, or Tech, not really OT; I think I need to work on the FAQ I'd call it ON topic, you're not using this truth table on a Motorola microcontroller ) That truth table looks fine to me, if you are looking for 1 through 4 from top row of switches to bottom, and 5 through 8 across the bottom of the switches from left to right. I'd guess that you have either a wiring problem, or a code problem; Want to share how the circuit's wired, or the code fragment that's not working? Mark