#include <REGX51.H>
#include <INIT.H>
/************汉字点阵*************/
uchar code hanzi[4][32] = //一个汉字分两行,所以数组二维数为字数的两倍
{0x02,0x00,0x01,0x00,0x01,0x00,0xff,0xfe,0x08,0x20,0x08,0x20,0x08,0x20,0x04,0x40,
0x04,0x40,0x02,0x80,0x01,0x00,0x02,0x80,0x04,0x60,0x18,0x1e,0xe0,0x08,0x00,0x00
}, //"文",0
{0x08,0x80,0x0c,0xc0,0x09,0x88,0x12,0x3c,0x17,0xe6,0x31,0x14,0x52,0x08,0x95,0x04,
0x19,0xf8,0x11,0x10,0x12,0x90,0x14,0xa0,0x10,0x60,0x11,0x98,0x16,0x06,0x00,0x00
}, //"俊",1
{00x24,0x04,0x34,0x04,0x24,0x24,0x3f,0xa4,0x44,0x24,0x04,0x24,0x7f,0xa4,0x04,0x24,
0x3f,0xa4,0x24,0xa4,0x24,0xa4,0x24,0xa4,0x24,0x84,0x27,0x84,0x05,0x14,0x04,0x08
}, //"制",2
{0x08,0x80,0x0c,0x80,0x09,0x00,0x13,0xfe,0x12,0x80,0x34,0x88,0x50,0xfc,0x90,0x80,
0x10,0x80,0x10,0x84,0x10,0xfe,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80
} //"作",3
};
/************位定义**************/
sbit STTP = P2^7;
/************变量声明***********/
uint n,i,j; //delay()延时函数计数变量
uint x,y,z; //out_hanzi()
/************函数声明***********/
void delay(uint n); //延时函数
void out_rxd(uchar *d); //汉字输出
/************主函数**************/
void main()
{
SCON = 0x00;
while(1)
{
P1 = 0;
for( x = 0; x < 32; x+=2)
{
STTP = 0;
out_rxd(&hanzi[3][x+1]);
out_rxd(&hanzi[3][x]);
out_rxd(&hanzi[2][x+1]);
out_rxd(&hanzi[2][x]);
out_rxd(&hanzi[1][x+1]);
out_rxd(&hanzi[1][x]);
out_rxd(&hanzi[0][x+1]);
out_rxd(&hanzi[0][x]);
STTP = 1;
P1 = x/2;
}
}
}
/************子函数定义�*********/
void delay(uint n)
{
for( ; n > 0 ; n--)
{
for( j = 0; j < 10; j++)
{;}
}
}
void out_rxd(uchar *d)
{
SBUF = *d; //启动串行口传送
while(TI == 0); //等待串口传送结束
TI = 0; //将串口中断标志位置0
}
GJZGRB
- 粉丝: 2969
- 资源: 7735
最新资源
- 抖音美女音乐号,创新美女号起号涨粉(附完整素材).mp4
- 工具变量-高管在职消费数据集.dta
- 编译原理实验说明书.doc
- 基于Java+Springboot的后端开发
- 编译原理实验报告格式.doc
- Android Studio开发的单词本APP源码(期末大作业)
- 抖音星图激励计划 单号可撸1000 2个号2000 多号多得 简单易学.mp4
- 网络建设与运维竞赛:全国职业院校技能大赛网络建设与运维赛题库解析与实践
- GD32E501单片机串口通信工程文件
- 大数据期末复习资料.zip
- 一些非常有趣的python爬虫例子,对新手比较友好,主要爬取淘宝、天猫、微信、豆瓣、QQ等网站
- Docker在Ubuntu系统的安装、配置与常用命令解析
- 大数据实验6数据.zip
- 单片机程序,CAN通讯试验
- 如何找到您需要的维修手册.xlsx
- A4 黑白常见问题.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