Complete Keypad Example


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Location
    paris
    Posts
    22


    Did you find this post helpful? Yes | No

    Default keypad

    Hello

    Here another program which uses another technique for the keypad, can help me has to write a routine or have an idea. my program does not have constrained foncionnement of the program has to supervise.

    thank you

    start:
    pcode=0

    clavier:
    porta.2=0
    trisb=%11110000 '0=out / 1=in
    portb=%00000000
    pause 10 'Let stabilize state
    msb=portb
    if msb=240 then 'No key pressed
    goto clavier
    endif

    TRISB=%00001111 '0=out / 1=in
    portb=%00000000
    pause 10 'Let stabilize state
    lsb=portb
    if lsb=15 then 'Key is already released
    goto clavier
    endif
    pause 100 'Enable one key press each 500ms

    msblsb=msb + lsb 'Combine line & column
    Attached Files Attached Files
    Last edited by RAYMON; - 31st July 2007 at 12:12.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink Retour sur terre ...

    Hi, Raymon

    There's a little problem in your goal definition ...

    you want to know what happens on EVERY keyboard ...

    BUT ...

    1) you have different key counts
    2) you have "matrix" and "common" keyboard architecture ... plus a "diode" architecture that permits 56 keys instead of the classical 16 ones ( using a full port ...), plus the Key to resistance value system ...,plus ...

    3) you have "digital" outputs and "serial" outputs ( like a PC keyboard ) ...

    Reading what happens won't be the same manner for each keyboard ...

    so ... I think you should , at first have a better definition of what you REALLY want to do ...

    If you wanna paste Keyboard scanners ( like in Hollywood films ... i.e. ) ... think first it's ONLY movies ... really, really far from the reality !!!

    1 Keyboard type = 1 Scanner type ... That's it !!!

    Amitiés du 76

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. 4x4 keypad Help
    By aaliyah1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th October 2010, 17:34
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  3. Keypad input test
    By Kalind in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th October 2008, 05:00
  4. Need help in matrix keypad coding
    By rano_zen06 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 24th May 2008, 14:16
  5. novice need help for a security keypad
    By davleo in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 17th November 2003, 22:54

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