找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3568|回复: 6
打印 上一主题 下一主题
收起左侧

单片机+LCD12864显示收款码图片仿真源程序,取模直接替换代码即可使用

  [复制链接]
跳转到指定楼层
楼主
单片机源程序如下:
#include <REGX52.H>
#define uint unsigned int
#define uchar unsigned char
#define duan P0
uchar code table1[][16] = {
0x7F,0x41,0x5D,0x5D,0x5D,0x41,0x7F,0x00,0x71,0x19,0x72,0x24,0xD5,0xBB,0x73,0x3B,
0x5E,0x3E,0xF4,0x38,0x66,0x93,0xC2,0x8E,0xC2,0x2E,0x63,0x0A,0x5E,0x00,0x7F,0x41,
0x5D,0x5D,0x5D,0x41,0x7F,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,
0x8C,0x55,0x13,0x63,0x89,0x37,0x55,0x71,0x2A,0xAD,0x59,0xE2,0x1A,0xF6,0x24,0x31,
0xAF,0xA6,0x20,0x2F,0xA9,0xA3,0x35,0x2A,0xF5,0x94,0xD6,0x37,0x9D,0x8C,0x76,0xED,
0x07,0x34,0x44,0x70,0xD5,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,
0x2F,0x1F,0xD6,0x6F,0x34,0x86,0x55,0xDE,0xB7,0x66,0xE9,0xA8,0x37,0xFF,0xC0,0x43,
0xC7,0x4F,0xDF,0xDF,0x4F,0xC7,0x43,0x40,0x7F,0x14,0xDA,0x1F,0x3A,0xD6,0xEE,0xCD,
0x64,0x8D,0x51,0x65,0x07,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,
0xDF,0x43,0x5F,0x4F,0x4E,0x43,0xD5,0x15,0xE4,0x59,0x24,0xEC,0x4D,0xBC,0x9D,0x67,
0xA1,0xFB,0xEA,0x1B,0xCE,0x06,0x7C,0xAA,0x5B,0x94,0xCA,0x33,0xFC,0x18,0x56,0x1D,
0xF6,0x1C,0x5C,0x19,0x53,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,
0x1F,0x10,0x17,0x17,0x17,0x10,0x1F,0x00,0x0F,0x0F,0x00,0x0B,0x09,0x0D,0x14,0x0D,
0x01,0x1F,0x0B,0x00,0x05,0x1B,0x09,0x0C,0x08,0x0C,0x0A,0x0D,0x0B,0x11,0x09,0x09,
0x0D,0x18,0x1D,0x1B,0x17,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,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,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,
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,

};



uchar code table[]={0x3f,0x40,0x80,0xb8,0xc0};

uchar code table2[][32]={
/*--  文字:  微  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x88,0xC4,0x33,0x80,0x9E,0x90,0x9F,0x90,0x9E,0x20,0xD8,0x17,0xF0,0x10,0x00,
0x01,0x00,0xFF,0x80,0x40,0x3E,0x02,0x02,0x3E,0x10,0x88,0x67,0x18,0x67,0x80,0x00,

/*--  文字:  信  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x80,0x60,0xF8,0x07,0x00,0x04,0x24,0x24,0x25,0x26,0x24,0x24,0x24,0x04,0x00,
0x01,0x00,0x00,0xFF,0x00,0x00,0x00,0xF9,0x49,0x49,0x49,0x49,0x49,0xF9,0x00,0x00,

/*--  文字:  扫  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x10,0x10,0xFF,0x10,0x90,0x04,0x84,0x84,0x84,0x84,0x84,0x84,0xFC,0x00,0x00,
0x04,0x44,0x82,0x7F,0x01,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7F,0x00,0x00,

/*--  文字:  码  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x04,0x84,0xE4,0x5C,0x44,0xC4,0x00,0x02,0xF2,0x82,0x82,0x82,0xFE,0x80,0x80,0x00,
0x02,0x01,0x7F,0x10,0x10,0x3F,0x00,0x08,0x08,0x08,0x08,0x48,0x88,0x40,0x3F,0x00,

0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  分  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x80,0x40,0x20,0x90,0x88,0x86,0x80,0x80,0x80,0x83,0x8C,0x10,0x20,0x40,0x80,0x00,
0x00,0x80,0x40,0x20,0x18,0x07,0x00,0x40,0x80,0x40,0x3F,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  也  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x80,0x80,0x40,0xFC,0x40,0x20,0x20,0xFF,0x10,0x10,0x08,0xF8,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3F,0x40,0x40,0x40,0x4F,0x40,0x42,0x44,0x43,0x40,0x40,0x78,0x00,

/*--  文字:  是  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x7F,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x7F,0x00,0x00,0x00,0x00,
0x81,0x41,0x21,0x1D,0x21,0x41,0x81,0xFF,0x89,0x89,0x89,0x89,0x89,0x81,0x81,0x00,

/*--  文字:  爱  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x80,0x64,0x2C,0x34,0x24,0x24,0xEC,0x32,0x22,0x22,0x32,0x2E,0x23,0xA2,0x60,0x00,
0x00,0x41,0x21,0x91,0x89,0x87,0x4D,0x55,0x25,0x25,0x55,0x4D,0x81,0x80,0x80,0x00, } ;

sbit e=P1^0;
sbit rw=P1^1;
sbit rs=P1^2;
sbit cs2=P1^3;
sbit cs1=P1^4;
sbit rst=P1^5;

void delay500us(uint xus)
{
        uint i;uchar j;
        for(i=xus;i>0;i--)
                for(j=55;j>0;j--);
}
void zllift(uchar zl)  //左lift
{
        cs1=0;cs2=1;
        rw=0;
        rs=0;
        duan=zl;
        delay500us(1);
        e=1;
        delay500us(2);
        e=0;

}

void zlright(uchar zl)
{
        cs1=1;cs2=0;
        rw=0;
        rs=0;
        duan=zl;
        delay500us(1);
        e=1;
        delay500us(2);
        e=0;

}

51hei截图20210423214353.png (140.33 KB, 下载次数: 81)

51hei截图20210423214353.png

51hei截图20210423214353.png (140.33 KB, 下载次数: 104)

51hei截图20210423214353.png

51hei.png (12.87 KB, 下载次数: 110)

51hei.png

12864收款码.zip

71.04 KB, 下载次数: 126, 下载积分: 黑币 -5

评分

参与人数 1黑币 +50 收起 理由
admin + 50 共享资料的黑币奖励!

查看全部评分

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏4 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:97678 发表于 2021-4-24 07:29 | 只看该作者
这个可以动态的生成二维码吗?
回复

使用道具 举报

板凳
ID:910913 发表于 2021-4-25 19:40 | 只看该作者
好耶,受益匪浅,
回复

使用道具 举报

地板
ID:876301 发表于 2022-4-25 16:17 | 只看该作者
你好,请问这是怎么取模的呢
回复

使用道具 举报

5#
ID:704379 发表于 2022-11-21 22:31 | 只看该作者
在吗,怎么取模的吗
回复

使用道具 举报

6#
ID:230742 发表于 2022-11-24 14:36 | 只看该作者
这要是取模取错了,会不会扫给别人。
回复

使用道具 举报

7#
ID:871721 发表于 2024-7-23 13:55 | 只看该作者
还真能扫出来
回复

使用道具 举报

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

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

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