显示特殊字符时候(天线形式)其他区域也回出现乱点,不知道怎么解决???
源程序如下(主函数):
#include <hidef.h>
#include "derivative.h"
#include "LLD_LCD.h"
#include "LLD_KEY.h"
void PerphInit()
{
SOPT1 = 0x00; //关闭看门狗
MCGC1 = 0xB8;
MCGC1_IRCLKEN = 1; //开启参考时钟,TRIM微调量没有设置
MCGC2 = 0x36;
MCGC3 = 0x00; //PLLS=0
while(!(MCGSC&0x02));
}
void tianxian(void)//显示天线形
{
LcdCommand(0x36);
LcdCommand(0x80);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x80);
LcdCommand(0x81);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x2a);
LcdCommand(0x82);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x1c);
LcdCommand(0x83);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x08);
LcdCommand(0x84);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x08);
LcdCommand(0x85);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x08);
LcdCommand(0x86);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x08);
LcdCommand(0x87);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x08);
LcdCommand(0x88);//垂直地址范围
LcdCommand(0x80);//水平地址范围
LcdDataWrite(0x08);
LcdCommand(0x88);//垂直地址范围
LcdCommand(0x70);//水平地址范围
LcdDataWrite(0x07);*/
}
//======主函数=====
void main(void)
{
PerphInit(); //外围初始化
LCD_Init(); //液晶...
EnableInterrupts;
CLR_Screen();
while(1)
{ uchar key = 0x00; //按键标志符赋初值
do {
key = Get_Key(); //读取按键
}while(!key);
switch(key)
{
case UP:
CLR_Screen();
DisplayChar(0,0,"发送中...");
break;
case DOWN:
CLR_Screen();
DisplayChar(0,0,"接收中...");
break;
case BACK:
tianxian(); //天线字形
Delay(1000);
break;
default:
break;
} //end switch
}//end while
} |