没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
#include <REG52.H>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
xdata uchar display[8][8];
/*rank:A,1,2,3,4,I,心,U*/
uchar xdata table_cha[8][8]={0x51,0x51,0x51,0x4a,0x4a,0x4a,0x44,0x44,0x18,0x1c,0x18,0x18,0x18,0x18,0x18,0x3c,0x3c,0x66,0x66,0x30,0x18,0xc,0x6,0xff,0x3c,0x66,0x60,0x38,0x60,0x60,0x66,0x3c,0x30,0x38,0x3c,0x3e,0x36,0x7e,0x30,0x30,0x3c,0x3c,0x18,0x18,0x18,0x18,0x3c,0x3c,0x66,0xff,0xff,0xff,0x7e,0x3c,0x18,0x18,0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x3c};
/*the "ideasoft"*/
uchar xdata table_id[40]={0x81,0xff,0x81,0x00,0xff,0x81,0x81,0x7e,0x00,0xff,0x89,0x89,0x00,0xf8,0x27,0x27,0xf8,0x00,0x8f,0x89,0x89,0xf9,0x00,0xff,0x81,0x81,0xff,0x00,0xff,0x09,0x09,0x09,0x01,0x0,0x01,0x01,0xff,0x01,0x01,0x00};
/*railway*/
uchar xdata dat[128]={0x0,0x20,0x40,0x60,0x80,0xa0,0xc0,0xe0,0xe4,0xe8,0xec,0xf0,0xf4,0xf8,0xfc,0xdc,0xbc,0x9c,0x7c,0x5c,0x3c,0x1c,0x18,0x14,0x10,0xc,0x8,0x4,0x25,0x45,0x65,0x85,0xa5,0xc5,0xc9,0xcd,0xd1,0xd5,0xd9,0xb9,0x99,0x79,0x59,0x39,0x35,0x31,0x2d,0x29,0x4a,0x6a,0x8a,0xaa,0xae,0xb2,0xb6,0x96,0x76,0x56,0x52,0x4e,0x6f,0x8f,0x93,0x73,0x6f,0x8f,0x93,0x73,0x4a,0x6a,0x8a,0xaa,0xae,0xb2,0xb6,0x96,0x76,0x56,0x52,0x4e,0x25,0x45,0x65,0x85,0xa5,0xc5,0xc9,0xcd,0xd1,0xd5,0xd9,0xb9,0x99,0x79,0x59,0x39,0x35,0x31,0x2d,0x29,0x0,0x20,0x40,0x60,0x80,0xa0,0xc0,0xe0,0xe4,0xe8,0xec,0xf0,0xf4,0xf8,0xfc,0xdc,0xbc,0x9c,0x7c,0x5c,0x3c,0x1c,0x18,0x14,0x10,0xc,0x8,0x4};
/*railway 2*/
uchar xdata dat2[28]={0x0,0x20,0x40,0x60,0x80,0xa0,0xc0,0xe0,0xe4,0xe8,0xec,0xf0,0xf4,0xf8,0xfc,0xdc,0xbc,0x9c,0x7c,0x5c,0x3c,0x1c,0x18,0x14,0x10,0xc,0x8,0x4};
/*railway 3*/
uchar code dat3[24]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x16,0x26,0x36,0x46,0x56,0x66,0x65,0x64,0x63,0x62,0x61,0x60,0x50,0x40,0x30,0x20,0x10};
/*3p char*/
uchar code table_3p[3][8]={0xff,0x89,0xf5,0x93,0x93,0xf5,0x89,0xff,0x0e,0x1f,0x3f,0x7e,0x7e,0x3f,0x1f,0x0e,0x18,0x3c,0x7e,0xff,0x18,0x18,0x18,0x18};
xdata uint zz,aa;
uchar code table_cha1[8][8]={0x7e,0x81,0xbd,0x99,0x5a,0x18,0x18,0x7e,0x3c,0x66,0x60,0x38,0x60,0x60,0x66,0x3c,0x3c,0x66,0x66,0x30,0x18,0x0c,0x06,0x7e,0x18,0x1c,0x18,0x18,0x18,0x18,0x18,0x3c,0x1c,0x3e,0x02,0x1e,0x3C,0x30,0x3e,0x1C,0x7e,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x1e,0x36,0x26,0x26,0x26,0x26,0x36,0x1e,0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x3c};
uchar code table_cha2[8][8]={0x04,0x06,0x0d,0x15,0x15,0x0d,0x06,0x04,0x04,0x16,0x25,0x45,0x45,0x25,0x16,0x04,0x24,0x46,0x85,0x85,0x85,0x85,0x46,0x24,0x7e,0x55,0x3c,0x18,0x18,0x18,0x18,0x18,0x24,0x24,0x24,0xe7,0x24,0x24,0x24,0x00,0x7e,0x81,0xbd,0x99,0x5a,0x18,0x18,0x7e,0x3c,0x66,0x60,0x38,0x60,0x60,0x66,0x3c,0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x3c};
/*initializtion
That is to initialize the program .
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
xdata uchar display[8][8];
/*rank:A,1,2,3,4,I,心,U*/
uchar xdata table_cha[8][8]={0x51,0x51,0x51,0x4a,0x4a,0x4a,0x44,0x44,0x18,0x1c,0x18,0x18,0x18,0x18,0x18,0x3c,0x3c,0x66,0x66,0x30,0x18,0xc,0x6,0xff,0x3c,0x66,0x60,0x38,0x60,0x60,0x66,0x3c,0x30,0x38,0x3c,0x3e,0x36,0x7e,0x30,0x30,0x3c,0x3c,0x18,0x18,0x18,0x18,0x3c,0x3c,0x66,0xff,0xff,0xff,0x7e,0x3c,0x18,0x18,0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x3c};
/*the "ideasoft"*/
uchar xdata table_id[40]={0x81,0xff,0x81,0x00,0xff,0x81,0x81,0x7e,0x00,0xff,0x89,0x89,0x00,0xf8,0x27,0x27,0xf8,0x00,0x8f,0x89,0x89,0xf9,0x00,0xff,0x81,0x81,0xff,0x00,0xff,0x09,0x09,0x09,0x01,0x0,0x01,0x01,0xff,0x01,0x01,0x00};
/*railway*/
uchar xdata dat[128]={0x0,0x20,0x40,0x60,0x80,0xa0,0xc0,0xe0,0xe4,0xe8,0xec,0xf0,0xf4,0xf8,0xfc,0xdc,0xbc,0x9c,0x7c,0x5c,0x3c,0x1c,0x18,0x14,0x10,0xc,0x8,0x4,0x25,0x45,0x65,0x85,0xa5,0xc5,0xc9,0xcd,0xd1,0xd5,0xd9,0xb9,0x99,0x79,0x59,0x39,0x35,0x31,0x2d,0x29,0x4a,0x6a,0x8a,0xaa,0xae,0xb2,0xb6,0x96,0x76,0x56,0x52,0x4e,0x6f,0x8f,0x93,0x73,0x6f,0x8f,0x93,0x73,0x4a,0x6a,0x8a,0xaa,0xae,0xb2,0xb6,0x96,0x76,0x56,0x52,0x4e,0x25,0x45,0x65,0x85,0xa5,0xc5,0xc9,0xcd,0xd1,0xd5,0xd9,0xb9,0x99,0x79,0x59,0x39,0x35,0x31,0x2d,0x29,0x0,0x20,0x40,0x60,0x80,0xa0,0xc0,0xe0,0xe4,0xe8,0xec,0xf0,0xf4,0xf8,0xfc,0xdc,0xbc,0x9c,0x7c,0x5c,0x3c,0x1c,0x18,0x14,0x10,0xc,0x8,0x4};
/*railway 2*/
uchar xdata dat2[28]={0x0,0x20,0x40,0x60,0x80,0xa0,0xc0,0xe0,0xe4,0xe8,0xec,0xf0,0xf4,0xf8,0xfc,0xdc,0xbc,0x9c,0x7c,0x5c,0x3c,0x1c,0x18,0x14,0x10,0xc,0x8,0x4};
/*railway 3*/
uchar code dat3[24]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x16,0x26,0x36,0x46,0x56,0x66,0x65,0x64,0x63,0x62,0x61,0x60,0x50,0x40,0x30,0x20,0x10};
/*3p char*/
uchar code table_3p[3][8]={0xff,0x89,0xf5,0x93,0x93,0xf5,0x89,0xff,0x0e,0x1f,0x3f,0x7e,0x7e,0x3f,0x1f,0x0e,0x18,0x3c,0x7e,0xff,0x18,0x18,0x18,0x18};
xdata uint zz,aa;
uchar code table_cha1[8][8]={0x7e,0x81,0xbd,0x99,0x5a,0x18,0x18,0x7e,0x3c,0x66,0x60,0x38,0x60,0x60,0x66,0x3c,0x3c,0x66,0x66,0x30,0x18,0x0c,0x06,0x7e,0x18,0x1c,0x18,0x18,0x18,0x18,0x18,0x3c,0x1c,0x3e,0x02,0x1e,0x3C,0x30,0x3e,0x1C,0x7e,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x1e,0x36,0x26,0x26,0x26,0x26,0x36,0x1e,0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x3c};
uchar code table_cha2[8][8]={0x04,0x06,0x0d,0x15,0x15,0x0d,0x06,0x04,0x04,0x16,0x25,0x45,0x45,0x25,0x16,0x04,0x24,0x46,0x85,0x85,0x85,0x85,0x46,0x24,0x7e,0x55,0x3c,0x18,0x18,0x18,0x18,0x18,0x24,0x24,0x24,0xe7,0x24,0x24,0x24,0x00,0x7e,0x81,0xbd,0x99,0x5a,0x18,0x18,0x7e,0x3c,0x66,0x60,0x38,0x60,0x60,0x66,0x3c,0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x3c};
/*initializtion
That is to initialize the program .
It is write to set the timer in c52 mcu.
So the program can renovate the led_3d_cube in fixed time use the interrupt function.*/
void sinter()
{
ES=1;
//ET1=1;//T1作作为波特率发生器,且只能用方式2
ET0=1;
TMOD=0x20;//定时器to、t1工作方式2,自动重装载
PCON=0x00;
SCON=0x50;//置串行口方式3接收
TH1=0xf3;
TL1=0xf3;
TH0=0xc0; //定时器TO初值
TL0=0xc0;
TR0=1;
TR1=1;
IT0=1;
IT1=1;
EX0=1;
EX1=1;
EA=1;
}
void delay5us(void) //误差 -0.026765046296us STC 1T 22.1184Mhz
{
unsigned char a,b;
So the program can renovate the led_3d_cube in fixed time use the interrupt function.*/
void sinter()
{
ES=1;
//ET1=1;//T1作作为波特率发生器,且只能用方式2
ET0=1;
TMOD=0x20;//定时器to、t1工作方式2,自动重装载
PCON=0x00;
SCON=0x50;//置串行口方式3接收
TH1=0xf3;
TL1=0xf3;
TH0=0xc0; //定时器TO初值
TL0=0xc0;
TR0=1;
TR1=1;
IT0=1;
IT1=1;
EX0=1;
EX1=1;
EA=1;
}
void delay5us(void) //误差 -0.026765046296us STC 1T 22.1184Mhz
{
unsigned char a,b;
剩余53页未读,继续阅读
资源评论
- yin112015-01-04很好很强大!
脖子疼大叔
- 粉丝: 0
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功