📄 display_led.s
字号:
.module display_led.c
.area code(ram, con, rel)
.area lit(rom, con, rel)
_buf::
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 40,4
.byte 36,8
.byte 34,50
.byte 33,194
.byte 38,194
.byte 56,52
.byte 4,4
.byte 24,8
.byte 240,48
.byte 23,192
.byte 16,96
.byte 16,24
.byte 20,12
.byte 24,6
.byte 16,4
.byte 0,0
.byte 2,2
.byte 130,4
.byte 's,248
.byte 32,4
.byte 0,2
.byte 63,226
.byte 32,'B
.byte 64,130
.byte 64,2
.byte 63,250
.byte 32,2
.byte 32,'B
.byte 32,34
.byte 63,194
.byte 0,2
.byte 0,0
.byte 0,0
.byte 2,1
.byte 'B,2
.byte 34,4
.byte 58,24
.byte 19,224
.byte 2,0
.byte 254,0
.byte 2,0
.byte 3,252
.byte 10,2
.byte 'r,2
.byte 34,2
.byte 6,2
.byte 2,30
.byte 0,0
.byte 0,0
.byte 31,248
.byte 0,0
.byte 0,0
.byte 127,254
.byte 2,0
.byte 12,0
.byte 241,254
.byte 'P,132
.byte 16,132
.byte 24,252
.byte 22,132
.byte 16,132
.byte 17,254
.byte 16,128
.byte 0,0
.byte 0,0
.byte 0,0
.byte 63,224
.byte 16,64
.byte 16,64
.byte 16,64
.byte 16,64
.byte 255,255
.byte 16,64
.byte 16,64
.byte 16,64
.byte 16,64
.byte 63,224
.byte 16,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 127,255
.byte 64,2
.byte 'P,18
.byte 'Q,18
.byte 'Q,18
.byte 'Q,18
.byte 95,242
.byte 'Q,18
.byte 'Q,146
.byte 'Q,'r
.byte 'P,18
.byte 64,2
.byte 127,255
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 31,240
.byte 18,32
.byte 18,32
.byte 18,32
.byte 18,32
.byte 255,252
.byte 18,34
.byte 18,34
.byte 18,34
.byte 18,34
.byte 31,242
.byte 0,2
.byte 0,14
.byte 0,0
.byte 0,128
.byte 0,128
.byte 64,128
.byte 64,128
.byte 64,128
.byte 64,130
.byte 64,129
.byte 'G,254
.byte 'H,128
.byte 'P,128
.byte 96,128
.byte 64,128
.byte 0,128
.byte 1,128
.byte 0,128
.byte 0,0
.byte 1,0
.byte 2,0
.byte 12,0
.byte 63,254
.byte 224,0
.byte 'P,0
.byte 21,126
.byte 21,'D
.byte 149,'D
.byte 'u,'D
.byte 'U,'D
.byte 21,'D
.byte 21,126
.byte 16,0
.byte 16,0
.byte 0,0
.byte 0,0
.byte 0,4
.byte 0,28
.byte 63,128
.byte 42,188
.byte 42,130
.byte 'j,130
.byte 170,162
.byte 42,154
.byte 42,130
.byte 42,130
.byte 63,142
.byte 0,0
.byte 0,16
.byte 0,12
.byte 0,0
.byte 16,128
.byte 16,130
.byte 17,1
.byte 255,254
.byte 18,0
.byte 20,2
.byte 0,2
.byte 19,4
.byte 18,200
.byte 18,48
.byte 254,48
.byte 18,'H
.byte 19,132
.byte 18,6
.byte 16,4
.byte 0,0
.byte 8,8
.byte 8,8
.byte 8,16
.byte 8,32
.byte 8,64
.byte 9,128
.byte 10,0
.byte 255,254
.byte 10,0
.byte 9,0
.byte 'H,128
.byte 40,96
.byte 8,48
.byte 8,24
.byte 8,16
.byte 0,0
.byte 8,0
.byte 143,1
.byte 'h,1
.byte 17,250
.byte 9,2
.byte 19,4
.byte 35,8
.byte 229,'p
.byte 37,8
.byte 57,8
.byte 37,4
.byte 51,246
.byte 50,3
.byte 33,2
.byte 1,0
.byte 0,0
.byte 8,32
.byte 132,63
.byte 96,192
.byte 7,2
.byte 0,12
.byte 127,240
.byte 64,4
.byte 'O,136
.byte 'Z,178
.byte 'j,129
.byte 'J,254
.byte 'J,128
.byte 'J,160
.byte 'O,144
.byte 64,12
.byte 0,0
.byte 0,0
.byte 127,254
.byte 64,16
.byte 'H,32
.byte 'D,192
.byte 'C,0
.byte 'D,192
.byte 'X,48
.byte 'D,32
.byte 'B,64
.byte 'A,128
.byte 'N,'d
.byte 'D,6
.byte 127,252
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.dbfile E:\iccavr代码\实验18_扩展板点阵汉字LED显示\display_led.c
.dbsym e buf _buf A[608:608]kc
.area data(ram, con, rel)
.dbfile E:\iccavr代码\实验18_扩展板点阵汉字LED显示\display_led.c
.area text(rom, con, rel)
.dbfile E:\iccavr代码\实验18_扩展板点阵汉字LED显示\display_led.c
.dbfunc e DelaymS _DelaymS fV
; j -> R20
; i -> R16,R17
.even
_DelaymS::
rcall push_gset1
.dbline -1
.dbline 100
; //******************************************************************************
; // *
; // FileName : 扩展板ledspi.c ICCAVR V6.31A编译 *
; // Function : 高档LED显示屏,滚动显示一个数组 *
; // Date : 2006-11-24 *
; // Version : 1.0 *
; // *
; // Author : 开关电源 hongtusy@163.com *
; // Company : 电子信息技术资源网 http://www.itsn.cn *
; // *
; /***************************描述与记事******************************************
; 扩展实验板的AVR程序,使用595驱动点阵汉字LED的练习。
; 记事:本程序旨在对汉字LED驱动的理解与演示,程序适合初学者使用。
; 描述:74HC595是串行输入,并行输出带锁存器的有较大驱动能力的芯片。驱动电流可达70mA。内部有移位和输出两个寄存器。
; 在SRCLK串行时钟上升沿,数据经SER移位进入,或经QH’输出。在RCLK上升沿,数据进入并行输出寄存器。
; SRCLK’和OE’分别是复位和允许输出控制,分别接电源和地。
; 除了系统复位SW3-8外其余平拨开关需要关闭
; 接线定义:PD4=数据,PD5=RCLK并行输出时钟,PD6=SRCLK串行时钟,PD7=OE,PD0=A,PD1=B,PD2=C,PD3=D
; //******************************************************************************/
;
; #include <iom8535v.h> //头文件,使用ATmega8535单片机
; #include <macros.h> //包含一些常用的宏定义,如NOP(),SEI()等。
;
; typedef unsigned char uchar; //数据类型说明,无符号整型,两字节大小。
; typedef unsigned int uint; //数据类型说明,无符号字符型,单字节大小。
;
; //使用片内1MHz晶体,可更换。
;
; #pragma data: code
;
; //欢迎 ,先上后下,先左后右取码,每字32个字节 ,此表格存储在程序存储器中
; const uchar buf[608]={
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //空
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //空
; 0x28,0x04,0x24,0x08,0x22,0x32,0x21,0xC2,0x26,0xC2,0x38,0x34,
; 0x04,0x04,0x18,0x08,0xF0,0x30,0x17,0xC0,0x10,0x60,0x10,0x18,
; 0x14,0x0C,0x18,0x06,0x10,0x04,0x00,0x00, //欢
; 0x02,0x02,0x82,0x04,0x73,0xF8,0x20,0x04,0x00,0x02,0x3F,0xE2,
; 0x20,0x42,0x40,0x82,0x40,0x02,0x3F,0xFA,0x20,0x02,0x20,0x42,
; 0x20,0x22,0x3F,0xC2,0x00,0x02,0x00,0x00, //迎
; 0x00,0x00,0x02,0x01,0x42,0x02,0x22,0x04,0x3A,0x18,0x13,0xE0,
; 0x02,0x00,0xFE,0x00,0x02,0x00,0x03,0xFC,0x0A,0x02,0x72,0x02,
; 0x22,0x02,0x06,0x02,0x02,0x1E,0x00,0x00, //光
; 0x00,0x00,0x1F,0xF8,0x00,0x00,0x00,0x00,0x7F,0xFE,0x02,0x00,
; 0x0C,0x00,0xF1,0xFE,0x50,0x84,0x10,0x84,0x18,0xFC,0x16,0x84,
; 0x10,0x84,0x11,0xFE,0x10,0x80,0x00,0x00, //临
; 0x00,0x00,0x00,0x00,0x3F,0xE0,0x10,0x40,0x10,0x40,0x10,0x40,
; 0x10,0x40,0xFF,0xFF,0x10,0x40,0x10,0x40,0x10,0x40,0x10,0x40,
; 0x3F,0xE0,0x10,0x00,0x00,0x00,0x00,0x00, //中
; 0x00,0x00,0x7F,0xFF,0x40,0x02,0x50,0x12,0x51,0x12,0x51,0x12,
; 0x51,0x12,0x5F,0xF2,0x51,0x12,0x51,0x92,0x51,0x72,0x50,0x12,
; 0x40,0x02,0x7F,0xFF,0x00,0x00,0x00,0x00, //国
; 0x00,0x00,0x00,0x00,0x1F,0xF0,0x12,0x20,0x12,0x20,0x12,0x20,
; 0x12,0x20,0xFF,0xFC,0x12,0x22,0x12,0x22,0x12,0x22,0x12,0x22,
; 0x1F,0xF2,0x00,0x02,0x00,0x0E,0x00,0x00, //电
; 0x00,0x80,0x00,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x40,0x82,
; 0x40,0x81,0x47,0xFE,0x48,0x80,0x50,0x80,0x60,0x80,0x40,0x80,
; 0x00,0x80,0x01,0x80,0x00,0x80,0x00,0x00, //子
; 0x01,0x00,0x02,0x00,0x0C,0x00,0x3F,0xFE,0xE0,0x00,0x50,0x00,
; 0x15,0x7E,0x15,0x44,0x95,0x44,0x75,0x44,0x55,0x44,0x15,0x44,
; 0x15,0x7E,0x10,0x00,0x10,0x00,0x00,0x00, //信
; 0x00,0x00,0x00,0x04,0x00,0x1C,0x3F,0x80,0x2A,0xBC,0x2A,0x82,
; 0x6A,0x82,0xAA,0xA2,0x2A,0x9A,0x2A,0x82,0x2A,0x82,0x3F,0x8E,
; 0x00,0x00,0x00,0x10,0x00,0x0C,0x00,0x00, //息
; 0x10,0x80,0x10,0x82,0x11,0x01,0xFF,0xFE,0x12,0x00,0x14,0x02,
; 0x00,0x02,0x13,0x04,0x12,0xC8,0x12,0x30,0xFE,0x30,0x12,0x48,
; 0x13,0x84,0x12,0x06,0x10,0x04,0x00,0x00, //技
; 0x08,0x08,0x08,0x08,0x08,0x10,0x08,0x20,0x08,0x40,0x09,0x80,
; 0x0A,0x00,0xFF,0xFE,0x0A,0x00,0x09,0x00,0x48,0x80,0x28,0x60,
; 0x08,0x30,0x08,0x18,0x08,0x10,0x00,0x00, //术
; 0x08,0x00,0x8F,0x01,0x68,0x01,0x11,0xFA,0x09,0x02,0x13,0x04,
; 0x23,0x08,0xE5,0x70,0x25,0x08,0x39,0x08,0x25,0x04,0x33,0xF6,
; 0x32,0x03,0x21,0x02,0x01,0x00,0x00,0x00, //资
; 0x08,0x20,0x84,0x3F,0x60,0xC0,0x07,0x02,0x00,0x0C,0x7F,0xF0,
; 0x40,0x04,0x4F,0x88,0x5A,0xB2,0x6A,0x81,0x4A,0xFE,0x4A,0x80,
; 0x4A,0xA0,0x4F,0x90,0x40,0x0C,0x00,0x00, //源
; 0x00,0x00,0x7F,0xFE,0x40,0x10,0x48,0x20,0x44,0xC0,0x43,0x00,
; 0x44,0xC0,0x58,0x30,0x44,0x20,0x42,0x40,0x41,0x80,0x4E,0x64,
; 0x44,0x06,0x7F,0xFC,0x00,0x00,0x00,0x00, //网
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //空
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //空
; };
; #pragma data: data
; /************************************************
; 函 数 名: DelaymS()
; 功 能: 毫秒级延时函数
; 输入参数: 延迟时间/系统晶体
; 输出参数: 做相应的延迟处理
; 描 述: /
; ***********************************************/
; void DelaymS (uint i) //延时函数,参数i为延时时间
; {
.dbline 102
; uchar j; //双重延时
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -