
Originally Posted by
mbox
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.
Bookmarks