//12864初始化函数:
void Initialize12864()
{
rst=0;//复位12864
Delayms(30);
rst=1;
Delayms(20);
Write12864Command(0x30);//功能设定:8位控制方式,使用基本指令
Write12864Command(0x08);//显示关
Write12864Command(0x01);//清屏
Write12864Command(0x06);//地址计数器加一、光标右移
Write12864Command(0x0c);//显示开
}
//主函数:
int main(void)
{
Initialize12864();
LCD12864DisplayString(0,0,"欢迎您来到吴师傅博客学习和交流! wellcom!");
//显示汉字和字符
LCD12864DisplayPictrue(32,4,48,32,pictrue2);//显示机器猫
LCD12864DisplayValue(3,0,255);//显示255
while(1);
return 0;
} |