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

📄 rfidsys.s

📁 读写器与射频卡通信的设计采用RC522射频读写芯片与射频卡进行通信
💻 S
📖 第 1 页 / 共 3 页
字号:
	clr R31
	sbrc R30,7
	com R31
	add R30,R24
	adc R31,R25
	ldd R24,z+0
	clr R25
	adiw R24,48
	mov R18,R24
	andi R18,15
	andi R19,0
	lsl R18
	rol R19
	lsl R18
	rol R19
	lsl R18
	rol R19
	lsl R18
	rol R19
	mov R16,R24
	andi R16,240
	andi R17,0
	xcall _lcd_wrDat
	.dbline 188
	ldi R16,40
	ldi R17,0
	xcall _delay50us
	.dbline 190
L162:
	.dbline 185
	dec R10
L164:
	.dbline 185
	mov R24,R10
	cpi R24,0
	brge L161
	.dbline -2
L142:
	adiw R28,1
	xcall pop_gset5
	.dbline 0 ; func end
	ret
	.dbsym r effectLen 12 C
	.dbsym r i 10 C
	.dbsym l length 15 c
	.dbsym l dat 11 l
	.dbsym r y 14 c
	.dbsym r x 10 c
	.dbend
	.dbfunc e lcd_puts _lcd_puts fV
;            str -> R20,R21
;              y -> R10
;              x -> R22
	.even
_lcd_puts::
	xcall push_gset3
	mov R10,R18
	mov R22,R16
	ldd R20,y+6
	ldd R21,y+7
	.dbline -1
	.dbline 194
	.dbline 195
	mov R18,R10
	mov R16,R22
	xcall _lcd_set_xy
	.dbline 196
	ldi R16,20
	ldi R17,0
	xcall _delay50us
	xjmp L167
L166:
	.dbline 199
	.dbline 200
	movw R30,R20
	ldd R2,z+0
	clr R3
	mov R18,R2
	andi R18,15
	andi R18,#0x0F
	swap R18
	mov R16,R2
	andi R16,240
	xcall _lcd_wrDat
	.dbline 201
	subi R20,255  ; offset = 1
	sbci R21,255
	.dbline 202
	ldi R16,20
	ldi R17,0
	xcall _delay50us
	.dbline 204
L167:
	.dbline 198
	movw R30,R20
	ldd R2,z+0
	tst R2
	brne L166
	.dbline -2
L165:
	xcall pop_gset3
	.dbline 0 ; func end
	ret
	.dbsym r str 20 pc
	.dbsym r y 10 c
	.dbsym r x 22 c
	.dbend
	.dbfunc e lcd_puts_ _lcd_puts_ fV
;          dlyMs -> R20
;            str -> R22,R23
;              y -> R12
;              x -> R10
	.even
_lcd_puts_::
	xcall push_gset4
	mov R12,R18
	mov R10,R16
	ldd R22,y+8
	ldd R23,y+9
	ldd R20,y+10
	.dbline -1
	.dbline 208
	.dbline 209
	mov R18,R12
	mov R16,R10
	xcall _lcd_set_xy
	.dbline 210
	ldi R16,20
	ldi R17,0
	xcall _delay50us
	xjmp L171
L170:
	.dbline 213
	.dbline 214
	movw R30,R22
	ldd R2,z+0
	clr R3
	mov R18,R2
	andi R18,15
	andi R18,#0x0F
	swap R18
	mov R16,R2
	andi R16,240
	xcall _lcd_wrDat
	.dbline 215
	subi R22,255  ; offset = 1
	sbci R23,255
	.dbline 216
	mov R16,R20
	clr R17
	xcall _delay50ms
	.dbline 217
L171:
	.dbline 212
	movw R30,R22
	ldd R2,z+0
	tst R2
	brne L170
	.dbline -2
L169:
	xcall pop_gset4
	.dbline 0 ; func end
	ret
	.dbsym r dlyMs 20 c
	.dbsym r str 22 pc
	.dbsym r y 12 c
	.dbsym r x 10 c
	.dbend
	.dbfunc e lcd_clr _lcd_clr fV
	.even
