主要代码如下
void main()
{
WDTCTL=WDTPW+WDTHOLD;
FLL_CTL0|=XCAP14PF;
do
{
IFG1&=~OFIFG;
for(unsigned int i=0;i<50000;i++);
}while(IFG1&OFIFG);
lcd_init();
while(1)
{
lcd_displayALL(); //全显
);
}
}
void lcd_init(void)
{
LCDCTL = LCDSG0_7 + LCD4MUX + LCDON; // s0-s39,最大段数
BTCTL = BTFRFQ0; //1024HZ,
P5SEL = 0xff;
lcd_clr();
}
液晶为普通的段码液晶:1/4duty,1/3bais
|