8x8 keypad matrix...


Results 1 to 6 of 6

Threaded View

  1. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mbox View Post
    Thanks for the quick responce, I'm using pic16f877, the same PIC I use for my 4x4 keypad. If possible I want to make use the keypad.bas include file work for the 8x8. I did not make any changes to the keypad.bas but instead I include this in my code...
    Code:
    DEFINE KEYPAD_ROW        8       ' 8 row 
        define KEYPAD_ROW_PORT   PORTB   '   on PORTB
        DEFINE KEYPAD_ROW_BIT    0       '      
        DEFINE KEYPAD_COL        8       ' 8 col 
        DEFINE KEYPAD_COL_PORT   PORTD   '   on PORTD
        DEFINE KEYPAD_COL_BIT    0
    I also want to make clear, is the DEFINE KEYPAD_ROW_BIT and DEFINE KEYPAD_COL_BIT is where you suppose to connect your first row and column?

    regards,
    mbox
    Hi,
    I see mister_e has commented the DEFINES in keypad.bas you should scroll down and see this in amongst the assembly code:
    Code:
    <font color=green>
      ;
        ;    Default settings
        ;    ================
        KB_ROW        = 4                                      ; 4 ROW keypad
        KB_ROW_PORT   = PORTB                                  ; Keypad ROW on PORTB
        KB_ROW_BIT    = 0                                      ; ROW0 = PORTB.0
        KB_COL        = 4                                      ; 4 COL keypad
        KB_COL_PORT   = PORTB                                  ; Keypad Col on PORTB
        KB_COL_BIT    = 4                                      ; COL0 = PORTB.4
        DebounceDelay = d'200'                                 ; debounce delay 200mSec
    </font color>
    I do not know if the defines will override this or not, somehow I doubt it, but it very well may.
    Also here are some threads on this subject:
    http://www.picbasic.co.uk/forum/show...ght=keypad.bas
    http://www.picbasic.co.uk/forum/showthread.php?t=3250
    Last edited by Archangel; - 23rd February 2010 at 02:31.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Matrix Keypad routine
    By mister_e in forum Code Examples
    Replies: 134
    Last Post: - 18th September 2022, 20:30
  2. calculator-like code entry with matrix keypad and display
    By Dennis in forum mel PIC BASIC Pro
    Replies: 35
    Last Post: - 16th December 2009, 22:58
  3. Need help in matrix keypad coding
    By rano_zen06 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 24th May 2008, 13:16
  4. Inconsistent output on a 4x4 matrix keypad
    By markcadcam in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 24th November 2006, 03:54
  5. very basic matrix keypad question
    By kitcat in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th July 2006, 21:33

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