📄 ylf240128.s
字号:
; const uchar jian16[]={//件_16
; 0x18,0x60,
; 0x1F,0x60,
; 0x1B,0xE0,
; 0x3B,0x60,
; 0x33,0xFE,
; 0x76,0x60,
; 0xF6,0x60,
; 0x3C,0x60,
; 0x3F,0xFF,
; 0x30,0x60,
; 0x30,0x60,
; 0x30,0x60,
; 0x30,0x60,
; 0x30,0x60,
; 0x30,0x60,
; 0x30,0x60};
;
; const uchar hao16[]={//号_16
; 0x1F,0xF8,//号
; 0x18,0x18,
; 0x18,0x18,
; 0x18,0x18,
; 0x1F,0xF8,
; 0x00,0x00,
; 0xFF,0xFF,
; 0x0C,0x00,
; 0x0C,0x00,
; 0x1F,0xF8,
; 0x0C,0x18,
; 0x00,0x18,
; 0x00,0x18,
; 0x01,0x98,
; 0x00,0xF0,
; 0x00,0x60,
; 0x30,0x60,
; 0x30,0x60};
;
; const uchar ci16[]={//次_16
; 0x01,0x80,//次
; 0x61,0x80,
; 0x37,0x80,
; 0x37,0xFF,
; 0x3F,0x66,
; 0x0F,0x6C,
; 0x1E,0x60,
; 0x18,0x60,
; 0x30,0xE0,
; 0xF0,0xF0,
; 0x61,0xB0,
; 0x63,0x18,
; 0x66,0x0C,
; 0x1C,0x0F,
; 0x70,0x06,
; 0x00,0x00};
;
; const uchar shu16[]={//数_16
; 0x0C,0x30,//数
; 0x6D,0xB8,
; 0x3F,0x30,
; 0x1E,0x30,
; 0xFF,0xFF,
; 0x1E,0x66,
; 0x3F,0xE6,
; 0x6C,0xE6,
; 0x0C,0x3C,
; 0xFF,0xBC,
; 0x1B,0x18,
; 0x3E,0x18,
; 0x0E,0x3C,
; 0x3B,0x6F,
; 0xE0,0xC6,
; 0x00,0x00};
;
; const uchar she16[]={//设_16
; 0x60,0x00,//设
; 0x31,0xF8,
; 0x39,0x98,
; 0x31,0x98,
; 0x01,0x98,
; 0x01,0x98,
; 0xF3,0x0F,
; 0x37,0xFC,
; 0x31,0x8C,
; 0x31,0x8C,
; 0x30,0xD8,
; 0x30,0xD8,
; 0x3C,0x70,
; 0x38,0xD8,
; 0x33,0x8F,
; 0x0E,0x06};
;
; const uchar ding16[]={//定_16
; 0x03,0x00,//定
; 0x01,0x80,
; 0x3F,0xFF,
; 0x30,0x06,
; 0x60,0x0C,
; 0x1F,0xF8,
; 0x01,0x80,
; 0x19,0x80,
; 0x19,0x80,
; 0x19,0xF8,
; 0x19,0x80,
; 0x3D,0x80,
; 0x37,0x80,
; 0x63,0x80,
; 0xC1,0xFE,
; 0x00,0x00};
;
; const uchar xian16[]={//显_16
; 0x00,0x00,//显
; 0x1F,0xF8,
; 0x18,0x18,
; 0x1F,0xF8,
; 0x18,0x18,
; 0x1F,0xF8,
; 0x06,0x60,
; 0x06,0x60,
; 0x66,0x6C,
; 0x36,0x6C,
; 0x1E,0x78,
; 0x1E,0x70,
; 0x06,0x60,
; 0xFF,0xFF,
; 0x00,0x00,
; 0x00,0x00};
;
; const uchar shi16[]={//示_16
; 0x00,0x00,//示
; 0x1F,0xFC,
; 0x00,0x00,
; 0x00,0x00,
; 0x00,0x00,
; 0x7F,0xFF,
; 0x01,0x80,
; 0x01,0x80,
; 0x19,0xB0,
; 0x19,0x98,
; 0x31,0x8C,
; 0x61,0x8E,
; 0xC1,0x86,
; 0x01,0x80,
; 0x07,0x80,
; 0x03,0x00};
;
; const uchar su16[]={//速_16
; 0x00,0xC0,//速
; 0x60,0xC0,
; 0x3F,0xFE,
; 0x30,0xC0,
; 0x00,0xC0,
; 0x07,0xFC,
; 0xF6,0xCC,
; 0x36,0xCC,
; 0x37,0xFC,
; 0x31,0xF0,
; 0x33,0xDC,
; 0x3E,0xCC,
; 0x30,0xC0,
; 0x78,0xC0,
; 0xCF,0xFF,
; 0x00,0x00};
;
; const uchar du16[]={//度_16
; 0x01,0x80,//度
; 0x00,0xC0,
; 0x3F,0xFF,
; 0x33,0x30,
; 0x33,0x30,
; 0x3F,0xFE,
; 0x33,0x30,
; 0x33,0xF0,
; 0x30,0x00,
; 0x37,0xFC,
; 0x33,0x18,
; 0x31,0xB0,
; 0x30,0xE0,
; 0x61,0xB8,
; 0x67,0x0F,
; 0xDC,0x06};
;
; const uchar xing16[]={//行_16
; 0x0C,0x00,//行
; 0x1E,0x00,
; 0x39,0xFE,
; 0x60,0x00,
; 0xCC,0x00,
; 0x0E,0x00,
; 0x1F,0xFF,
; 0x38,0x30,
; 0x78,0x30,
; 0xD8,0x30,
; 0x18,0x30,
; 0x18,0x30,
; 0x18,0x30,
; 0x18,0x30,
; 0x18,0xF0,
; 0x18,0x60};
;
; const uchar cheng16[]={//程_16
; 0x0F,0xFC,//程
; 0x79,0x8C,
; 0x19,0x8C,
; 0x19,0x8C,
; 0xFF,0x8C,
; 0x19,0xFC,
; 0x38,0x00,
; 0x3F,0xFE,
; 0x7E,0x60,
; 0x78,0x60,
; 0xDB,0xFE,
; 0x18,0x60,
; 0x18,0x60,
; 0x18,0x60,
; 0x1F,0xFF,
; 0x18,0x00};
;
; const uchar qi16[]={//起_16
; 0x0C,0x00,//起
; 0x0C,0x00,
; 0x0C,0xFC,
; 0x7F,0x0C,
; 0x0C,0x0C,
; 0x0C,0x0C,
; 0xFF,0xFC,
; 0x0C,0xC0,
; 0x6C,0xC0,
; 0x6F,0xC6,
; 0x6C,0xC6,
; 0x6C,0x7E,
; 0x6C,0x00,
; 0xFC,0x00,
; 0xDF,0xFF,
; 0x00,0x00};
;
; const uchar sshi16[]={//始_16
; 0x18,0x30,//始
; 0x1C,0x38,
; 0x18,0x30,
; 0x18,0x6C,
; 0xFE,0xC6,
; 0x37,0xFF,
; 0x36,0xC6,
; 0x66,0x00,
; 0x66,0xFE,
; 0x3C,0xC6,
; 0x1C,0xC6,
; 0x1E,0xC6,
; 0x33,0xC6,
; 0x63,0xFE,
; 0xC0,0xC6,
; 0x00,0x00};
;
; const uchar zhong16[]={//终_16
; 0x18,0xC0,//终
; 0x18,0xC0,
; 0x30,0xFE,
; 0x3D,0x8C,
; 0x6D,0xCC,
; 0xFB,0x78,
; 0x18,0x30,
; 0x30,0x78,
; 0x60,0xCC,
; 0xFF,0xE7,
; 0x00,0x38,
; 0x00,0x18,
; 0x1C,0x60,
; 0xF0,0x38,
; 0x00,0x1C,
; 0x00,0x0C};
;
; const uchar dian16[]={//点_16
; 0x01,0x80,//点
; 0x01,0x80,
; 0x01,0xFC,
; 0x01,0x80,
; 0x01,0x98,
; 0x1F,0xFC,
; 0x18,0x18,
; 0x18,0x18,
; 0x18,0x18,
; 0x1F,0xF8,
; 0x18,0x18,
; 0x01,0x98,
; 0x3C,0xCC,
; 0x36,0x66,
; 0x66,0x66,
; 0x00,0x00};
;
; const uchar pen16[]={//喷_16
; 0x00,0x60,//喷
; 0x00,0x60,
; 0xFF,0xFE,
; 0xD9,0xF8,
; 0xD9,0xF8,
; 0xDF,0xFF,
; 0xD9,0x98,
; 0xDB,0xFC,
; 0xFB,0x6C,
; 0xDB,0x6C,
; 0xC3,0x6C,
; 0x03,0xFC,
; 0x00,0xD8,
; 0x01,0x8E,
; 0x03,0x07,
; 0x06,0x06};
;
; const uchar sshe16[]={//射_16
; 0x0C,0x0C,//射
; 0x18,0x0C,
; 0x3F,0x8C,
; 0x31,0x8C,
; 0x3F,0xFF,
; 0x31,0x8C,
; 0x3F,0x8C,
; 0x31,0xEC,
; 0x31,0xBC,
; 0x7F,0xBC,
; 0x07,0xBC,
; 0x0D,0x8C,
; 0x19,0x8C,
; 0x31,0x8C,
; 0x67,0xBC,
; 0x03,0x18};
;
; const uchar fen16[]={//分_16
; 0x0C,0xC0,//分
; 0x0E,0xC0,
; 0x0C,0x60,
; 0x18,0x30,
; 0x18,0x38,
; 0x30,0x1C,
; 0x60,0x0F,
; 0xDF,0xF6,
; 0x06,0x30,
; 0x06,0x30,
; 0x06,0x30,
; 0x06,0x30,
; 0x0C,0x30,
; 0x18,0xF0,
; 0x30,0x60,
; 0x60,0x00};
;
; const uchar miao16[]={//秒_16
; 0x0E,0x30,//秒
; 0xF8,0x30,
; 0x18,0x30,
; 0x19,0xBC,
; 0xFF,0xF6,
; 0x19,0xB3,
; 0x3B,0x33,
; 0x3F,0x30,
; 0x7E,0x33,
; 0x7E,0x33,
; 0xD8,0x06,
; 0x18,0x0C,
; 0x18,0x18,
; 0x18,0x70,
; 0x19,0xC0,
; 0x1F,0x00};
;
; const uchar dao16[]={//倒_16
; 0x18,0x06,//倒
; 0x1F,0xE6,
; 0x1B,0x06,
; 0x33,0x06,
; 0x3E,0x1E,
; 0x7C,0xDE,
; 0xFF,0xFE,
; 0x33,0xDE,
; 0x33,0x1E,
; 0x3F,0xFE,
; 0x33,0x1E,
; 0x33,0x1E,
; 0x33,0x06,
; 0x33,0xE6,
; 0x3F,0x1E,
; 0x30,0x0C};
;
; const uchar ji16[]={//计_16
; 0x60,0x30,//计
; 0x30,0x30,
; 0x38,0x30,
; 0x30,0x30,
; 0x00,0x30,
; 0xFB,0xFF,
; 0x18,0x30,
; 0x18,0x30,
; 0x18,0x30,
; 0x18,0x30,
; 0x18,0x30,
; 0x1B,0x30,
; 0x1E,0x30,
; 0x1C,0x30,
; 0x18,0x30,
; 0x00,0x30};
;
; const uchar tshi16[]={//时_16
; 0x00,0x18,//时
; 0x00,0x18,
; 0x7E,0x18,
; 0x66,0x18,
; 0x67,0xFF,
; 0x66,0x18,
; 0x7E,0x18,
; 0x67,0x98,
; 0x66,0xD8,
; 0x66,0xD8,
; 0x7E,0x18,
; 0x00,0x18,
; 0x00,0x18,
; 0x00,0x18,
; 0x00,0x78,
; 0x00,0x30};
;
; const uchar m16[]={//m_16
; 0x00,0x00,//m
; 0x00,0x00,
; 0x00,0x00,
; 0x00,0x00,
; 0x00,0x00,
; 0x00,0x00,
; 0x00,0x00,
; 0xFF,0x00,
; 0x6D,0x80,
; 0x6D,0x80,
; 0x6D,0x80,
; 0x6D,0x81,
; 0x6D,0x81,
; 0xFF,0x83,
; 0x00,0x03,
; 0x00,0x06};
;
; const uchar s16[]={//s_16
; 0x00,0x00,//s
; 0x00,0x00,
; 0x18,0x00,
; 0x30,0x00,
; 0x30,0x00,
; 0x60,0x00,
; 0x60,0x00,
; 0xC0,0x3F,
; 0xC0,0x63,
; 0x80,0x60,
; 0x80,0x3E,
; 0x00,0x03,
; 0x00,0x63,
; 0x00,0x7E,
; 0x00,0x00,
; 0x00,0x00};
;
;
; void McuInit()
; {//初始化后所有管脚为输出高电平
.dbline 1256
; DTON;
ldi R24,255
out 0x12,R24
.dbline 1257
; DBOUT;
out 0x11,R24
.dbline 1258
; WR_OUT;
sbi 0x17,3
.dbline 1259
; RD_OUT;
sbi 0x17,4
.dbline 1260
; CD_OUT;
sbi 0x17,5
.dbline 1261
; RS_OUT;
sbi 0x1a,7
.dbline -2
L1:
.dbline 0 ; func end
ret
.dbend
.dbfunc e ReadState _ReadState fc
; state -> R16
.even
_ReadState::
.dbline -1
.dbline 1265
; }
;
; uchar ReadState()
; {//读取状态字
.dbline 1267
; uchar state;
; DBIN;
clr R2
out 0x11,R2
.dbline 1268
; CD_SET;
sbi 0x18,5
.dbline 1269
; RD_CLR;
cbi 0x18,4
.dbline 1270
; NOP();NOP();NOP();NOP();NOP();
nop
.dbline 1270
nop
.dbline 1270
nop
.dbline 1270
nop
.dbline 1270
nop
.dbline 1271
; state=datain;
in R16,0x10
.dbline 1272
; RD_SET;
sbi 0x18,4
.dbline 1273
; DBOUT;
ldi R24,255
out 0x11,R24
.dbline 1274
; return state;
.dbline -2
L2:
.dbline 0 ; func end
ret
.dbsym r state 16 c
.dbend
.dbfunc e STA01 _STA01 fV
.even
_STA01::
.dbline -1
.dbline 1278
; }
;
; void STA01()
; {//判断状态位是否0,1位为高,并等待置高
L4:
.dbline 1280
L5:
.dbline 1279
; while((ReadState()&0x03)!=0x03)
xcall _ReadState
mov R24,R16
andi R24,3
cpi R24,3
brne L4
.dbline -2
L3:
.dbline 0 ; func end
ret
.dbend
.dbfunc e STA3 _STA3 fV
.even
_STA3::
.dbline -1
.dbline 1284
; ;
; }
;
; void STA3()
; {//判断状态位是否3位为高,并等待置高
L8:
.dbline 1286
L9:
.dbline 1285
; while((ReadState()&0x08)!=0x08)
xcall _ReadState
mov R24,R16
andi R24,8
cpi R24,8
brne L8
.dbline -2
L7:
.dbline 0 ; func end
ret
.dbend
.dbfunc e WriteData _WriteData fV
; dat -> R16
.even
_WriteData::
.dbline -1
.dbline 1290
; ;
; }
;
; void WriteData(uchar dat)
; {//把一位数据写入数据总线
.dbline 1291
; CD_CLR;
cbi 0x18,5
.dbline 1292
; NOP();NOP();NOP();NOP();NOP();
nop
.dbline 1292
nop
.dbline 1292
nop
.dbline 1292
nop
.dbline 1292
nop
.dbline 1293
; dataout=dat;
out 0x12,R16
.dbline 1294
; WR_CLR;
cbi 0x18,3
.dbline 1295
; NOP();NOP();NOP();NOP();NOP();
nop
.dbline 1295
nop
.dbline 1295
nop
.dbline 1295
nop
.dbline 1295
nop
.dbline 1296
; WR_SET;
sbi 0x18,3
.dbline -2
L11:
.dbline 0 ; func end
ret
.dbsym r dat 16 c
.dbend
.dbfunc e WriteCmd _WriteCmd fV
; cmd -> R16
.even
_WriteCmd::
.dbline -1
.dbline 1300
; }
;
; void WriteCmd(uchar cmd)
; {//把一位命令字写入数据总线
.dbline 1301
; CD_SET;
sbi 0x18,5
.dbline 1302
; NOP();NOP();NOP();NOP();NOP();
nop
.dbline 1302
nop
.dbline 1302
nop
.dbline 1302
nop
.dbline 1302
nop
.dbline 1303
; dataout=cmd;
out 0x12,R16
.dbline 1304
; WR_CLR;
cbi 0x18,3
.dbline 1305
; NOP();NOP();NOP();NOP();NOP();
nop
.dbline 1305
nop
.dbline 1305
nop
.dbline 1305
nop
.dbline 1305
nop
.dbline 1306
; WR_SET;
sbi 0x18,3
.dbline -2
L12:
.dbline 0 ; func end
ret
.dbsym r cmd 16 c
.dbend
.dbfunc e WriteTwoData _WriteTwoData fV
; cmd -> y+4
; dat2 -> R20
; dat1 -> R22
.even
_WriteTwoData::
xcall push_gset2
mov R20,R18
mov R22,R16
.dbline -1
.dbline 1310
; }
;
; void WriteTwoData(uchar dat1,uchar dat2,uchar cmd)
; {//写入有两位数据的命令
.dbline 1311
; STA01();
xcall _STA01
.dbline 1312
; WriteData(dat1);
mov R16,R22
xcall _WriteData
.dbline 1313
; STA01();
xcall _STA01
.dbline 1314
; WriteData(dat2);
mov R16,R20
xcall _WriteData
.dbline 1315
; STA01();
xcall _STA01
.dbline 1316
; WriteCmd(cmd);
ldd R16,y+4
xcall _WriteCmd
.dbline -2
L13:
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym l cmd 4 c
.dbsym r dat2 20 c
.dbsym r dat1 22 c
.dbend
.dbfunc e WriteOneData _WriteOneData fV
; cmd -> R20
; dat -> R22
.even
_WriteOneData::
xcall push_gset2
mov R20,R18
mov R22,R16
.dbline -1
.dbline 1320
; }
;
; void WriteOneData(uchar dat,uchar cmd)
; {//写入有一位数据的命令
.dbline 1321
; STA01();
xcall _STA01
.dbline 1322
; WriteData(dat);
mov R16,R22
xcall _WriteData
.dbline 1323
; STA01();
xcall _STA01
.dbline 1324
; WriteCmd(cmd);
mov R16,R20
xcall _WriteCmd
.dbline -2
L14:
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r cmd 20 c
.dbsym r dat 22 c
.dbend
.dbfunc e LcdInit _LcdInit fV
; delay -> R20
.even
_LcdInit::
xcall push_gset1
sbiw R28,1
.dbline -1
.dbline 1328
; }
;
; void LcdInit()
; {//用于设置显示器的参数
.dbline 1330
; uchar delay;
; delay=255;
ldi R20,255
.dbline 1331
; RS_CLR;
cbi 0x1b,7
L16:
.dbline 1332
L17:
.dbline 1332
; while(delay--);
mov R2,R20
clr R3
subi R20,1
tst R2
brne L16
.dbline 1333
; RS_SET;
sbi 0x1b,7
.dbline 1335
;
; WriteTwoData(0x00,0x00,0x40);//设置文本显示区域首地址
ldi R24,64
std y+0,R24
clr R18
clr R16
xcall _WriteTwoData
.dbline 1336
; WriteTwoData(0x20,0x00,0x41);//设置文本显示区域宽度32
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -