OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3931|回复: 0

我给大家分享一下,液晶12864图像取模的方法

[复制链接]

5

主题

47

帖子

0

精华

高级会员

Rank: 4

积分
680
金钱
680
注册时间
2019-5-18
在线时间
101 小时
发表于 2019-8-6 10:51:04 | 显示全部楼层 |阅读模式
液晶12864图像取模需要三种软件,一种是改变图像分辨率的软件(如PS)、一种是取模软件(如PCtoLCD2002.exe)、一种是把图像格式转换成bmp格式的软件(如Image2Lcd)
第一步:
确定要取模的图像如:

把这幅图片的分辨率改成128x64。
第二步:
打开软件


打开你事先准备好的那个分辨率128x64的图片,然后按上面的设置配置一下,最后保存。
第三步:
使用软件PCtoLCD2002,



1,打开经过软件Image2Lcd处理后的.bmp文件;2,点击生成字模:
unsigned char code tian[ ] = {
0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x80,0x80,0xF8,0x78,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFE,0xFE,0xFE,0xFF,0xFF,0x03,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0xFF,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x3E,0xFC,0xFC,0xFC,0xC0,0xC0,0x00,0xFE,0xFF,0xFE,0xFC,0xF0,
0xC0,0x00,0xFC,0xFC,0x0F,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x3C,0x3C,0xFC,0xFC,0xFE,0xFE,0xFF,
0xFF,0xFF,0x3F,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x20,0x38,0x3E,0x3F,0x3F,0xFF,0xFF,0xFF,0xE7,0xE7,0xE1,0xE0,
0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x06,0x1F,0x1F,0x1F,0xDF,0x1F,0x1F,0xDF,0x1F,0x07,0x00,0x00,
0x00,0xC0,0xFE,0x00,0x00,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x1F,0x1F,0x07,0x00,0x00,0xC1,0xE7,0xFF,0xFF,
0xFF,0xFF,0x3F,0x3E,0x1F,0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFE,0x1F,0x1F,0x00,
0xC0,0xC0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xE0,0xE0,0xF0,0xFC,0x1C,0x8C,0x8F,0xFF,0xFF,0xFF,0xFF,0x03,0x63,0x60,
0xE0,0xE0,0xE0,0xFC,0xFF,0x7F,0x1F,0x1F,0x1C,0x9C,0xFC,0xF0,0xF0,0xE0,0x60,0x00,
0x00,0x00,0x00,0x00,0xE0,0x60,0x90,0xFF,0xFF,0x70,0x9C,0xFF,0x1C,0x0C,0xFC,0xFF,
0xF0,0xFF,0xEF,0x60,0xF0,0xFF,0x1C,0x70,0xFF,0xFF,0x1C,0x1C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x0C,0x00,0x00,0x0F,0x0F,0x03,0xF3,0xFF,0x9F,
0xFF,0xEF,0x6C,0xEC,0xFC,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xE0,0xFC,0xFC,0xFF,0xFF,0xFC,0xFF,0x9F,
0x1F,0x0F,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0F,0x3F,0xFF,0xFF,0xFE,0x3F,0xCF,0xFF,0xFF,0xFF,0x31,0x00,0xF8,0xF0,
0xFF,0xFF,0x3F,0x07,0x01,0x00,0x00,0x00,0xF8,0xFF,0xFF,0x3F,0x0F,0x07,0x00,0x00,
0x00,0x00,0xF0,0xF8,0xFF,0xFE,0xFF,0xFF,0xFF,0xFE,0xFF,0xF7,0x30,0xF8,0xFF,0x07,
0x87,0xFF,0x0F,0xF0,0xF9,0xFF,0x08,0xC0,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x06,0xFF,0xFF,0xFF,
0x3F,0x0F,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x06,0x0F,0x07,0xF7,0xFF,0xFF,0xFF,0xFF,0x0F,0x3F,0x3F,
0xFE,0xF8,0xF8,0xF0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0xE7,0xFB,0xFB,0x7F,0x1F,0xFF,0xFF,0xFF,0x7F,0x1F,
0x83,0x00,0x00,0x80,0xF8,0xF8,0xFC,0xFF,0x1F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x07,0x1F,0xFF,0xFF,0x7F,0x7F,0x1F,0x1F,0x00,0xFC,0xFF,0x1F,0x07,
0x07,0x00,0x07,0x03,0x00,0x00,0x00,0xE7,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0x80,0x83,0x87,0x87,0xFC,0xF8,0xE0,0xE0,0xE0,0xFF,0xFF,0xE4,
0xE4,0xE7,0xF8,0xFF,0xFF,0xFF,0xFC,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,
0x00,0x00,0x00,0x80,0xE0,0xF8,0xFC,0xFF,0x7F,0x7F,0x7F,0x07,0x07,0x00,0x00,0x00,
0x00,0x03,0x07,0x1F,0x7F,0xFF,0xFF,0xFC,0xF8,0xF8,0xE0,0xE0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x30,0x3F,0x3F,0x0F,0x03,0x00,0x00,0x00,
0x00,0x3F,0x3F,0x3F,0x3F,0x3F,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,
0x03,0x03,0x0F,0x0F,0x2F,0x3F,0x3F,0x3F,0x3F,0x0F,0x0F,0x0F,0x0F,0x03,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x07,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/“C:\Users\Administrator\Desktop\128\tiandao.bmp”,0/
};
最后在液晶12864上效果图:


到这里已经讲完了。(由于我是用电脑自带的画图改的分辨率,出来的效果不是太理想,那两个软件在网上下载就行了,很好找)
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-11-23 13:05

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表