专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
关于PG12864F液晶使用的问题
2019-03-24 18:43
发布
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
站内问答
/
51单片机
10871
8
1481
为什么PG12864F液晶显示器显示整平图片时总显示连个半屏的,上下各半屏,都是图片的上一半 此帖出自
小平头技术问答
友情提示:
此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
8条回答
bintimes
1楼-- · 2019-03-24 23:42
精彩回答 2 元偷偷看……
加载中...
gaoyang9992006
2楼-- · 2019-03-25 01:04
你程序的问题。
加载中...
gaoyang9992006
3楼-- · 2019-03-25 06:56
楼主先找个别人调试好的 程序,然后再试试看,如果没问题那就是你程序设计的问题。以及电路保证都是连接的没问题。
加载中...
gaoyang9992006
4楼-- · 2019-03-25 09:56
调好之后,建立缓冲区,然后定时扫描缓冲区,更新显示内容,只更新缓冲区就OK了,目前你还是看看电路和驱动代码是否有问题吧,一般出现你说的情况应该是程序没有弄好。
加载中...
jinsheng106
5楼-- · 2019-03-25 11:29
显示64*32的图片可以,但是显示128*64的图片显示上下两个一样的半屏
加载中...
jinsheng106
6楼-- · 2019-03-25 13:06
这是我写的程序,高手们给看看怎么回事,谢谢了
#include "REG52.H"
#include "stdio.h"
#include"absacc.h"
#define uchar unsigned char
#define uint unsigned int
#define LCDCOM XBYTE[0xfFfD]
#define LCDDATA XBYTE[0xfFfC]
sbit bflag=ACC^7;
unsigned char code tuxing[]={0x00,0x00,0x01,0xFF,0xF0,0x18,0x03,0xFE,0x00,0x07,0xFF,0xFC,0x07,0xFF,0xFF,0xFE,
0x00,0x00,0x03,0xFF,0xF0,0x18,0x03,0xFE,0x00,0x07,0xFF,0xFE,0x0F,0xFF,0xFF,0xFF,
0x00,0x00,0x07,0xFF,0xF0,0x38,0x03,0xFE,0x00,0x00,0x7F,0xFF,0x0F,0xFF,0xF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xFF,0xE0,
0x00,0x07,0xFF,0xC0,0xFF,0x80,0x00,0x00,0x0F,0xE3,0xFF,0x0F,0xF8,0xE7,0xFF,0xF0,
0x00,0x07,0xFF,0xE0,0xFF,0x80,0x00,0x00,0x1F,0xC3,0xFF,0x87,0xFC,0xE7,0xFF,0xF0,
0x00,0x07,0xFF,0xE0,0x7F,0x80,0x00,0x00,0x1F,0xC3,0xFF,0x8F,0xFF,0xFF,0xFF,0xF0,
0x00,0x07,0xFF,0xE0,0x7F,0xC0,0x00,0x00,0x1F,0xC3,0xFF,0xCF,0xFF,0xFF,0xFF,0xF0,
0x00,0x07,0xFF,0xF0,0x3F,0xC0,0x00,0x00,0x1F,0x83,0xFF,0xDF,0xFF,0xFF,0xFF,0xF0,
0x00,0x07,0xFF,0x70,0x3F,0xC0,0x00,0x00,0x1F,0x83,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,
0x00,0x0F,0xFE,0x78,0x1F,0xC0,0x00,0x00,0x1F,0x83,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,
};
void delay(unsigned char m)
{
unsigned char i,j;
for(i=0;i<m;i++)
for(j=0;j<50;j++)
;
}
void busy(void)
{
do{ACC=LCDCOM;
}while(bflag==1);
}
void command_sending_with_one_data(uchar data1,uchar command)
{ busy();
LCDDATA=data1;
busy();
LCDCOM=command;
}
void command_sending_with_two_data(uint data1,uint data2,uchar command)
{
busy();
LCDDATA=data1;
busy();
LCDDATA=data2;
busy();
LCDCOM=command;
}
void dispay_tuxing(void)
{
uchar i,j;
uint address,x=0;
address=0;//首地址,图形显示
for(i=0;i<32;i++)
{ uint k=0;
if(address>=32)k=(address/32);
command_sending_with_two_data((uchar)(address*8),(uchar)(k),0x24);
for(j=0;j<16;j++)//每行16字节
{
command_sending_with_one_data(tuxing[x],0xc0);
x++;
}
address=address+16;//换行
}
}
void init_12864()
{
busy();
command_sending_with_two_data(0x00,0x00,0x21); //光标指针设置,本程序不设置偏移寄存器
busy(); //地址指针在开始写字的时候才进行设置
command_sending_with_two_data(0x00,0x00,0x42);
busy();
command_sending_with_two_data(128,00,0x43); //设置图形区域大小
busy();
LCDCOM=0x80; //模式设置
busy();
LCDCOM=0x98; //显示设置
busy();
LCDCOM=0xa5; //光标设置
}
void clear_play(void)
{ uchar i;
LCDCOM=0xB0;
busy();
for(i=0;i<300;i++)
LCDDATA=0x00;
busy();
LCDCOM=0xb2;
busy();
}
void main()
{ uchar i;
init_12864();
dispay_tuxing();
}
加载中...
1
2
下一页
一周热门
更多
>
相关问题
相关文章
基于51单片机的计算器设计
0个评论
51单片机300个proteus仿真实例下载
0个评论
51单片机 蜂鸣器
0个评论
51单片机驱动RC522模块
0个评论
基于51单片机的指纹密码锁
0个评论
AT89C51单片机制作简易密码锁
0个评论
51单片机汇编语言计数器
0个评论
51单片机精确延时设计
0个评论
×
关闭
采纳回答
向帮助了您的网友说句感谢的话吧!
非常感谢!
确 认
×
关闭
编辑标签
最多设置5个标签!
保存
关闭
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
关闭
您已邀请
15
人回答
查看邀请
擅长该话题的人
回答过该话题的人
我关注的人
#include "REG52.H"
#include "stdio.h"
#include"absacc.h"
#define uchar unsigned char
#define uint unsigned int
#define LCDCOM XBYTE[0xfFfD]
#define LCDDATA XBYTE[0xfFfC]
sbit bflag=ACC^7;
unsigned char code tuxing[]={0x00,0x00,0x01,0xFF,0xF0,0x18,0x03,0xFE,0x00,0x07,0xFF,0xFC,0x07,0xFF,0xFF,0xFE,
0x00,0x00,0x03,0xFF,0xF0,0x18,0x03,0xFE,0x00,0x07,0xFF,0xFE,0x0F,0xFF,0xFF,0xFF,
0x00,0x00,0x07,0xFF,0xF0,0x38,0x03,0xFE,0x00,0x00,0x7F,0xFF,0x0F,0xFF,0xFF,0xFF,
0x00,0x00,0x0F,0xFF,0xF0,0x70,0x03,0xFF,0x00,0x00,0x3F,0xFF,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0F,0xF8,0xE7,0xFF,0xF0,
0x00,0x07,0xFF,0xE0,0xFF,0x80,0x00,0x00,0x1F,0xC3,0xFF,0x87,0xFC,0xE7,0xFF,0xF0,
0x00,0x07,0xFF,0xE0,0x7F,0x80,0x00,0x00,0x1F,0xC3,0xFF,0x8F,0xFF,0xFF,0xFF,0xF0,
0x00,0x07,0xFF,0xE0,0x7F,0xC0,0x00,0x00,0x1F,0xC3,0xFF,0xCF,0xFF,0xFF,0xFF,0xF0,
0x00,0x07,0xFF,0xF0,0x3F,0xC0,0x00,0x00,0x1F,0x83,0xFF,0xDF,0xFF,0xFF,0xFF,0xF0,
0x00,0x07,0xFF,0x70,0x3F,0xC0,0x00,0x00,0x1F,0x83,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,
0x00,0x0F,0xFE,0x78,0x1F,0xC0,0x00,0x00,0x1F,0x83,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,
};
void delay(unsigned char m)
{
unsigned char i,j;
for(i=0;i<m;i++)
for(j=0;j<50;j++)
;
}
void busy(void)
{
do{ACC=LCDCOM;
}while(bflag==1);
}
void command_sending_with_one_data(uchar data1,uchar command)
{ busy();
LCDDATA=data1;
busy();
LCDCOM=command;
}
void command_sending_with_two_data(uint data1,uint data2,uchar command)
{
busy();
LCDDATA=data1;
busy();
LCDDATA=data2;
busy();
LCDCOM=command;
}
void dispay_tuxing(void)
{
uchar i,j;
uint address,x=0;
address=0;//首地址,图形显示
for(i=0;i<32;i++)
{ uint k=0;
if(address>=32)k=(address/32);
command_sending_with_two_data((uchar)(address*8),(uchar)(k),0x24);
for(j=0;j<16;j++)//每行16字节
{
command_sending_with_one_data(tuxing[x],0xc0);
x++;
}
address=address+16;//换行
}
}
void init_12864()
{
busy();
command_sending_with_two_data(0x00,0x00,0x21); //光标指针设置,本程序不设置偏移寄存器
busy(); //地址指针在开始写字的时候才进行设置
command_sending_with_two_data(0x00,0x00,0x42);
busy();
command_sending_with_two_data(128,00,0x43); //设置图形区域大小
busy();
LCDCOM=0x80; //模式设置
busy();
LCDCOM=0x98; //显示设置
busy();
LCDCOM=0xa5; //光标设置
}
void clear_play(void)
{ uchar i;
LCDCOM=0xB0;
busy();
for(i=0;i<300;i++)
LCDDATA=0x00;
busy();
LCDCOM=0xb2;
busy();
}
void main()
{ uchar i;
init_12864();
dispay_tuxing();
}
一周热门 更多>