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

📄 12864_example.s

📁 我们编写了一个支持位操作、普通端口操作、并行操作、串行操作等多种模式的12864驱动
💻 S
📖 第 1 页 / 共 3 页
字号:
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 16,56
	.byte 248,252
	.byte 127,31
	.byte 'O,199
	.byte 131,131
	.byte 128,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 24,30
	.byte 7,129
	.byte 129,217
	.byte 253,252
	.byte 252,238
	.byte 'C,3
	.byte 3,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 1,1
	.byte 1,1
	.byte 0,0
	.byte 0,0
	.byte 3,1
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,1
	.byte 1,0
	.byte 0,1
	.byte 7,7
	.byte 2,2
	.byte 6,6
	.byte 7,1
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 1,0
	.byte 0,0
	.byte 0,0
	.byte 0,7
	.byte 15,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,1
	.byte 1,3
	.byte 7,1
	.byte 1,3
	.byte 1,1
	.byte 1,3
	.byte 3,7
	.byte 6,0
	.byte 0,0
	.byte 0,0
	.byte 0,2
	.byte 2,3
	.byte 3,1
	.byte 0,0
	.byte 0,0
	.byte 1,3
	.byte 3,3
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,1
	.byte 1,0
	.byte 8,12
	.byte 7,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,'p
	.byte 'x,136
	.byte 142,15
	.byte 1,129
	.byte 142,142
	.byte 250,'r
	.byte 2,226
	.byte 226,2
	.byte 2,254
	.byte 252,0
	.byte 0,0
	.byte 0,254
	.byte 255,129
	.byte 129,145
	.byte 129,193
	.byte 127,127
	.byte 'A,'A
	.byte 'A,145
	.byte 129,129
	.byte 255,254
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 224,254
	.byte 3,1
	.byte 1,1
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 192,'p
	.byte 16,16
	.byte 16,254
	.byte 255,1
	.byte 1,63
	.byte 62,16
	.byte 16,'p
	.byte 224,0
	.byte 0,192
	.byte 240,60
	.byte 14,3
	.byte 1,17
	.byte 28,30
	.byte 226,2
	.byte 2,34
	.byte 34,2
	.byte 2,2
	.byte 254,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,28
	.byte 62,35
	.byte 225,224
	.byte 0,0
	.byte 248,249
	.byte 15,6
	.byte 0,255
	.byte 255,0
	.byte 8,15
	.byte 15,248
	.byte 0,0
	.byte 0,204
	.byte 196,0
	.byte 0,0
	.byte 0,4
	.byte 252,252
	.byte 13,1
	.byte 2,3
	.byte 0,0
	.byte 196,200
	.byte 0,0
	.byte 192,224
	.byte 48,24
	.byte 12,6
	.byte 3,0
	.byte 0,48
	.byte 'x,192
	.byte 128,0
	.byte 0,0
	.byte 16,32
	.byte 0,0
	.byte 24,62
	.byte 'c,64
	.byte 192,224
	.byte 56,63
	.byte 63,0
	.byte 0,252
	.byte 252,64
	.byte 128,128
	.byte 195,126
	.byte 48,216
	.byte 253,39
	.byte 32,32
	.byte 32,224
	.byte 'r,63
	.byte 12,0
	.byte 0,34
	.byte 34,0
	.byte 0,0
	.byte 63,255
	.byte 128,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,4
	.byte 4,4
	.byte 5,7
	.byte 6,6
	.byte 7,7
	.byte 6,6
	.byte 4,5
	.byte 7,6
	.byte 6,6
	.byte 7,5
	.byte 4,4
	.byte 4,5
	.byte 7,6
	.byte 6,6
	.byte 6,6
	.byte 7,7
	.byte 6,6
	.byte 6,6
	.byte 6,6
	.byte 7,5
	.byte 4,4
	.byte 4,7
	.byte 6,6
	.byte 6,6
	.byte 5,4
	.byte 4,4
	.byte 4,4
	.byte 5,5
	.byte 6,6
	.byte 6,6
	.byte 4,4
	.byte 4,4
	.byte 4,4
	.byte 5,7
	.byte 6,6
	.byte 6,6
	.byte 6,7
	.byte 5,4
	.byte 4,4
	.byte 4,4
	.byte 4,5
	.byte 7,6
	.byte 6,6
	.byte 7,7
	.byte 6,6
	.byte 6,6
	.byte 6,6
	.byte 6,6
	.byte 6,6
	.byte 6,7
	.byte 5,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,48
	.byte 'x,'H
	.byte 200,152
	.byte 184,56
	.byte 0,8
	.byte 248,248
	.byte 200,200
	.byte 248,248
	.byte 8,8
	.byte 248,248
	.byte 8,8
	.byte 248,248
	.byte 8,0
	.byte 48,'x
	.byte 'H,200
	.byte 152,184
	.byte 56,0
	.byte 24,24
	.byte 8,248
	.byte 248,8
	.byte 24,24
	.byte 0,0
	.byte 0,0
	.byte 0,8
	.byte 248,248
	.byte 136,136
	.byte 248,'p
	.byte 0,0
	.byte 240,248
	.byte 8,8
	.byte 8,248
	.byte 240,0
	.byte 8,248
	.byte 248,'H
	.byte 'H,248
	.byte 176,0
	.byte 0,240
	.byte 248,8
	.byte 8,8
	.byte 248,240
	.byte 0,24
	.byte 24,8
	.byte 248,248
	.byte 8,24
	.byte 24,8
	.byte 248,248
	.byte 'H,232
	.byte 248,24
	.byte 0,0
	.byte 0,200
	.byte 248,248
	.byte 192,0
	.byte 0,8
	.byte 248,248
	.byte 240,240
	.byte 248,248
	.byte 8,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,7
	.byte 7,6
	.byte 4,4
	.byte 7,3
	.byte 0,0
	.byte 1,7
	.byte 7,7
	.byte 7,1
	.byte 0,0
	.byte 3,7
	.byte 4,4
	.byte 7,3
	.byte 0,0
	.byte 7,7
	.byte 6,4
	.byte 4,7
	.byte 3,0
	.byte 0,0
	.byte 4,7
	.byte 7,4
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,4
	.byte 7,7
	.byte 0,4
	.byte 7,7
	.byte 4,0
	.byte 3,7
	.byte 4,4
	.byte 4,7
	.byte 3,0
	.byte 4,7
	.byte 7,4
	.byte 4,7
	.byte 3,0
	.byte 0,3
	.byte 7,4
	.byte 4,4
	.byte 7,3
	.byte 0,0
	.byte 0,4
	.byte 7,7
	.byte 4,0
	.byte 0,4
	.byte 7,7
	.byte 4,4
	.byte 6,6
	.byte 0,4
	.byte 7,7
	.byte 5,5
	.byte 7,7
	.byte 4,4
	.byte 7,7
	.byte 4,4
	.byte 7,7
	.byte 4,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.dbsym e LOGO _LOGO A[1024:1024]kc
	.area text(rom, con, rel)
	.dbfile 12864_Example.c
	.dbfunc e PortInit _PortInit fV
	.even
