⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd.s

📁 用avr单片机接收GPS的数据的c语言程序
💻 S
📖 第 1 页 / 共 4 页
字号:
	.module lcd.c
	.area lit(rom, con, rel)
_asc::
	.byte 0,0
	.byte 0,0
	.byte 0
	.byte 0,0
	.byte 47,0
	.byte 0
	.byte 0,7
	.byte 0,7
	.byte 0
	.byte 20,127
	.byte 20,127
	.byte 20
	.byte 36,42
	.byte 127,42
	.byte 18
	.byte 196,200
	.byte 16,38
	.byte 'F
	.byte 54,'I
	.byte 'U,34
	.byte 'P
	.byte 0,5
	.byte 3,0
	.byte 0
	.byte 0,28
	.byte 34,'A
	.byte 0
	.byte 0,'A
	.byte 34,28
	.byte 0
	.byte 20,8
	.byte 62,8
	.byte 20
	.byte 8,8
	.byte 62,8
	.byte 8
	.byte 0,0
	.byte 'P,48
	.byte 0
	.byte 16,16
	.byte 16,16
	.byte 16
	.byte 0,96
	.byte 96,0
	.byte 0
	.byte 32,16
	.byte 8,4
	.byte 2
	.byte 62,'Q
	.byte 'I,'E
	.byte 62
	.byte 0,'B
	.byte 127,64
	.byte 0
	.byte 'B,'a
	.byte 'Q,'I
	.byte 'F
	.byte 33,'A
	.byte 'E,'K
	.byte 49
	.byte 24,20
	.byte 18,127
	.byte 16
	.byte 39,'E
	.byte 'E,'E
	.byte 57
	.byte 60,'J
	.byte 'I,'I
	.byte 48
	.byte 1,'q
	.byte 9,5
	.byte 3
	.byte 54,'I
	.byte 'I,'I
	.byte 54
	.byte 6,'I
	.byte 'I,41
	.byte 30
	.byte 0,54
	.byte 54,0
	.byte 0
	.byte 0,'V
	.byte 54,0
	.byte 0
	.byte 8,20
	.byte 34,'A
	.byte 0
	.byte 20,20
	.byte 20,20
	.byte 20
	.byte 0,'A
	.byte 34,20
	.byte 8
	.byte 2,1
	.byte 'Q,9
	.byte 6
	.byte 50,'I
	.byte 'Y,'Q
	.byte 62
	.byte 126,17
	.byte 17,17
	.byte 126
	.byte 127,'I
	.byte 'I,'I
	.byte 54
	.byte 62,'A
	.byte 'A,'A
	.byte 34
	.byte 127,'A
	.byte 'A,34
	.byte 28
	.byte 127,'I
	.byte 'I,'I
	.byte 'A
	.byte 127,9
	.byte 9,9
	.byte 1
	.byte 62,'A
	.byte 'I,'I
	.byte 'z
	.byte 127,8
	.byte 8,8
	.byte 127
	.byte 0,'A
	.byte 127,'A
	.byte 0
	.byte 32,64
	.byte 'A,63
	.byte 1
	.byte 127,8
	.byte 20,34
	.byte 'A
	.byte 127,64
	.byte 64,64
	.byte 64
	.byte 127,2
	.byte 12,2
	.byte 127
	.byte 127,4
	.byte 8,16
	.byte 127
	.byte 62,'A
	.byte 'A,'A
	.byte 62
	.byte 127,9
	.byte 9,9
	.byte 6
	.byte 62,'A
	.byte 'Q,33
	.byte 94
	.byte 127,9
	.byte 25,41
	.byte 'F
	.byte 'F,'I
	.byte 'I,'I
	.byte 49
	.byte 1,1
	.byte 127,1
	.byte 1
	.byte 63,64
	.byte 64,64
	.byte 63
	.byte 31,32
	.byte 64,32
	.byte 31
	.byte 63,64
	.byte 56,64
	.byte 63
	.byte 'c,20
	.byte 8,20
	.byte 'c
	.byte 7,8
	.byte 'p,8
	.byte 7
	.byte 'a,'Q
	.byte 'I,'E
	.byte 'C
	.byte 0,127
	.byte 'A,'A
	.byte 0
	.byte 'U,42
	.byte 'U,42
	.byte 'U
	.byte 0,'A
	.byte 'A,127
	.byte 0
	.byte 4,2
	.byte 1,2
	.byte 4
	.byte 64,64
	.byte 64,64
	.byte 64
	.byte 0,1
	.byte 2,4
	.byte 0
	.byte 32,'T
	.byte 'T,'T
	.byte 'x
	.byte 127,'H
	.byte 'D,'D
	.byte 56
	.byte 56,'D
	.byte 'D,'D
	.byte 32
	.byte 56,'D
	.byte 'D,'H
	.byte 127
	.byte 56,'T
	.byte 'T,'T
	.byte 24
	.byte 8,126
	.byte 9,1
	.byte 2
	.byte 12,'R
	.byte 'R,'R
	.byte 62
	.byte 127,8
	.byte 4,4
	.byte 'x
	.byte 0,'D
	.byte 125,64
	.byte 0
	.byte 32,64
	.byte 'D,61
	.byte 0
	.byte 127,16
	.byte 40,'D
	.byte 0
	.byte 0,'A
	.byte 127,64
	.byte 0
	.byte 124,4
	.byte 24,4
	.byte 'x
	.byte 124,8
	.byte 4,4
	.byte 'x
	.byte 56,'D
	.byte 'D,'D
	.byte 56
	.byte 124,20
	.byte 20,20
	.byte 8
	.byte 8,20
	.byte 20,24
	.byte 124
	.byte 124,8
	.byte 4,4
	.byte 8
	.byte 'H,'T
	.byte 'T,'T
	.byte 32
	.byte 4,63
	.byte 'D,64
	.byte 32
	.byte 60,64
	.byte 64,32
	.byte 124
	.byte 28,32
	.byte 64,32
	.byte 28
	.byte 60,64
	.byte 48,64
	.byte 60
	.byte 'D,40
	.byte 16,40
	.byte 'D
	.byte 12,'P
	.byte 'P,'P
	.byte 60
	.byte 'D,'d
	.byte 'T,'L
	.byte 'D
	.byte 0,8
	.byte 54,'A
	.byte 'A
	.byte 0,0
	.byte 127,0
	.byte 0
	.byte 'A,'A
	.byte 54,8
	.byte 0
	.byte 4,2
	.byte 4,8
	.byte 4
	.byte 0,0
	.byte 0,0
	.byte 0
	.dbfile E:\Program\gps\lcd.c
	.dbsym e asc _asc A[480:96:5]kc
	.area text(rom, con, rel)
	.dbfile E:\Program\gps\lcd.c
	.dbfunc e display _display fV
	.even
