Just curious, since I am playing around with a Keypad, I notice GC creates a line as: #define Keypad Portx (x=Port ID)
-
can I split the Columns to a different Port than the Rows?
-
example: #define KEYPAD_COL_1 PORTD.0 #define KEYPAD_COL_2 PORTD.1 #define KEYPAD_COL_3 PORTD.2 #define KEYPAD_COL_4 PORTD.3 #define KEYPAD_ROW_1 PORTD.4 #define KEYPAD_ROW_2 PORTD.5 #define KEYPAD_ROW_3 PORTD.6 #define KEYPAD_ROW_4 PORTD.7 ,
..
and if so, what Port should get the designated Port for '#define KeypadPort ' the rows or columns?
thanks, vic
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just curious, since I am playing around with a Keypad, I notice GC creates a line as:
#define Keypad Portx (x=Port ID)
-
can I split the Columns to a different Port than the Rows?
-
example:
#define KEYPAD_COL_1 PORTD.0
#define KEYPAD_COL_2 PORTD.1
#define KEYPAD_COL_3 PORTD.2
#define KEYPAD_COL_4 PORTD.3
#define KEYPAD_ROW_1 PORTD.4
#define KEYPAD_ROW_2 PORTD.5
#define KEYPAD_ROW_3 PORTD.6
#define KEYPAD_ROW_4 PORTD.7
,
..
and if so, what Port should get the designated Port for '#define KeypadPort ' the rows or columns?
thanks, vic
Either #define as a keypadport -OR- #define keypad col and rows as you wish to whatever individual ports & pins, not both.
Thank you for the quick reply. I was indeed using it and hoped that was my problem, but alas, I'm still am doing something wrong. (see next msg.)