#include<msp430x14x.h>
#include"5110.h"
void main()
{
WDTCTL = WDTPW + WDTHOLD;
// BoardConfig(0xb8);
P1IE = 0xff;
P1IES = 0xff;
P1IFG = 0;
P3DIR = 0xff;
_EINT();
init_LCD();
LCD_clear();
while(1);
}
#pragma vector = PORT1_VECTOR
__interrupt void port(void)
{
display_English_String(0,0,"Lucky");
P1IFG = 0;
}
void init_LCD()
{
CLR_RST;
delay(1);
SET_RST;
CLR_SCE;
delay(1);
SET_SCE;
delay(1);
write_LCD_byte(0x21,0);
write_LCD_byte(0x07,0);
write_LCD_byte(0x13,0);
write_LCD_byte(0x20,0);//使用基本指令
LCD_clear(); //清屏
write_LCD_byte(0x0C,0);//设定显示模式,正常显示
CLR_SCE;
}
此帖出自
小平头技术问答
一周热门 更多>