Going with Bruce's code is always a good bet.
But on this one, mister_e might have the right ticket for you.
Variable sized keypads ...
Matrix Keypad routine
http://www.picbasic.co.uk/forum/showthread.php?t=3250
Going with Bruce's code is always a good bet.
But on this one, mister_e might have the right ticket for you.
Variable sized keypads ...
Matrix Keypad routine
http://www.picbasic.co.uk/forum/showthread.php?t=3250
DT
Thanks Darrel for the reply, I finally have Bruce's code working with some modifications. I am still using portb.0-2 for my rows and portb.3-6 for my columns and portb.7 is not used so I have made it an input and pulled high via a 10k resistor. Reading my keys for what KEY value actually is in decimal, I have 1-11 buttons on this keypad, the values are 1,2,3,4,5,7,8,9,10,11,12. I don't quite understand how I missed 6 but its working good. Now for my real question, would you recommend how I may make the key being pressed continually be transmitted while I am pushing it and stop when I release the key? I have attached a text file of the code I have modified you will see under my mods Bruce's original code. Thanks again
I think I figured out how, I just added an IF ((PORTB >> 3) !=1f) then send at the beginning of label getkeyu.
Seems to be working ok momentary, now I just have to figured out how to use NAP to let the pic sleep in between button presses.
Back to the PBP manual......
Thank you for you suggestions.
Bookmarks