I have a post in the microcontroller section of the forums with my code and schematic. But I have a few quetions just about matrix switches. The matrix switch I am messing around with is 3 columns and 4 rows. I have it connected to PORTB using the internal pullups.
From what I am reading, I have to pulse PORTB high (or at least the pins connected to my columns (which in this case would be RB0, RB1, RB7)). I simply do this with the statement(s):
Is that correct?
Then I have to read the status of the rows (RB3..RB6) to see which one is high. Should I use maybe an if statement, to read that status?
Thanks for any help given.
Much appreciated.
From what I am reading, I have to pulse PORTB high (or at least the pins connected to my columns (which in this case would be RB0, RB1, RB7)). I simply do this with the statement(s):
Rich (BB code):
RB0 = 1;
RB1 = 1;
RB7 = 1;
Then I have to read the status of the rows (RB3..RB6) to see which one is high. Should I use maybe an if statement, to read that status?
Thanks for any help given.
Much appreciated.