下载:
LCD12864_Parrel_ChinaCharacter.zip
(168.98 KB, 下载次数: 2157)
主程序:
- /*******************************************************
- * File :LCD12864_Parrel_ChinaCharacter
- * Author :PaoPaoWuDi
- * Version:IAR for MSP430 V5.50.2
- * Data :2017-03-06
- * Brief :LCD12864显示中文字符
- * Brief :const强制转换为常类型,具有不可变
- *******************************************************/
- #include <msp430x14x.h>
- #include "lcd12864.h"
- const uchar row1[]={"时间:2017-03-07"};
- const uchar row2[]={"环境温度:24.5 ℃"};
- const uchar row3[]={"大气湿度:46.5 %"};
- const uchar row4[]={"PM2.5: 315ug/m3"};
- //const uchar row1[]={"沅水通波接武冈 "};
- //const uchar row2[]={"送君不觉有离伤 "};
- //const uchar row3[]={"青山一道同云雨 "};
- //const uchar row4[]={"明月何曾是两乡 "};
- /******************************************************/
- int main(void)
- {
- P1DIR = 0xFF;P1OUT = 0xFF;
- P2DIR = 0xFF;P2OUT = 0xFF;
- P3DIR = 0xFF;P3OUT = 0xFF;
- P4DIR = 0xFF;P4OUT = 0xFF;
- P5DIR = 0xFF;P5OUT = 0xFF;
- P6DIR = 0xFF;P6OUT = 0xFF;
-
- WDTCTL = WDTPW + WDTHOLD; //关闭看门狗
- P6DIR |= BIT2;P2OUT |= BIT2;//关闭电平转换
- LCD_Init(); //初始化液晶
-
- Disp_HZ(0x80,row1,8);
- Disp_HZ(0x90,row2,8);
- Disp_HZ(0x88,row3,8);
- Disp_HZ(0x98,row4,8);
-
- LPM4;
- }
复制代码
|