_lcd_clr::
	.dbline -1
	.dbline 221
	.dbline 222
	ldi R18,16
	clr R16
	xcall _lcd_wrCmd
	.dbline 223
	ldi R16,200
	ldi R17,0
	xcall _delay50us
	.dbline -2
L173:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e lcd_init _lcd_init fV
	.even
_lcd_init::
	.dbline -1
	.dbline 228
	.dbline 229
	xcall _SPI_init
	.dbline 232
	ldi R16,1
	ldi R17,0
	xcall _delay50ms
	.dbline 233
	ldi R18,48
	ldi R16,48
	xcall _lcd_wrCmd
	.dbline 235
	ldi R18,192
	clr R16
	xcall _lcd_wrCmd
	.dbline 236
	ldi R18,16
	clr R16
	xcall _lcd_wrCmd
	.dbline 238
	ldi R18,96
	clr R16
	xcall _lcd_wrCmd
	.dbline 240
	ldi R16,1
	ldi R17,0
	xcall _delay50ms
	.dbline -2
L174:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfile D:\RFIDsys\RFIDsys.C
	.dbfunc e init_device _init_device fV
	.even
_init_device::
	.dbline -1
	.dbline 51
	.dbline 56
	clr R2
	out 0x1b,R2
	.dbline 57
	out 0x1a,R2
	.dbline 62
	out 0x18,R2
	.dbline 63
	out 0x17,R2
	.dbline 68
	out 0x15,R2
	.dbline 69
	out 0x14,R2
	.dbline 74
	out 0x12,R2
	.dbline 75
	out 0x11,R2
	.dbline 82
	out 0x33,R2
	.dbline 83
	out 0x32,R2
	.dbline 84
	out 0x3c,R2
	.dbline 98
	out 0x2f,R2
	.dbline 99
	out 0x2e,R2
	.dbline 100
	out 0x2d,R2
	.dbline 101
	out 0x2c,R2
	.dbline 102
	out 0x27,R2
	.dbline 103
	out 0x26,R2
	.dbline 104
	out 0x2b,R2
	.dbline 105
	out 0x2a,R2
	.dbline 106
	out 0x29,R2
	.dbline 107
	out 0x28,R2
	.dbline 114
	out 0x22,R2
	.dbline 115
	out 0x25,R2
	.dbline 116
	out 0x24,R2
	.dbline 117
	out 0x23,R2
	.dbline 123
	out 0x35,R2
	.dbline 124
	out 0x34,R2
	.dbline 127
	out 0x39,R2
	.dbline 132
	ldi R24,128
	out 0x8,R24
	.dbline 133
	out 0x30,R2
	.dbline -2
L175:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e main _main fV
;              a -> R20
	.even