_PortInit::
	.dbline -1
	.dbline 177
	.dbline 178
	ldi R24,255
	out 0x11,R24
	.dbline 179
	out 0x12,R24
	.dbline 181
	out 0x1a,R24
	.dbline 182
	out 0x1b,R24
	.dbline 184
	out 0x14,R24
	.dbline 185
	out 0x15,R24
	.dbline 187
	xcall _PORTDefine
	.dbline -2
L58:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e Timer0Init _Timer0Init fV
	.even
_Timer0Init::
	.dbline -1
	.dbline 194
	.dbline 195
	clr R2
	out 0x33,R2
	.dbline 196
	ldi R24,131
	out 0x32,R24
	.dbline 197
	ldi R24,3
	out 0x33,R24
	.dbline -2
L59:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e Timer0OvfIsr _Timer0OvfIsr fV
	.even
_Timer0OvfIsr::
	st -y,R24
	st -y,R25
	in R24,0x3f
	st -y,R24
	.dbline -1
	.dbline 204
	.dbline 205
	ldi R24,131
	out 0x32,R24
	.dbline 207
	lds R24,_FlashGIFStringCounter
	lds R25,_FlashGIFStringCounter+1
	adiw R24,1
	sts _FlashGIFStringCounter+1,R25
	sts _FlashGIFStringCounter,R24
	.dbline 208
	lds R24,_FlashTimeCounter
	lds R25,_FlashTimeCounter+1
	adiw R24,1
	sts _FlashTimeCounter+1,R25
	sts _FlashTimeCounter,R24
	.dbline -2
L60:
	ld R24,y+
	out 0x3f,R24
	ld R25,y+
	ld R24,y+
	.dbline 0 ; func end
	reti
	.dbend
	.dbfunc e SystemInit _SystemInit fV
	.even
_SystemInit::
	.dbline -1
	.dbline 216
	.dbline 217
	cli
	.dbline 219
	xcall _PortInit
	.dbline 220
	xcall _Timer0Init
	.dbline 222
	xcall _LCD12864Init
	.dbline 224
	ldi R24,1
	out 0x39,R24
	sei
	.dbline -2
L61:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e main _main fV
;              b -> R20
;              a -> R20
;              n -> R20
	.even
_main::
	sbiw R28,5
	.dbline -1
	.dbline 232
	.dbline 233
	clr R20
	.dbline 233
	.dbline 233
	.dbline 234
	xcall _SystemInit
	.dbline 236
	clr R2
	std y+4,R2
	std y+2,R2
	ldi R24,64
	std y+0,R24
	ldi R18,128
	ldi R16,<_LOGO
	ldi R17,>_LOGO
	xcall _LCD12864DispPicture
	xjmp L64
