Hi i have a keypad 7 rows by 8 columns is there a way to interface it
using Mikro Basic for a 24fj128GA010. Thanks in advance! Alain
Keypad 8x7
scanning a matrix is a rather simple task, you should have no trouble interfacing this keyboard . For the basics look at something like http://www.dribin.org/dave/keyboard/one_html/. It is obvious you will have to write the fucntion for this yourself. An elegant way is to setup a timer-interrupt at for example 1 ms, scan one column each interrupt and count a few successive 'hits' to achieve debouncing.
Au royaume des aveugles, les borgnes sont rois.
Is it possible to port this C code to MikroBasic ??
const uint8 au8_keyTable[NUM_ROWS][NUM_COLS] = { {'7', '8', '9', 'e', ' ', ' ', ' ', ' '},
{'4', '5', '6', 'b', ' ', ' ', ' ', ' '},
{'1',' 2',' 3', 'a', ' ', ' ', ' ', ' '},
{' ', ' ', ' ', ' ', 'c', 'd', ' ', 'o'},
{' ', ' ', ' ', ' ', 'f', ' ', 'g', 'h'},
{' ', ' ', ' ', ' ', 'i', ' ', 'j', 'k'},
{' ', ' ', ' ', ' ', 'l', ' ', 'm', 'n'}};
const uint8 au8_keyTable[NUM_ROWS][NUM_COLS] = { {'7', '8', '9', 'e', ' ', ' ', ' ', ' '},
{'4', '5', '6', 'b', ' ', ' ', ' ', ' '},
{'1',' 2',' 3', 'a', ' ', ' ', ' ', ' '},
{' ', ' ', ' ', ' ', 'c', 'd', ' ', 'o'},
{' ', ' ', ' ', ' ', 'f', ' ', 'g', 'h'},
{' ', ' ', ' ', ' ', 'i', ' ', 'j', 'k'},
{' ', ' ', ' ', ' ', 'l', ' ', 'm', 'n'}};