Koosiekloek
New Member
good day
i am using a PIC16F627A for decoding a key pressed and sending to another controller.
the program is running and doing most of what it should.
the process should be to pull the 4 columns high one by one namely PB4, PB5, PB6, PB7 and test each row namely RA0, RA1, RA2, RA3 for which button is being pressed, if a button is pressed it should wait until the button is released and then put the decoded key value on the 4 output pins PB0, PB1, PB2, PB3 and then toggle PA6 to say data is available.
the problem is when a button is pressed say in column 1 row 1 and the button is held down while another button in the same column is pressed say column 1 row 2, the PA6 pin is toggled when the button in row 2 is pressed and toggled again when the button in row 1 is released.
can anyone please tell me what i am doing wrong?
my code below.
i am using a PIC16F627A for decoding a key pressed and sending to another controller.
the program is running and doing most of what it should.
the process should be to pull the 4 columns high one by one namely PB4, PB5, PB6, PB7 and test each row namely RA0, RA1, RA2, RA3 for which button is being pressed, if a button is pressed it should wait until the button is released and then put the decoded key value on the 4 output pins PB0, PB1, PB2, PB3 and then toggle PA6 to say data is available.
the problem is when a button is pressed say in column 1 row 1 and the button is held down while another button in the same column is pressed say column 1 row 2, the PA6 pin is toggled when the button in row 2 is pressed and toggled again when the button in row 1 is released.
can anyone please tell me what i am doing wrong?
my code below.