time0 equ 32 ;53ms time1 equ 187 ;10s sel0 equ 0feh ;秒低位 sel1 equ 0fdh ;秒高位 sel2 equ 0fbh ;分低位 sel3 equ 0f7h ;分高位 sel4 equ 0efh ;时低位 sel5 equ 0dfh ;时高位 sel6 equ 0bfh ;日低位 sel7 equ 07fh ;日高位 sel8 equ 0feh ;月低位 sel9 equ 0fdh ;月高位 sel10 equ 0fbh ;年低位 sel11 equ 0f7h ;年高位 selno equ 0ffh ;--------------------- outPort data p0 selPort0 data p2 selPort1 data p1 second0 data 08h second1 data 09h minute0 data 0ah minute1 data 0bh hour0 data 0ch hour1 data 0dh date0 data 0eh date1 data 0fh month0 data 10h month1 data 11h year0 data 12h year1 data 13h selled data 30h ;led动态扫描计数 seldata data 31h ;修改时选择项目 key0Data data 32h ;按键状态 key1Data data 33h key2Data data 34h key3Data data 35h tims data 36h tims0 data 37h ;--------------------- rst bit p3.0 io bit p3.1 sclk bit p3.2 key0Pin bit p1.4 key1Pin bit p1.5 key2Pin bit p1.6 key3Pin bit p1.7 ;--------------------- chgMode bit 20h.0 ;修改状态或平常状态 sel0Dot bit 21h.0 ;小数点状态 sel1Dot bit 21h.1 sel2Dot bit 21h.2 sel3Dot bit 21h.3 sel4Dot bit 21h.4 sel5Dot bit 21h.5 sel6Dot bit 21h.6 sel7Dot bit 21h.7 sel8Dot bit 22h.0 sel9Dot bit 22h.1 sel10Dot bit 22h.2 sel11Dot bit 22h.3 ;--------------------- org 0 ljmp main org 0bh ;---------------------------------------- tim0: mov th0,#0f2h ;24M-1666us,50Hz刷新率 mov tl0,#0fch ;3332 push acc push psw push 00h mov a,selled rl a jmp @a+dptr selLab: ajmp sel0do ajmp sel1do ajmp sel2do ajmp sel3do ajmp sel4do ajmp sel5do ajmp sel6do ajmp sel7do ajmp sel8do ajmp sel9do ajmp sel10do ;ajmp sel11do sel11do:mov selled,#0ffh mov c,sel11Dot mov selPort1,#sel11 ajmp sel10a sel0do: mov selPort0,#sel0 mov c,sel0Dot ajmp sel7a sel1do: mov selPort0,#sel1 mov c,sel1Dot ajmp sel7a sel2do: mov selPort0,#sel2 mov c,sel2Dot ajmp sel7a sel3do: mov selPort0,#sel3 mov c,sel3Dot ajmp sel7a sel4do: mov selPort0,#sel4 mov c,sel4Dot ajmp sel7a sel5do: mov selPort0,#sel5 mov c,sel5Dot ajmp sel7a sel6do: mov selPort0,#sel6 mov c,sel6Dot ajmp sel7a sel7do: mov selPort0,#sel7 mov c,sel7Dot sel7a: mov selPort1,#selno ajmp _tim0a sel8do: mov selPort1,#sel8 mov c,sel8Dot ajmp sel10a sel9do: mov selPort1,#sel9 mov c,sel9Dot ajmp sel10a sel10do:mov selPort1,#sel10 mov c,sel10Dot sel10a: mov selPort0,#selno ;ajmp _tim0a
猜您喜欢
推荐内容
开源项目推荐 更多
热门活动
热门器件
用户搜过
随便看看
热门下载
热门标签
评论