L63:
	.dbline 240
	.dbline 241
	inc R20
	.dbline 242
	cpi R20,64
	brne L66
	.dbline 243
	.dbline 244
	clr R20
	.dbline 245
L66:
	.dbline 246
	lds R30,_VPORTBit
	lds R31,_VPORTBit+1
	ldd R24,z+0
	ori R24,8
	std z+0,R24
	.dbline 246
	.dbline 246
	lds R30,_VPORTBit
	lds R31,_VPORTBit+1
	ldd R24,z+0
	ori R24,16
	std z+0,R24
	.dbline 246
	.dbline 246
	.dbline 247
	ldi R16,7
	xcall _setX
	.dbline 248
	mov R16,R20
	xcall _setY
	.dbline 249
	ldi R16,255
	xcall _sendDataToLCD
	.dbline 250
	clr R16
	xcall _sendDataToLCD
	.dbline 251
	clr R16
	xcall _sendDataToLCD
	.dbline 252
	clr R16
	xcall _sendDataToLCD
	.dbline 253
	clr R16
	xcall _sendDataToLCD
	.dbline 254
	clr R16
	xcall _sendDataToLCD
	.dbline 255
	clr R16
	xcall _sendDataToLCD
	.dbline 256
	clr R16
	xcall _sendDataToLCD
	.dbline 257
	clr R16
	xcall _sendDataToLCD
	.dbline 258
	clr R16
	xcall _sendDataToLCD
	.dbline 259
	clr R16
	xcall _sendDataToLCD
	.dbline 260
	clr R16
	xcall _sendDataToLCD
	.dbline 261
	clr R16
	xcall _sendDataToLCD
	.dbline 262
	clr R16
	xcall _sendDataToLCD
	.dbline 263
	clr R16
	xcall _sendDataToLCD
	.dbline 264
	clr R16
	xcall _sendDataToLCD
	.dbline 265
	clr R16
	xcall _sendDataToLCD
	.dbline 266
	clr R16
	xcall _sendDataToLCD
	.dbline 267
	clr R16
	xcall _sendDataToLCD
	.dbline 269
L64:
	.dbline 239
	xjmp L63
X3:
	.dbline -2
L62:
	adiw R28,5
	.dbline 0 ; func end
	ret
	.dbsym r b 20 c
	.dbsym r a 20 c
	.dbsym r n 20 c
	.dbend
	.area bss(ram, con, rel)
	.dbfile 12864_Example.c
_PIND_BIT::
	.blkb 2
	.dbfile G:\单片机\源程序\液晶12864驱动\CGM12864\LCD12864_Example/RD_ATMega16L.h
	.dbstruct 0 1 PORTBIT
	.dbfield 0 Bit0 F[0:1]
	.dbfield 0 Bit1 F[1:1]
	.dbfield 0 Bit2 F[2:1]
	.dbfield 0 Bit3 F[3:1]
	.dbfield 0 Bit4 F[4:1]
	.dbfield 0 Bit5 F[5:1]
	.dbfield 0 Bit6 F[6:1]
	.dbfield 0 Bit7 F[7:1]
	.dbend
	.dbsym e PIND_BIT _PIND_BIT pS[PORTBIT]
_PINC_BIT::
	.blkb 2
	.dbsym e PINC_BIT _PINC_BIT pS[PORTBIT]
_PINB_BIT::
	.blkb 2
	.dbsym e PINB_BIT _PINB_BIT pS[PORTBIT]
_PINA_BIT::
	.blkb 2
	.dbsym e PINA_BIT _PINA_BIT pS[PORTBIT]
_DDRD_BIT::
	.blkb 2
	.dbsym e DDRD_BIT _DDRD_BIT pS[PORTBIT]
_DDRC_BIT::
	.blkb 2
	.dbsym e DDRC_BIT _DDRC_BIT pS[PORTBIT]
_DDRB_BIT::
	.blkb 2
	.dbsym e DDRB_BIT _DDRB_BIT pS[PORTBIT]
_DDRA_BIT::
	.blkb 2
	.dbsym e DDRA_BIT _DDRA_BIT pS[PORTBIT]
_PORTD_BIT::
	.blkb 2
	.dbsym e PORTD_BIT _PORTD_BIT pS[PORTBIT]
_PORTC_BIT::
	.blkb 2
	.dbsym e PORTC_BIT _PORTC_BIT pS[PORTBIT]
_PORTB_BIT::
	.blkb 2
	.dbsym e PORTB_BIT _PORTB_BIT pS[PORTBIT]
_PORTA_BIT::
	.blkb 2
	.dbsym e PORTA_BIT _PORTA_BIT pS[PORTBIT]

⌨️ 快捷键说明

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