_display::
	.dbline -1
	.dbline 122
; #include <iom32v.h>
; #include <macros.h>
; #include <def.h>
; #include <lcd.h>
; 
; extern  char time[10];
; extern  char status;
; extern	char latitude[9];
; extern	char NSind;
; extern	char longtitude[10];
; extern 	char EWind;
; extern  char date[6];
; unsigned char lcd_display2_buffer[8][21];				//显示缓冲区,共168字节
; unsigned char *lcd_display_wrp;
; unsigned char *lcd_display_rdp; 
; 
; // ASCII 5x7 点的字符
; const unsigned char asc [96][5] =
; {
;     { 0x00, 0x00, 0x00, 0x00, 0x00 },  // sp
;     { 0x00, 0x00, 0x2f, 0x00, 0x00 },   // !
;     { 0x00, 0x07, 0x00, 0x07, 0x00 },   // "
;     { 0x14, 0x7f, 0x14, 0x7f, 0x14 },   // #
;     { 0x24, 0x2a, 0x7f, 0x2a, 0x12 },   // $
;     { 0xc4, 0xc8, 0x10, 0x26, 0x46 },   // %
;     { 0x36, 0x49, 0x55, 0x22, 0x50 },   // &
;     { 0x00, 0x05, 0x03, 0x00, 0x00 },   // '
;     { 0x00, 0x1c, 0x22, 0x41, 0x00 },   // (
;     { 0x00, 0x41, 0x22, 0x1c, 0x00 },   // )
;     { 0x14, 0x08, 0x3E, 0x08, 0x14 },   // *
;     { 0x08, 0x08, 0x3E, 0x08, 0x08 },   // +
;     { 0x00, 0x00, 0x50, 0x30, 0x00 },   // ,
;     { 0x10, 0x10, 0x10, 0x10, 0x10 },   // -
;     { 0x00, 0x60, 0x60, 0x00, 0x00 },   // .
;     { 0x20, 0x10, 0x08, 0x04, 0x02 },   // /
;     { 0x3E, 0x51, 0x49, 0x45, 0x3E },   // 0
;     { 0x00, 0x42, 0x7F, 0x40, 0x00 },   // 1
;     { 0x42, 0x61, 0x51, 0x49, 0x46 },   // 2
;     { 0x21, 0x41, 0x45, 0x4B, 0x31 },   // 3
;     { 0x18, 0x14, 0x12, 0x7F, 0x10 },   // 4
;     { 0x27, 0x45, 0x45, 0x45, 0x39 },   // 5
;     { 0x3C, 0x4A, 0x49, 0x49, 0x30 },   // 6
;     { 0x01, 0x71, 0x09, 0x05, 0x03 },   // 7
;     { 0x36, 0x49, 0x49, 0x49, 0x36 },   // 8
;     { 0x06, 0x49, 0x49, 0x29, 0x1E },   // 9
;     { 0x00, 0x36, 0x36, 0x00, 0x00 },   // :
;     { 0x00, 0x56, 0x36, 0x00, 0x00 },   // ;
;     { 0x08, 0x14, 0x22, 0x41, 0x00 },   // <
;     { 0x14, 0x14, 0x14, 0x14, 0x14 },   // =
;     { 0x00, 0x41, 0x22, 0x14, 0x08 },   // >
;     { 0x02, 0x01, 0x51, 0x09, 0x06 },   // ?
;     { 0x32, 0x49, 0x59, 0x51, 0x3E },   // @
;     { 0x7E, 0x11, 0x11, 0x11, 0x7E },   // A
;     { 0x7F, 0x49, 0x49, 0x49, 0x36 },   // B
;     { 0x3E, 0x41, 0x41, 0x41, 0x22 },   // C
;     { 0x7F, 0x41, 0x41, 0x22, 0x1C },   // D
;     { 0x7F, 0x49, 0x49, 0x49, 0x41 },   // E
;     { 0x7F, 0x09, 0x09, 0x09, 0x01 },   // F
;     { 0x3E, 0x41, 0x49, 0x49, 0x7A },   // G
;     { 0x7F, 0x08, 0x08, 0x08, 0x7F },   // H
;     { 0x00, 0x41, 0x7F, 0x41, 0x00 },   // I
;     { 0x20, 0x40, 0x41, 0x3F, 0x01 },   // J
;     { 0x7F, 0x08, 0x14, 0x22, 0x41 },   // K
;     { 0x7F, 0x40, 0x40, 0x40, 0x40 },   // L
;     { 0x7F, 0x02, 0x0C, 0x02, 0x7F },   // M
;     { 0x7F, 0x04, 0x08, 0x10, 0x7F },   // N
;     { 0x3E, 0x41, 0x41, 0x41, 0x3E },   // O
;     { 0x7F, 0x09, 0x09, 0x09, 0x06 },   // P
;     { 0x3E, 0x41, 0x51, 0x21, 0x5E },   // Q
;     { 0x7F, 0x09, 0x19, 0x29, 0x46 },   // R
;     { 0x46, 0x49, 0x49, 0x49, 0x31 },   // S
;     { 0x01, 0x01, 0x7F, 0x01, 0x01 },   // T
;     { 0x3F, 0x40, 0x40, 0x40, 0x3F },   // U
;     { 0x1F, 0x20, 0x40, 0x20, 0x1F },   // V
;     { 0x3F, 0x40, 0x38, 0x40, 0x3F },   // W
;     { 0x63, 0x14, 0x08, 0x14, 0x63 },   // X
;     { 0x07, 0x08, 0x70, 0x08, 0x07 },   // Y
;     { 0x61, 0x51, 0x49, 0x45, 0x43 },   // Z
;     { 0x00, 0x7F, 0x41, 0x41, 0x00 },   // [
;     { 0x55, 0x2A, 0x55, 0x2A, 0x55 },   // 55
;     { 0x00, 0x41, 0x41, 0x7F, 0x00 },   // ]
;     { 0x04, 0x02, 0x01, 0x02, 0x04 },   // ^
;     { 0x40, 0x40, 0x40, 0x40, 0x40 },   // _
;     { 0x00, 0x01, 0x02, 0x04, 0x00 },   // '
;     { 0x20, 0x54, 0x54, 0x54, 0x78 },   // a
;     { 0x7F, 0x48, 0x44, 0x44, 0x38 },   // b
;     { 0x38, 0x44, 0x44, 0x44, 0x20 },   // c
;     { 0x38, 0x44, 0x44, 0x48, 0x7F },   // d
;     { 0x38, 0x54, 0x54, 0x54, 0x18 },   // e
;     { 0x08, 0x7E, 0x09, 0x01, 0x02 },   // f
;     { 0x0C, 0x52, 0x52, 0x52, 0x3E },   // g
;     { 0x7F, 0x08, 0x04, 0x04, 0x78 },   // h
;     { 0x00, 0x44, 0x7D, 0x40, 0x00 },   // i
;     { 0x20, 0x40, 0x44, 0x3D, 0x00 },   // j
;     { 0x7F, 0x10, 0x28, 0x44, 0x00 },   // k
;     { 0x00, 0x41, 0x7F, 0x40, 0x00 },   // l
;     { 0x7C, 0x04, 0x18, 0x04, 0x78 },   // m
;     { 0x7C, 0x08, 0x04, 0x04, 0x78 },   // n
;     { 0x38, 0x44, 0x44, 0x44, 0x38 },   // o
;     { 0x7C, 0x14, 0x14, 0x14, 0x08 },   // p
;     { 0x08, 0x14, 0x14, 0x18, 0x7C },   // q
;     { 0x7C, 0x08, 0x04, 0x04, 0x08 },   // r
;     { 0x48, 0x54, 0x54, 0x54, 0x20 },   // s
;     { 0x04, 0x3F, 0x44, 0x40, 0x20 },   // t
;     { 0x3C, 0x40, 0x40, 0x20, 0x7C },   // u
;     { 0x1C, 0x20, 0x40, 0x20, 0x1C },   // v
;     { 0x3C, 0x40, 0x30, 0x40, 0x3C },   // w
;     { 0x44, 0x28, 0x10, 0x28, 0x44 },   // x
;     { 0x0C, 0x50, 0x50, 0x50, 0x3C },   // y
;     { 0x44, 0x64, 0x54, 0x4C, 0x44 },    // z
; 	{ 0x00, 0x08, 0x36, 0x41, 0x41 },   // {
; 	{ 0x00, 0x00, 0x7f, 0x00, 0x00 },   // |
; 	{ 0x41, 0x41, 0x36, 0x08, 0x00 },   // }
; 	{ 0x04, 0x02, 0x04, 0x08, 0x04 },   // ~
; 	{ 0x00, 0x00, 0x00, 0x00, 0x00 },   // del 
; };
; 
; unsigned char temp_i;
; //声明全局变量
; 
; void display(void)
; {
	.dbline 123
;     Write_time();
	xcall _Write_time
	.dbline 124
; 	Write_latitude();
	xcall _Write_latitude
	.dbline 125
; 	Write_longtitude();
	xcall _Write_longtitude
	.dbline 126
; 	Write_date();
	xcall _Write_date
	.dbline 128
; 
; 	lcd_display2();
	xcall _lcd_display2
	.dbline -2
L1:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e Write_time _Write_time fV
;              i -> <dead>
;           aptr -> R16,R17
	.even
_Write_time::
	.dbline -1
	.dbline 140
; }
; 
; 
; /*******************************************************
;             display every item
;   incluede display time ,data,latitude N/S,longtitude E/W
;   
; ********************************************************/
; 
; //write time to lcd buffer
; void Write_time(void)
; {
	.dbline 145
;    
; 	char*  aptr;
; 	int i;
; 	
; 	aptr=time;
	ldi R16,<_time
	ldi R17,>_time
	.dbline 147
; 		
; 	lcd_display_wrp=&lcd_display2_buffer[1][1];
	ldi R24,<_lcd_display2_buffer+21+1
	ldi R25,>_lcd_display2_buffer+21+1
	sts _lcd_display_wrp+1,R25
	sts _lcd_display_wrp,R24
	.dbline 148
;  	*lcd_display_wrp++='T';
	ldi R24,84
	lds R30,_lcd_display_wrp
	lds R31,_lcd_display_wrp+1
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 149
;  	*lcd_display_wrp++='I';
	ldi R24,73
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 150
;  	*lcd_display_wrp++='M';
	ldi R24,77
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 151
; 	*lcd_display_wrp++='E';
	ldi R24,69
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 152
;  	*lcd_display_wrp++=':';
	ldi R24,58
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 154
; 
; 	*lcd_display_wrp++=time[0];
	lds R2,_time
	st Z+,R2
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 155
; 	*lcd_display_wrp++=time[1];
	lds R2,_time+1
	st Z+,R2
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 156
; 	*lcd_display_wrp++=':';
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 157
; 	*lcd_display_wrp++=time[2];
	lds R2,_time+2
	st Z+,R2
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 158
; 	*lcd_display_wrp++=time[3];
	lds R2,_time+3
	st Z+,R2
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 159
; 	*lcd_display_wrp++=':';
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 160
; 	*lcd_display_wrp++=time[4];
	lds R2,_time+4
	st Z+,R2
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 161
; 	*lcd_display_wrp++=time[5];
	lds R2,_time+5
	st Z+,R2
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 163
;     
;  	lcd_display_wrp=&lcd_display2_buffer[0][0];
	ldi R24,<_lcd_display2_buffer
	ldi R25,>_lcd_display2_buffer
	sts _lcd_display_wrp+1,R25
	sts _lcd_display_wrp,R24
	.dbline 164
;  	lcd_display_rdp=&lcd_display2_buffer[0][0];
	sts _lcd_display_rdp+1,R25
	sts _lcd_display_rdp,R24
	.dbline 165
;  	SEI();
	sei
	.dbline -2
L2:
	.dbline 0 ; func end
	ret
	.dbsym l i 1 I
	.dbsym r aptr 16 pc
	.dbend
	.dbfunc e Write_latitude _Write_latitude fV
;              i -> <dead>
;           aptr -> R16,R17
	.even
_Write_latitude::
	.dbline -1
	.dbline 171
; 
; }
; 
; //write latitude to lcd buffer
; void Write_latitude(void)
; {
	.dbline 176
;    
; 	char*  aptr;
; 	int i;
; 	
; 	aptr=time;
	ldi R16,<_time
	ldi R17,>_time
	.dbline 178
; 		
; 	lcd_display_wrp=&lcd_display2_buffer[2][1];
	ldi R24,<_lcd_display2_buffer+42+1
	ldi R25,>_lcd_display2_buffer+42+1
	sts _lcd_display_wrp+1,R25
	sts _lcd_display_wrp,R24
	.dbline 179
;  	*lcd_display_wrp++='L';
	ldi R24,76
	lds R30,_lcd_display_wrp
	lds R31,_lcd_display_wrp+1
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 180
;  	*lcd_display_wrp++='A';
	ldi R24,65
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 181
;  	*lcd_display_wrp++='T';
	ldi R24,84
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 182
;  	*lcd_display_wrp++=':';
	ldi R24,58
	st Z+,R24
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 184
; 
; 	*lcd_display_wrp++=latitude[0];
	lds R2,_latitude
	st Z+,R2
	sts _lcd_display_wrp+1,R31
	sts _lcd_display_wrp,R30
	.dbline 185
; 	*lcd_display_wrp++=latitude[1];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -