for a 8x8 keypad there are 64 possible results
that's an extraordinary convoluted way to get a result
why not
key var byte ; high nibble column low nibble row
if portb then ...
I think you should read carefully the select case page of your Holy Manual
Acetronics2 Yesterday, 22:57does the Select function case has to read every case before end select , or it's getting out when found the right one
the Goto P it's there so when a case is match then Goto P, to avoid reading...
just need to keep ONE GoTo P @ the end of your Select case's after the End Select
your syntax is " not so good " :rolleyes:
' prevent duplicate
IF PORTC = 1 THEN
Hello everyone,
I'm looking for some tips, to enhance the code listed here to simplify with less code the "Select case'.
This code is for a PIC18F25K22 using PortC as a 64 switches matrix scan...
What value is appropriate for the CALIBRATION number in the settings?
raywmson Yesterday, 11:38Greetings Richard,
thank you so much for your time. Your code looks impressive.
There are lots of bits that I don't understand yet but it's great because I like to learn.
Will study your code...
that's it
just to keep my hand in i made this, one with the lot [ slight differences in led pins]
#CONFIG
CONFIG OSC = IRCIO67 ; Internal oscillator block, port function on RA6 and...
Greetings Richard,
sorry for the late reply... Been busy lately...
Will check all your suggestions, thanks for that.
Just one question regarding this one: "alias your leds to lat regs not...
Re: Select case function
Thank you richard
jackberg1 Today, 02:10the reason I had to add a value to the portc, was the fact in the 64 key matrix some code were duplicate.
so 2 different key had the same value.
I'll have to test this code....