Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
58kk90 Regular Member Joined: 14/06/2023 Location: United KingdomPosts: 59
Posted: 03:35pm 22 Nov 2023
Copy link to clipboard
Print this post
Afternoon all,
I have a 6 x 4 keypad that came from a piece of salvaged surplus equipment, I would like to use with MMBasic, I know there is support for a 4 x 3 and 4 x 4 but what about 6 x 4?
It is laid out as 6 columns by 4 rows, would it be useable with MMbasic can anyone advise please? I know I could use an Arduino, and was planning to do so, but I would love to actually use MMbasic for something other than simply flashing LEDs's or generating tones etc.
Any ideas please.
Regards Tony.,
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10064
Posted: 03:52pm 22 Nov 2023
Copy link to clipboard
Print this post
Easy enough to code in Basic. Set up a regular timer interrupt which sets one of the 4 lines low in sequence, the rest high. Set the 6 lines as inputs with pullups and use the PORT function to read the 6 lines looking for anything low
58kk90 Regular Member Joined: 14/06/2023 Location: United KingdomPosts: 59
Posted: 05:54am 23 Nov 2023
Copy link to clipboard
Print this post
Yes, you are correct, I could write a dedicated routine, and i'll probably give that a go, just wondered if the existing keypad routine would support a 4 x 6 or 6 x 4 keypad, to save code and time really.