📄 version1.lst
字号:
__text_start:
__start:
07D1 E5CF LDI R28,0x5F
07D2 E0D8 LDI R29,0x8
07D3 BFCD OUT 0x3D,R28
07D4 BFDE OUT 0x3E,R29
07D5 51C0 SUBI R28,0x10
07D6 40D0 SBCI R29,0
07D7 EA0A LDI R16,0xAA
07D8 8308 STD Y+0,R16
07D9 2400 CLR R0
07DA ECED LDI R30,0xCD
07DB E0F4 LDI R31,4
07DC E014 LDI R17,4
07DD 3CED CPI R30,0xCD
07DE 07F1 CPC R31,R17
07DF F011 BEQ 0x07E2
07E0 9201 ST R0,Z+
07E1 CFFB RJMP 0x07DD
07E2 8300 STD Z+0,R16
07E3 E3E5 LDI R30,0x35
07E4 E0FB LDI R31,0xB
07E5 E6A0 LDI R26,0x60
07E6 E0B0 LDI R27,0
07E7 E01F LDI R17,0xF
07E8 3AE2 CPI R30,0xA2
07E9 07F1 CPC R31,R17
07EA F021 BEQ 0x07EF
07EB 95C8 LPM
07EC 9631 ADIW R30,1
07ED 920D ST R0,X+
07EE CFF9 RJMP 0x07E8
07EF 940E080B CALL _main
_exit:
07F1 CFFF RJMP _exit
FILE: C:\ygksb0108\programme2_can_run\m32_init.c
(0001) //ICC-AVR application builder : 2008-8-10 22:07:54
(0002) // Target : M32
(0003) // Crystal: 1.0000Mhz
(0004)
(0005) #include <iom32v.h>
(0006) #include <macros.h>
(0007)
(0008) void port_init(void)
(0009) {
(0010) PORTA = 0x00;
_port_init:
07F2 2422 CLR R2
07F3 BA2B OUT 0x1B,R2
(0011) DDRA = 0xFF;
07F4 EF8F LDI R24,0xFF
07F5 BB8A OUT 0x1A,R24
(0012) PORTB = 0x00;
07F6 BA28 OUT 0x18,R2
(0013) DDRB = 0xFF;
07F7 BB87 OUT 0x17,R24
(0014) PORTC = 0x00;
07F8 BA25 OUT 0x15,R2
(0015) DDRC = 0xFF;
07F9 BB84 OUT 0x14,R24
(0016) PORTD = 0x00;
07FA BA22 OUT 0x12,R2
(0017) DDRD = 0xFF;
07FB BB81 OUT 0x11,R24
07FC 9508 RET
(0018) }
(0019)
(0020) //call this routine to initialize all peripherals
(0021) void init_devices(void)
(0022) {
(0023) //stop errant interrupts until set up
(0024) CLI(); //disable all interrupts
_init_devices:
07FD 94F8 BCLR 7
(0025) port_init();
07FE DFF3 RCALL _port_init
(0026)
(0027) MCUCR = 0x00;
07FF 2422 CLR R2
0800 BE25 OUT 0x35,R2
(0028) GICR = 0x00;
0801 BE2B OUT 0x3B,R2
(0029) TIMSK = 0x00; //timer interrupt sources
0802 BE29 OUT 0x39,R2
(0030) SEI(); //re-enable interrupts
0803 9478 BSET 7
0804 9508 RET
FILE: C:\ygksb0108\programme2_can_run\main.c
(0001) //******************************************************************************
(0002) // 本程序介绍
(0003) // ---北京交通大学电气学院 杨罡 2008.8
(0004) //
(0005) // 编译环境ICC6.31,
(0006) // 使用ATMEGA32单片机 & KS0108B/HD61202控制器的128*64液晶
(0007) //
(0008) // 1、 本程序实现了基本的GUI绘图函数
(0009) // void lcd_fill( uint8_t pattern);全屏幕填充函数
(0010) // void lcd_erase(void); 擦除全屏幕的函数
(0011) // void lcd_update_all(void); 把缓冲区显示到液晶上的刷新函数
(0012) // void lcd_dot( uint8_t x, uint8_t y, uint8_t mode); 任意坐标画点的函数
(0013) // void lcd_line( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t mode );
(0014) // 任意(x1,y1)(x2,y2)两点之间的画直线函数,这个函数化很短的斜线时会出问题,一般的长斜线无问题
(0015) // void lcd_rect( uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t mode);
(0016) // 画以(x,y)为左上角,高height,长width 的矩形的函数
(0017) // void lcd_box( uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t mode);
(0018) // 画以(x,y)为左上角,高height,长width 的矩形并且用mode方式填充的函数
(0019) // void lcd_circle( uint8_t xCenter, uint8_t yCenter, uint8_t radius, uint8_t mode);
(0020) // 画(xCenter,yCenter)为圆心,半径为radius的函数,圆心可以在屏幕外面,所以可以画弧:)
(0021) // 2、本程序实现多种字体
(0022) // 可以根据需求去font.h文件选择你需要的字体,提供了5点6点7点9点10点15点18点
(0023) // 的英文字体供用户选择,中文字库太大没有实现,不过一般英文就公用了吧
(0024) // void lcd_text(uint8_t left, uint8_t top, uint8_t font, char *str);
(0025) // 显示在坐标为(left,top)处显示字体为 font 的即时字符串 str
(0026) // void lcd_text_p(uint8_t left, uint8_t top, uint8_t font, const char *str);
(0027) // 显示在坐标为(left,top)处显示字体为 font 的存放在flash中的字符串 str
(0028) // font 参见font.h中的定义,需要先选择后使用
(0029) // 3、移植性
(0030) // 液晶很多,这个只是其中一种的程序,但是本程序是可以移植的,你只需根据具体
(0031) // 具体的液晶控制器去重写 LCD_DRIVER.H 和LCD_DRIVER.C 就可以了
(0032) // 4、使用
(0033) // 由于使用显示缓存区的缘故所以
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -