c语言标准字库,用C语言自造1602中文字库

这个程序里面搭配了火焰检测模块,使用的是ADC0,AD转换,显示的电压值可以根据光谱亮度进行变动。网上的1602字库,大多用汇编语言编写,可移植性太低。我这个是用C语言编写的。1602的字库,你们可以看到,显示了中文“月”与“工”。

#include "iom16v.h"

#include "macros.h"

#include "led.h"

#define uint unsigned int

#define uchar unsigned char

#define D0 PORTD=PORTD&0xbf;

#define D1 PORTD=PORTD|0x40;

unsigned char const lcd1602[]={0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39};

unsigned char const lcd1602_yue[]={0x0e,0x0a,0x0e,0x0a,0x0e,0x0a,0x12,0x00};

unsigned char const lcd1602_gong[]={0x1f,0x04,0x04,0x04,0x04,0x04,0x1f,0x00};

uint constant1=0,a1=0,a2=0,a3=0,a4=0;

void add_gong() //自造字库“工”

{

int a,b;

for (a=0x48;a<=0x4f;a++)

{

PORTB=a;

enable_lcd()

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值