At least they are all on the same track using the same material
Last edited:
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
At least they are all on the same track using the same material
So your all saying its short for saying...you didnt use the working code examples? .DIM Keyvalue AS BYTE Really simple you didn't use it LOL
DEVICE=18f2420
CLOCK = 8 ' Tell the compiler what we will be setting the clock to (Mhz)
CONFIG MCLRE = OFF
'CONFIG fOSC = INTIO67 ' Internal oscillator, IO on pins 6 and 7
'INCLUDE "INTOSC8.bas"
'config "InternalOscillator.bas"
'#option LCD_DATA = PORTC.4
'#option LCD_RS = PORTC.0
'#option LCD_EN = PORTC.1
INCLUDE "SetDigitalIO.bas" // Include this file when we compile so that we can use keywords like 'setalldigital'
INCLUDE "utils.bas"
INCLUDE "convert.bas" //xxxxx
'INCLUDE "LCD.bas"
INCLUDE "keypad16pullup.bas"
INCLUDE "usart.bas"
DIM Keypressed AS BYTE
DIM Keyvalue AS BYTE
SetBaudrate(br4800)
DELAYMS(5000)
USART.Write ("Test program",13, 10, 10)
WHILE 1 = 1
Keypressed = keypad16.Value
IF Keypressed <> 0 THEN
USART.Write ("Key pressed = ", HexToStr(Keypressed), 13, 10)
END IF
WEND
DEVICE = 18F4321
CLOCK = 8
CONFIG MCLRE = off
// some LCD options...
#option KEYPAD_PORT = PORTB
#option LCD_DATA = PORTD.4
#option LCD_RS = PORTd.0
#option LCD_EN = PORTd.1
// import LCD library...
INCLUDE "SetDigitalIO.bas"
INCLUDE "IntOSC8.bas"
INCLUDE "LCD.bas"
INCLUDE "utils.bas"
INCLUDE "Keypad16pullup.bas"
INCLUDE "LCD.bas"
INCLUDE "Convert.bas"
DIM led AS porte.0
DIM KeyVal AS BYTE
DIM keypressed AS BYTE
DELAYMS(5000)
WriteAt(1,1,"Test Begin")
WHILE True
keypressed = Keypad16.Value
IF keypressed<>0 THEN
DELAYMS(50)
WriteAt(2,1,"Key: ",DecToStr(keypressed,2))//, " Cnt: "))//,DecToStr(Counter,2))
END IF
WEND
MrDEB, what are you building, please? Forgive me if I missed the description...
Mike,May I ask how you're planning the keypad, please?
Mike,
This thread got started just 3 weeks ago, and now with your suggestions I believe we can get to over 500 posts before the end of the month. So come on everyone! Let's get that post count up.
Don't get me wrong, I am pushing to get all the help MrDEB could use. So please keep those questions coming.MrDEB (and gang). I apologize for asking so many questions. I'm just trying to understand the design goals a little better.