|
//= = = = = = =LCD TABLE = = = = = = = = =
const unsigned char TABLE[11]={ //x G F E D C B A
0x3f, //0
0x06, //1
0x5d, //2
0x4f, //3
0x66, //4
0x6b, //5
0x7b, //6
0x0e, //7
0x7f, //8
0x6f, //9
0x40, //o
};
void
LCDDisplay(unsigned int DisplayData){
LCDDATA0 = 0;
LCDDATA3 = 0;
LCDDATA6 = 0;
LCDDATA9 = 0;
if(((DisplayData >> 12 ) & 0x0f) == 1)
SEG0COM0 = 1;
else
SEG0COM0 = 0;
SEG5COM0 = (TABLE[DisplayData&0x0f]>>D) & 0x01;
SEG4COM1 = (TABLE[DisplayData&0x0f]>>E) & 0x01;
SEG5COM1 = (TABLE[DisplayData&0x0f]>>C) & 0x01;
SEG5COM2 = (TABLE[DisplayData&0x0f]>>B) & 0x01;
SEG4COM2 = (TABLE[DisplayData&0x0f]>>G) & 0x01;
SEG5COM3 = (TABLE[DisplayData&0x0f]>>A) & 0x01;
SEG4COM3 = (TABLE[DisplayData&0x0f]>>F) & 0x01;
SEG3COM0 = (TABLE[DisplayData>>4&0x0f]>>D) & 0x01;
SEG2COM1 = (TABLE[DisplayData>>4&0x0f]>>E) & 0x01;
SEG3COM1 = (TABLE[DisplayData>>4&0x0f]>>C) & 0x01;
SEG3COM2 = (TABLE[DisplayData>>4&0x0f]>>B) & 0x01;
SEG2COM2 = (TABLE[DisplayData>>4&0x0f]>>G) & 0x01;
SEG3COM3 = (TABLE[DisplayData>>4&0x0f]>>A) & 0x01;
SEG2COM3 = (TABLE[DisplayData>>4&0x0f]>>F) & 0x01;
SEG1COM0 = (TABLE[DisplayData>>8&0x0f]>>D) & 0x01;
SEG0COM1 = (TABLE[DisplayData>>8&0x0f]>>E) & 0x01;
SEG1COM1 = (TABLE[DisplayData>>8&0x0f]>>C) & 0x01;
SEG1COM2 = (TABLE[DisplayData>>8&0x0f]>>B) & 0x01;
SEG0COM2 = (TABLE[DisplayData>>8&0x0f]>>G) & 0x01;
SEG1COM3 = (TABLE[DisplayData>>8&0x0f]>>A) & 0x01;
SEG0COM3 = (TABLE[DisplayData>>8&0x0f]>>F) & 0x01;
SEG4COM0 = 1;
} |
|