📄 3510i.s
字号:
.module _3510i.c
.area lit(rom, con, rel)
_font6x8::
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,47
.byte 0,0
.byte 0,0
.byte 7,0
.byte 7,0
.byte 0,20
.byte 127,20
.byte 127,20
.byte 0,36
.byte 42,127
.byte 42,18
.byte 0,'b
.byte 'd,8
.byte 19,35
.byte 0,54
.byte 'I,'U
.byte 34,'P
.byte 0,0
.byte 5,3
.byte 0,0
.byte 0,0
.byte 28,34
.byte 'A,0
.byte 0,0
.byte 'A,34
.byte 28,0
.byte 0,20
.byte 8,62
.byte 8,20
.byte 0,8
.byte 8,62
.byte 8,8
.byte 0,0
.byte 0,160
.byte 96,0
.byte 0,8
.byte 8,8
.byte 8,8
.byte 0,0
.byte 96,96
.byte 0,0
.byte 0,32
.byte 16,8
.byte 4,2
.byte 0,62
.byte 'Q,'I
.byte 'E,62
.byte 0,0
.byte 'B,127
.byte 64,0
.byte 0,'B
.byte 'a,'Q
.byte 'I,'F
.byte 0,33
.byte 'A,'E
.byte 'K,49
.byte 0,24
.byte 20,18
.byte 127,16
.byte 0,39
.byte 'E,'E
.byte 'E,57
.byte 0,60
.byte 'J,'I
.byte 'I,48
.byte 0,1
.byte 'q,9
.byte 5,3
.byte 0,54
.byte 'I,'I
.byte 'I,54
.byte 0,6
.byte 'I,'I
.byte 41,30
.byte 0,0
.byte 54,54
.byte 0,0
.byte 0,0
.byte 'V,54
.byte 0,0
.byte 0,8
.byte 20,34
.byte 'A,0
.byte 0,20
.byte 20,20
.byte 20,20
.byte 0,0
.byte 'A,34
.byte 20,8
.byte 0,2
.byte 1,'Q
.byte 9,6
.byte 0,50
.byte 'I,'Y
.byte 'Q,62
.byte 0,124
.byte 18,17
.byte 18,124
.byte 0,127
.byte 'I,'I
.byte 'I,54
.byte 0,62
.byte 'A,'A
.byte 'A,34
.byte 0,127
.byte 'A,'A
.byte 34,28
.byte 0,127
.byte 'I,'I
.byte 'I,'A
.byte 0,127
.byte 9,9
.byte 9,1
.byte 0,62
.byte 'A,'I
.byte 'I,'z
.byte 0,127
.byte 8,8
.byte 8,127
.byte 0,0
.byte 'A,127
.byte 'A,0
.byte 0,32
.byte 64,'A
.byte 63,1
.byte 0,127
.byte 8,20
.byte 34,'A
.byte 0,127
.byte 64,64
.byte 64,64
.byte 0,127
.byte 2,12
.byte 2,127
.byte 0,127
.byte 4,8
.byte 16,127
.byte 0,62
.byte 'A,'A
.byte 'A,62
.byte 0,127
.byte 9,9
.byte 9,6
.byte 0,62
.byte 'A,'Q
.byte 33,94
.byte 0,127
.byte 9,25
.byte 41,'F
.byte 0,'F
.byte 'I,'I
.byte 'I,49
.byte 0,1
.byte 1,127
.byte 1,1
.byte 0,63
.byte 64,64
.byte 64,63
.byte 0,31
.byte 32,64
.byte 32,31
.byte 0,63
.byte 64,56
.byte 64,63
.byte 0,'c
.byte 20,8
.byte 20,'c
.byte 0,7
.byte 8,'p
.byte 8,7
.byte 0,'a
.byte 'Q,'I
.byte 'E,'C
.byte 0,0
.byte 127,'A
.byte 'A,0
.byte 0,'U
.byte 42,'U
.byte 42,'U
.byte 0,0
.byte 'A,'A
.byte 127,0
.byte 0,4
.byte 2,1
.byte 2,4
.byte 0,64
.byte 64,64
.byte 64,64
.byte 0,0
.byte 1,2
.byte 4,0
.byte 0,32
.byte 'T,'T
.byte 'T,'x
.byte 0,127
.byte 'H,'D
.byte 'D,56
.byte 0,56
.byte 'D,'D
.byte 'D,32
.byte 0,56
.byte 'D,'D
.byte 'H,127
.byte 0,56
.byte 'T,'T
.byte 'T,24
.byte 0,8
.byte 126,9
.byte 1,2
.byte 0,24
.byte 164,164
.byte 164,124
.byte 0,127
.byte 8,4
.byte 4,'x
.byte 0,0
.byte 'D,125
.byte 64,0
.byte 0,64
.byte 128,132
.byte 125,0
.byte 0,127
.byte 16,40
.byte 'D,0
.byte 0,0
.byte 'A,127
.byte 64,0
.byte 0,124
.byte 4,24
.byte 4,'x
.byte 0,124
.byte 8,4
.byte 4,'x
.byte 0,56
.byte 'D,'D
.byte 'D,56
.byte 0,252
.byte 36,36
.byte 36,24
.byte 0,24
.byte 36,36
.byte 24,252
.byte 0,124
.byte 8,4
.byte 4,8
.byte 0,'H
.byte 'T,'T
.byte 'T,32
.byte 0,4
.byte 63,'D
.byte 64,32
.byte 0,60
.byte 64,64
.byte 32,124
.byte 0,28
.byte 32,64
.byte 32,28
.byte 0,60
.byte 64,48
.byte 64,60
.byte 0,'D
.byte 40,16
.byte 40,'D
.byte 0,28
.byte 160,160
.byte 160,124
.byte 0,'D
.byte 'd,'T
.byte 'L,'D
.byte 20,20
.byte 20,20
.byte 20,20
.dbfile D:\StudyRoom\学习AVR\3510测试ICC版/english_6x8_pixel.h
.dbsym e font6x8 _font6x8 A[552:92:6]kc
.area text(rom, con, rel)
.dbfile D:\StudyRoom\学习AVR\3510测试ICC版/english_6x8_pixel.h
.dbfile D:\StudyRoom\学习AVR\3510测试ICC版\3510i.c
.dbfunc e LCD_Delay _LCD_Delay fV
; i -> R16,R17
.even
_LCD_Delay::
.dbline -1
.dbline 8
; #include "3510i.h"
; #include "math.h"
; #include "english_6x8_pixel.h"
;
; uchar LCD_BGColor;
; uchar LCD_PenColor;
; void LCD_Delay(void)
; {
.dbline 10
; uint i;
; for(i = 0; i < 32768; i ++)
clr R16
clr R17
xjmp L5
L2:
.dbline 11
NOP
L3:
.dbline 10
subi R16,255 ; offset = 1
sbci R17,255
L5:
.dbline 10
cpi R16,0
ldi R30,128
cpc R17,R30
brlo L2
.dbline -2
L1:
.dbline 0 ; func end
ret
.dbsym r i 16 i
.dbend
.dbfunc e LCD_Reset _LCD_Reset fV
.even
_LCD_Reset::
.dbline -1
.dbline 15
; asm("NOP");
; }
;
; void LCD_Reset(void)
; {
.dbline 16
; clr_bit(LCD_RST_PORT, LCD_RST); //set RST = L
cbi 0x18,3
.dbline 17
; LCD_Delay();
xcall _LCD_Delay
.dbline 18
; set_bit(LCD_RST_PORT, LCD_RST); //set RST = H
sbi 0x18,3
.dbline 19
; LCD_Delay();
xcall _LCD_Delay
.dbline -2
L6:
.dbline 0 ; func end
ret
.dbend
.dbfunc e LCD_SendCommand _LCD_SendCommand fV
; cmd -> R16
.even
_LCD_SendCommand::
.dbline -1
.dbline 23
; }
;
; void LCD_SendCommand(uchar cmd)
; {
.dbline 24
; set_bit(LCD_SIO_DDR, LCD_SIO); //set SDI.DDR = 1
sbi 0x17,5
.dbline 25
; clr_bit(LCD_CS_PORT, LCD_CS); //set CS = L
cbi 0x18,4
.dbline 26
; clr_bit(LCD_SCL_PORT, LCD_SCL); //set SCK = L
cbi 0x18,7
.dbline 27
; clr_bit(LCD_SIO_PORT, LCD_SIO); //send 0, for command
cbi 0x18,5
.dbline 28
; set_bit(LCD_SCL_PORT, LCD_SCL); //set SCK = H, latch data
sbi 0x18,7
.dbline 30
; //Bit 0(MSB)
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 31
; if(cmd & 0x80)
sbrs R16,7
rjmp L8
.dbline 32
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L9
L8:
.dbline 34
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L9:
.dbline 35
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 37
; //Bit 1
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 38
; if(cmd & 0x40)
sbrs R16,6
rjmp L10
.dbline 39
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L11
L10:
.dbline 41
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L11:
.dbline 42
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 44
; //Bit 2
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 45
; if(cmd & 0x20)
sbrs R16,5
rjmp L12
.dbline 46
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L13
L12:
.dbline 48
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L13:
.dbline 49
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 51
; //Bit 3
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 52
; if(cmd & 0x10)
sbrs R16,4
rjmp L14
.dbline 53
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L15
L14:
.dbline 55
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L15:
.dbline 56
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 58
; //Bit 4
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 59
; if(cmd & 0x08)
sbrs R16,3
rjmp L16
.dbline 60
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L17
L16:
.dbline 62
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L17:
.dbline 63
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 65
; //Bit 5
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 66
; if(cmd & 0x04)
sbrs R16,2
rjmp L18
.dbline 67
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L19
L18:
.dbline 69
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L19:
.dbline 70
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 72
; //Bit 6
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 73
; if(cmd & 0x02)
sbrs R16,1
rjmp L20
.dbline 74
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L21
L20:
.dbline 76
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L21:
.dbline 77
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 79
; //Bit 7(LSB)
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 80
; if(cmd & 0x01)
sbrs R16,0
rjmp L22
.dbline 81
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L23
L22:
.dbline 83
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L23:
.dbline 84
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline -2
L7:
.dbline 0 ; func end
ret
.dbsym r cmd 16 c
.dbend
.dbfunc e LCD_SendData _LCD_SendData fV
; data -> R16
.even
_LCD_SendData::
.dbline -1
.dbline 89
; //done
; }
;
; void LCD_SendData(uchar data)
; {
.dbline 90
; set_bit(LCD_SIO_DDR, LCD_SIO); //set SDI.DDR = 1
sbi 0x17,5
.dbline 91
; clr_bit(LCD_CS_PORT, LCD_CS); //set CS = L
cbi 0x18,4
.dbline 92
; clr_bit(LCD_SCL_PORT, LCD_SCL); //set SCK = L
cbi 0x18,7
.dbline 93
; set_bit(LCD_SIO_PORT, LCD_SIO); //send 1, for command
sbi 0x18,5
.dbline 94
; set_bit(LCD_SCL_PORT, LCD_SCL); //set SCK = H, latch data
sbi 0x18,7
.dbline 96
; //Bit 0(MSB)
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 97
; if(data & 0x80)
sbrs R16,7
rjmp L25
.dbline 98
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L26
L25:
.dbline 100
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L26:
.dbline 101
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 103
; //Bit 1
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 104
; if(data & 0x40)
sbrs R16,6
rjmp L27
.dbline 105
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L28
L27:
.dbline 107
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L28:
.dbline 108
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 110
; //Bit 2
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 111
; if(data & 0x20)
sbrs R16,5
rjmp L29
.dbline 112
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L30
L29:
.dbline 114
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L30:
.dbline 115
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 117
; //Bit 3
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 118
; if(data & 0x10)
sbrs R16,4
rjmp L31
.dbline 119
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L32
L31:
.dbline 121
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L32:
.dbline 122
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 124
; //Bit 4
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 125
; if(data & 0x08)
sbrs R16,3
rjmp L33
.dbline 126
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L34
L33:
.dbline 128
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L34:
.dbline 129
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 131
; //Bit 5
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 132
; if(data & 0x04)
sbrs R16,2
rjmp L35
.dbline 133
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L36
L35:
.dbline 135
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L36:
.dbline 136
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 138
; //Bit 6
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 139
; if(data & 0x02)
sbrs R16,1
rjmp L37
.dbline 140
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L38
L37:
.dbline 142
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L38:
.dbline 143
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline 145
; //Bit 7(LSB)
; clr_bit(LCD_SCL_PORT, LCD_SCL);
cbi 0x18,7
.dbline 146
; if(data & 0x01)
sbrs R16,0
rjmp L39
.dbline 147
; set_bit(LCD_SIO_PORT, LCD_SIO);
sbi 0x18,5
xjmp L40
L39:
.dbline 149
; else
; clr_bit(LCD_SIO_PORT, LCD_SIO);
cbi 0x18,5
L40:
.dbline 150
; set_bit(LCD_SCL_PORT, LCD_SCL);
sbi 0x18,7
.dbline -2
L24:
.dbline 0 ; func end
ret
.dbsym r data 16 c
.dbend
.dbfunc e LCD_ReadDummy _LCD_ReadDummy fV
.even
_LCD_ReadDummy::
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -