3x4 keypad picbasicpro 2


Results 1 to 5 of 5

Threaded View

  1. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Using the link i provided and using MPASM to compile you need...
    Code:
    INCLUDE "KeyPad.bas"
    
    DEFINE KEYPAD_ROW        4        ' 4 ROW keypad       
    DEFINE KEYPAD_ROW_PORT   PORTB    ' ROW port = PORTB
    DEFINE KEYPAD_ROW_BIT    3        ' ROW0 = PORTB.3
    DEFINE KEYPAD_COL        3        ' 3 COL keypad
    DEFINE KEYPAD_COL_PORT   PORTB    ' COL port = PORTB
    DEFINE KEYPAD_COL_BIT    0        ' COL0 = PORTB.0
    
    YourVar                  var byte
    
    Start:
        @ READKEYPAD _YourVar
        ' plah plah
        '      plah plah
        '           plah plah
        '
    and your keypad results will be stor in YourVar variable as follow
    Code:
    col0  col1  col2
      1     2     3   row0
      4     5     6   row1
      7     8     9   row2
     10    11    12   row3
    Last edited by mister_e; - 31st May 2006 at 00:20.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. 4x4 keypad Help
    By aaliyah1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th October 2010, 16:34
  2. 3x4 matrix keypad
    By tazntex in forum Serial
    Replies: 3
    Last Post: - 14th October 2008, 20:13
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. 3x4 keypad picbasicpro
    By gkahraman82 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th May 2006, 21:49
  5. 3x4 keypad scanning problem and others
    By pt3rg in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd December 2003, 02:21

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts