《msp430实现12864ad采集温度并显示》由会员分享,可在线阅读,更多相关《msp430实现12864ad采集温度并显示(28页珍藏版)》请在金锄头文库上搜索。
1、#include #includecharacter.h#include12864.hextern uchar xian=/*- 文字: 现 -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=16x16 -*/0x04,0x84,0x84,0xFC,0x84,0x84,0x00,0xFE,0x02,0x02,0xF2,0x02,0x02,0xFE,0x00,0x00,0x20,0x60,0x20,0x1F,0x10,0x90,0x40,0x23,0x18,0x06,0x01,0x7E,0x80,0x83,0xE0,0x00;extern uchar zai=/*- 文字: 在 -*/
2、*- 楷体 _GB231211; 此字体下对应的点阵为:宽 x 高=15x15 -*/*- 宽度不是 8 的倍数,现调整为:宽度 x 高度=16x15 -*/0x08,0x08,0x88,0xC8,0x38,0x0C,0x0B,0x08,0x08,0xE8,0x08,0x08,0x08,0x08,0x08,0x00,0x02,0x01,0x00,0xFF,0x40,0x41,0x41,0x41,0x41,0x7F,0x41,0x41,0x41,0x41,0x40,0x00;extern uchar wen=/*- 文字 : 温 -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=16x
3、16 -*/0x10,0x60,0x02,0x8C,0x00,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00,0x04,0x04,0x7E,0x01,0x40,0x7E,0x42,0x42,0x7E,0x42,0x7E,0x42,0x42,0x7E,0x40,0x00;extern uchar du=/*- 文字 : 度 -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=16x16 -*/0x00,0x00,0xFC,0x24,0x24,0x24,0xFC,0x25,0x26,0x24,0xFC,0x24,0x24,0x2
4、4,0x04,0x00,0x40,0x30,0x8F,0x80,0x84,0x4C,0x55,0x25,0x25,0x25,0x55,0x4C,0x80,0x80,0x80,0x00;extern uchar du1=0x06,0x09,0x09,0xE6,0xF8,0x0C,0x04,0x02,0x02,0x02,0x02,0x02,0x04,0x1E,0x00,0x00,0x00,0x00,0x00,0x07,0x1F,0x30,0x20,0x40,0x40,0x40,0x40,0x40,0x20,0x10,0x00,0x00;extern uchar mao_hao=/*- 文字 : :
5、 (冒号) -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00;extern uchar num0=/*- 文字 : 0 -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00;extern uchar num1=/*- 文字 : 1
6、-*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00;extern uchar num2=/*- 文字 : 2 -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00;extern uchar num3=/*- 文字 : 3 -*/*-
7、宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00;extern uchar num4=/*- 文字 : 4 -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00;extern uchar num5=/*- 文字 : 5 -*/*- 宋体 12;
8、 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00;extern uchar num6=/*- 文字 : 6 -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00;extern uchar num7=/*- 文字 : 7 -*/*- 宋体 12; 此字体下对
9、应的点阵为:宽 x 高=8x16 -*/0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00;extern uchar num8=/*- 文字 : 8 -*/*- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00;extern uchar num9=/*- 文字 : 9 -*/*- 宋体 12; 此字体下对应的点阵为:
10、宽 x 高=8x16 -*/0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00;/*写指令到 LCD 模块*/void transfer_command(int data1)char i; cs1_0;rs_0;for(i=0;i4) /设置列地址的高 4 位transfer_command(column /设置列地址的低 4 位/*全屏清屏*/void clear_screen()unsigned char i,j;cs1_0;for(i=0;i0x00)if(texti=0x20)&
11、(texti0x00)if(texti=0x20)&(texti -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,/*- 文字 : ? -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,
12、/*- 文字 : -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,/*- 文字 : A -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,/*- 文字 : B -*/*- Comic S
13、ans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,/*- 文字 : C -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,/*- 文字 : D -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽
14、 x 高=8x16 -*/0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,/*- 文字 : E -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,/*- 文字 : F -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x08,0xF8
15、,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,/*- 文字 : G -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,/*- 文字 : H -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,/*- 文字 : I -*/*- Comic Sans MS12; 此字体下对应的点阵为:宽 x 高=8x16 -*/0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,/*- 文字