#include "TSTKeypad.h"
void setup() {
// put your setup code here, to run once:
volatile char *dir_f= 0x30, *dir_k = 0x107, *dir_a = 0x21;
*dir_f=0x0f;
*dir_k = 0x00;
*dir_a = 0x0f;
}
void loop() {
/* // put your main code here, to run repeatedly:
volatile char *out_f=0x31, *in_k=0x106, *out_a= 0x22 ,*out_k=0x108;
*out_a = (char*) Scan();
volatile long j;
for(j=0; j<50000; j++);
// on Keypad if you once press a switch, it will be on until you press next one.
//these lines used for verify this functionlity
//*out_a =0x00;
//for(j=0; j<50000; j++);
*/
volatile char *out_f=0x31, *in_k=0x106, *out_a= 0x22 ,*out_k=0x108;
volatile long j;
long i;
//*out_a=0xff;
*out_a = (char*) Scan();
for(j=0; j<100000; j++);
*out_a=0x00;
for(j=0; j<100000; j++);
}