#include <msp430x22x4.h>
int tmp;
typedef unsigned int uchar;
typedef unsigned int uint;
uchar cnt = 0; //位码
uchar scandata[16]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x07,0x75,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
/***********全局变量********************/
int key_pressed; //按键是否按下 1--是, 0--否
int key_val; //存放键值
int key_flag; //是否放开 1--是, 0--否
int tmp1;
int row;
int col;
int tmp1;
int tmp2;
//键盘逻辑键值与程序计算键值的映射
uchar key_map[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
uchar Dispbuf[2];