_main::
	sbiw R28,2
	.dbline -1
	.dbline 137
	.dbline 138
	clr R20
	.dbline 139
	xcall _init_device
	.dbline 140
	sbi 0x18,1
	.dbline 144
	sbi 0x1a,0
	.dbline 145
	in R24,0x1b
	andi R24,254
	out 0x1b,R24
	.dbline 149
	sei
	.dbline 150
	xcall _lcd_init
	.dbline 151
	ldi R24,<L177
	ldi R25,>L177
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 152
	sbi 0x18,2
	.dbline 153
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 154
	ldi R24,<L178
	ldi R25,>L178
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 155
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 156
	ldi R24,<L179
	ldi R25,>L179
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 157
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 158
	ldi R24,<L177
	ldi R25,>L177
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 159
	in R24,0x18
	andi R24,251
	out 0x18,R24
	.dbline 160
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 161
	ldi R24,<L178
	ldi R25,>L178
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 162
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 163
	ldi R24,<L179
	ldi R25,>L179
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 164
	sbi 0x18,2
	.dbline 165
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 166
	ldi R24,<L177
	ldi R25,>L177
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 167
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 168
	ldi R24,<L178
	ldi R25,>L178
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 169
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 170
	ldi R24,<L179
	ldi R25,>L179
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 171
	in R24,0x18
	andi R24,251
	out 0x18,R24
	.dbline 172
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 173
	ldi R24,<L177
	ldi R25,>L177
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 174
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 175
	ldi R24,<L178
	ldi R25,>L178
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 176
	ldi R16,2
	ldi R17,0
	xcall _delay50ms
	.dbline 178
	xcall _lcd_clr
	.dbline 182
	ldi R16,6
	ldi R17,0
	xcall _delay50ms
	.dbline 183
	ldi R24,<L180
	ldi R25,>L180
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,1
	xcall _lcd_puts
	.dbline 184
	ldi R24,<L181
	ldi R25,>L181
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 185
	ldi R24,<L182
	ldi R25,>L182
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,3
	xcall _lcd_puts
	.dbline 186
	ldi R24,<L183
	ldi R25,>L183
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,4
	xcall _lcd_puts
	.dbline 187
	ldi R16,20
	ldi R17,0
	xcall _delay50ms
	.dbline 188
	ldi R24,<L184
	ldi R25,>L184
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,4
	xcall _lcd_puts
	.dbline 189
	ldi R16,20
	ldi R17,0
	xcall _delay50ms
	.dbline 190
	ldi R24,<L185
	ldi R25,>L185
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,4
	xcall _lcd_puts
	.dbline 191
	ldi R16,20
	ldi R17,0
	xcall _delay50ms
	.dbline 192
	ldi R24,<L186
	ldi R25,>L186
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,4
	xcall _lcd_puts
	.dbline 193
	ldi R16,20
	ldi R17,0
	xcall _delay50ms
	.dbline 194
	ldi R24,<L187
	ldi R25,>L187
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,4
	xcall _lcd_puts
	.dbline 195
	ldi R16,20
	ldi R17,0
	xcall _delay50ms
	.dbline 196
	xcall _lcd_clr
	.dbline 197
	ldi R16,10
	ldi R17,0
	xcall _delay50ms
	.dbline 198
	in R24,0x18
	andi R24,207
	out 0x18,R24
	xjmp L189
L188:
	.dbline 201
	.dbline 202
	ldi R24,<L191
	ldi R25,>L191
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,1
	xcall _lcd_puts
	.dbline 203
	sbis 0x19,0
	rjmp L192
	.dbline 203
	.dbline 204
	ldi R16,3
	ldi R17,0
	xcall _delay50ms
	.dbline 205
	sbis 0x19,0
	rjmp L194
	.dbline 205
	.dbline 206
	cpi R20,1
	brne L196
	.dbline 207
	.dbline 208
	sbi 0x1a,1
	.dbline 209
	in R24,0x1b
	andi R24,253
	out 0x1b,R24
	.dbline 210
	clr R20
	.dbline 211
	xjmp L197
L196:
	.dbline 212
	.dbline 213
	sbi 0x1a,1
	.dbline 214
	sbi 0x1b,1
	.dbline 215
	ldi R20,1
	.dbline 216
L197:
	.dbline 217
L194:
	.dbline 219
L192:
	.dbline 221
	sbis 0x13,0
	rjmp L198
	.dbline 222
	.dbline 223
	sbi 0x11,0
	.dbline 224
	in R24,0x12
	andi R24,254
	out 0x12,R24
	.dbline 225
	ldi R24,<L200
	ldi R25,>L200
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,3
	xcall _lcd_puts
	.dbline 226
	xjmp L199
L198:
	.dbline 228
	.dbline 229
	sbi 0x11,0
	.dbline 230
	sbi 0x12,0
	.dbline 231
	ldi R24,<L201
	ldi R25,>L201
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,3
	xcall _lcd_puts
	.dbline 232
