Menu

Keypad alternate Ports?

vmatthews
2014-01-18
2014-01-21
  • vmatthews

    vmatthews - 2014-01-18

    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

     
  • kent_twt4

    kent_twt4 - 2014-01-19

    Either #define as a keypadport -OR- #define keypad col and rows as you wish to whatever individual ports & pins, not both.

     
    • vmatthews

      vmatthews - 2014-01-21

      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.)

       

Log in to post a comment.