Quote:
|
Originally Posted by JohnBrown
What form does the keypad take? Judging from your "code" it has a strobe connected to RB0, and two databits connected to RA0 and RA1. Am I right?
If so, what are the other RA pins connected to? You will probably need to ANDLW 0x03 at some point to isolate bits 0 and 1, otherwise, when you attempt to ADD the keycode into the stored code, it won't work as you expect.
|
I dont know the answer to this question, my professor has mentioned nothing of this. All I know is that RB0 indicates the value on the INT pin on the PIC – when a rising edge (transition from 0 to 1) occurs on this pin, an interrupt is signaled to the PIC. The input values for pins RA2,
RA1, and RA0. RA2 is high when the Enter key is pressed. RA1 and RA0 encode the four number keys into 2-bits. It is assumed that only a single key is pressed at a time. I dont know if that's the answer you're looking for but that's all I know about that.
Quote:
|
Originally Posted by JohnBrown
Do you actually have the hardware to test this on, or are you just programming into a black hole?
|
I'm using MPLAB and I don't have the actual PIC (PIC16F84) but a simulator of it.
Quote:
|
Originally Posted by JohnBrown
You've still not fixed your interrupt routine, which trashes the STATUS register. Also, you seem to have copied the faulty context saving into your grant_deny or whatever it's called.
|
Again, I cannot edit the interrupt routine nor the grant_deny. Those were all given by my professor. The only thing I'm allowed to touch are subroutines starting at "update_pass_code" which is what I have added to his code.