L199:
	.dbline 238
	sbis 0x16,0
	rjmp L202
	.dbline 239
	.dbline 239
	xcall _lcd_clr
	.dbline 240
	sbi 0x18,2
	.dbline 241
	ldi R24,<L204
	ldi R25,>L204
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 242
	ldi R16,14
	ldi R17,0
	xcall _delay50ms
	.dbline 243
	in R24,0x18
	andi R24,251
	out 0x18,R24
	.dbline 244
	ldi R24,<L205
	ldi R25,>L205
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 245
	ldi R16,14
	ldi R17,0
	xcall _delay50ms
	.dbline 246
	ldi R24,<L206
	ldi R25,>L206
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 247
	ldi R16,14
	ldi R17,0
	xcall _delay50ms
	.dbline 248
	ldi R24,<L207
	ldi R25,>L207
	std y+1,R25
	std y+0,R24
	ldi R18,1
	ldi R16,2
	xcall _lcd_puts
	.dbline 249
	ldi R16,14
	ldi R17,0
	xcall _delay50ms
	.dbline 250
	xcall _lcd_clr
	.dbline 251
	ldi R16,14
	ldi R17,0
	xcall _delay50ms
	.dbline 252
	sbi 0x17,1
	.dbline 253
	in R24,0x18
	andi R24,253
	out 0x18,R24
	.dbline 254
L202:
	.dbline 255
L189:
	.dbline 200
	xjmp L188
X2:
	.dbline 255
	.dbline -2
L176:
	adiw R28,2
	.dbline 0 ; func end
	ret
	.dbsym r a 20 c
	.dbend
	.area bss(ram, con, rel)
	.dbfile D:\RFIDsys\RFIDsys.C
_dataElem::
	.blkb 6
	.dbfile D:\Headers\Software.H
	.dbsym e dataElem _dataElem A[6:6]c
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L207:
	.blkb 15
	.area idata
	.byte 32,32,185,216,187,250,214,208,161,164,161,164,161,164,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L206:
	.blkb 13
	.area idata
	.byte 32,32,185,216,187,250,214,208,161,164,161,164,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L205:
	.blkb 11
	.area idata
	.byte 32,32,185,216,187,250,214,208,161,164,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L204:
	.blkb 9
	.area idata
	.byte 32,32,185,216,187,250,214,208,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L201:
	.blkb 15
	.area idata
	.byte 32,32,188,236,178,226,181,189,201,228,198,181,191,168,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L200:
	.blkb 15
	.area idata
	.byte 32,32,195,187,211,208,201,228,198,181,191,168,163,161,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L191:
	.blkb 15
	.area idata
	.byte 32,32,201,228,198,181,191,168,188,236,178,226,214,208,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L187:
	.blkb 17
	.area idata
	.byte 32,'L,'O,'A,'D,'I,'N,'G,161,164,161,164,161,164,161,164
	.byte 0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L186:
	.blkb 15
	.area idata
	.byte 32,'L,'O,'A,'D,'I,'N,'G,161,164,161,164,161,164,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L185:
	.blkb 13
	.area idata
	.byte 32,'L,'O,'A,'D,'I,'N,'G,161,164,161,164,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L184:
	.blkb 11
	.area idata
	.byte 32,'L,'O,'A,'D,'I,'N,'G,161,164,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L183:
	.blkb 9
	.area idata
	.byte 32,'L,'O,'A,'D,'I,'N,'G,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L182:
	.blkb 17
	.area idata
	.byte 202,214,179,214,202,189,201,228,198,181,182,193,208,180,198,247
	.byte 0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L181:
	.blkb 13
	.area idata
	.byte 32,32,32,32,177,207,210,181,201,232,188,198,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L180:
	.blkb 15
	.area idata
	.byte 32,32,'B,'E,'S,'T,'i,45,48,52,49,50,50,57,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L179:
	.blkb 13
	.area idata
	.byte 32,32,32,32,198,244,182,175,214,208,32,47,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L178:
	.blkb 13
	.area idata
	.byte 32,32,32,32,198,244,182,175,214,208,32,92,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H
L177:
	.blkb 13
	.area idata
	.byte 32,32,32,32,198,244,182,175,214,208,32,45,0
	.area data(ram, con, rel)
	.dbfile D:\Headers\Software.H

⌨️ 快捷键说明

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