您的位置 首页 PR课程

基于proteus课程设计


关于基于proteus课程设计最佳答案


基于proteus课程设计


1.你好!重新做个封装库,或者去中国电子DIY之家下载现成的库如果对你有帮助,望采纳。


关于基于proteus课程设计相关答案


2.下面是我写的程序,protues发给你了,126邮箱的那个,楼上的我也发了。 #include #define uint unsigned int #define uchar unsigned char sbit lcden=P3^3; sbit lcdrs=P3^1; sbit s0=P2^2; sbit s1=P2^4; sbit s2=P2^5; sbit s3=P2^6; sbit s4=P2^7; sbit dsirq=P3^3; sbit dscs=P3^5; sbit dsas=P3^4; sbit dsrw=P3^6; sbit dsds=P3^7; sbit beep=P3^0; uchar count,s,m,h,d,mon,y,day,num2,flag,flag1,a0,a1,a2,flag2,as,am,ah,a3; void akeyscan(); void akeyscan1(); void akeyscan2(); void keyscan3(); uchar rds(uchar add); uchar key; uchar tt,f0,f1,f2,timeron,tstart; void wds(uchar add,uchar date); uchar keycheck(); void delay(uint z) { uint x,y; for(x=z;x>0;x–) for(y=110;y>0;y–); } void settime() { wds(0x09,10); wds(0x08,3); wds(0x07,1); wds(0x06,1); wds(0x04,23); wds(0x02,59); wds(0x00,58); } void wcom (uchar com) { lcdrs=0; lcden=0; P0=com; delay(5); lcden=1; delay(5); lcden=0; } void wdata (uchar date) { lcdrs=1; P0=date; delay(5); lcden=1; delay(5); lcden=0; } void wasmh(uchar add,uchar date) { uchar shi,ge; shi=date10; ge=date%10; wcom(0x06); wcom(0x80+add); wdata(0x30+shi); wdata(0x30+ge); } void wasm(uchar add,uchar date) { wcom(0x80+add); wdata(date); } void disday() { switch(day) { case 1: { wasm(0x0d,'M'); wasm(0x0e,'O'); wasm(0x0f,'N'); } break; case 2: { wasm(0x0d,'T'); wasm(0x0e,'U'); wasm(0x0f,'E'); } break; case 3: { wasm(0x0d,'W'); wasm(0x0e,'E'); wasm(0x0f,'D'); } break; case 4: { wasm(0x0d,'T'); wasm(0x0e,'H'); wasm(0x0f,'U'); } break; case 5: { wasm(0x0d,'F'); wasm(0x0e,'R'); wasm(0x0f,'I'); } break; case 6: { wasm(0x0d,'S'); wasm(0x0e,'A'); wasm(0x0f,'T'); } break; case 7: { wasm(0x0d,'S'); wasm(0x0e,'U'); wasm(0x0f,'N'); } break; default :break; } } void disal() { if(a0==0) { wasm(0x4d,'O'); wasm(0x4e,'F'); wasm(0x4f,'F'); } if(a0==1) { wasm(0x4d,' '); wasm(0x4e,'O'); wasm(0x4f,'N'); } } void init() { EA=1; TMOD=0x10; EX0=1; IT0=1; lcden=0; TH1=(65536-500)256; TL1=(65536-500)%256; EX1=0; ET1=1; TR1=1; wds(1,0x0a); wds(3,0×00); wds(5,0×00); wds(0x0a,0x20); wds(0x0b,0x06); wcom(0x38); wcom(0x0c); wcom(0x01); wcom(0x06); settime(); wcom(0x40+0x80+0x06); wdata(':'); wcom(0x40+0x80+0x09); wdata(':'); wcom(0x80+0x06); wdata('-'); wcom(0x80+0x09); wdata('-'); wcom(0x80+0x02); wdata('2'); wcom(0x80+0x03); wdata('0'); } void wds(uchar add,uchar date) { dscs=0; dsas=1; dsds=1; dsrw=1; P1=add; dsas=0; dsrw=0; P1=date; dsrw=1; dsas=1; dscs=1; } uchar rds(uchar add) { uchar dsdata; dsas=1; dsds=1; dsrw=1; dscs=0; P1=add; dsas=0; dsds=0; P1=0xff; dsdata=P1; dsds=1; dsas=1; dscs=1; return (dsdata); } void keyscan1() { if (num2!=0) { key=keycheck(); if(key==3) { * delay(5); if(s2==0) { while(!s2);* if(num2==7) { s++; if(s==60) s=0; wasmh(0x4a,s); wcom(0xc0+11); } if(num2==6) { m++; if(m==60) m=0; wasmh(0x47,m); wcom(0xc0+8); } if(num2==5) { h++; if(h==24) h=0; wasmh(0x44,h); wcom(0xc0+5); } if(num2==3) { d++; if(d==32) d=1; wasmh(0x0a,d); wcom(0x80+0x0b); } if(num2==2) { mon++; if(mon==13) mon=1; wasmh(0x07,mon); wcom(0x80+0x08); } if(num2==1) { y++; if(y==13) y=1; wasmh(0x04,y); wcom(0x80+0x05); } if(num2==4) { day++; if(day==8) y=1; disday(); wcom(0x80+0x0f); } } } } if (num2!=0) { key=keycheck(); if(key==4) { * delay(5); if(s3==0) { while(!s3);* if(num2==7) { if(s==0) s=60; s–; wasmh(0x4a,s); wcom(0xc0+11); } if(num2==6) { if(m==0) m=60; m–; wasmh(0x47,m); wcom(0xc0+8); } if(num2==5) { if(h==0) h=24; h–; wasmh(0x44,h); wcom(0xc0+5); } if(num2==3) { d–; if(d==0) d=31; wasmh(0x0a,d); wcom(0x80+0x0b); } if(num2==2) { mon–; if(mon==0) mon=12; wasmh(0x07,mon); wcom(0x80+0x08); } if(num2==1) { if(y==0) y=100; y–; wasmh(0x04,y); wcom(0x80+0x05); } if(num2==4) { day–; if(day==0) y=7; disday(); wcom(0x80+0x0f); } } } } } void keyscan() { key=keycheck(); if(key==1flag2==0) { * delay(5); if(s0==0) {* num2++; flag=1; while(s0==0); if(num2==7) { wcom(0x80+0x40+11); wcom(0x0f); } if(num2==6) { wcom(0x80+0x40+8); } if(num2==5) { wcom(0x80+0x40+5); } if(num2==3) { wcom(0x80+0x0b); } if(num2==2) { wcom(0x80+0x08); } if(num2==1) { wcom(0x80+0x05); wcom(0x0f); } if(num2==4) { wcom(0x80+0xf); } if(num2==8) { wcom(0x0c); num2=0; flag=0; wds(0x00,s); wds(0x02,m); wds(0x04,h); wds(0x06,day); wds(0x07,d); wds(0x08,mon); wds(0x09,y); wcom(0x06); } } } keyscan1(); } void distime() { s=rds(0x00); m=rds(0x02); h=rds(0x04); wasmh(0x4a,s); wasmh(0x47,m); wasmh(0x44,h); d=rds(0x07); mon=rds(0x08); y=rds(0x09); wasmh(0x04,y); wasmh(0x07,mon); wasmh(0x0a,d); day=rds(0x06); disday(); } void akeyscan1() { if (a1!=0) { if(key==3) { if(a1==2) { as++; if(as==60) as=0;


了解更多基于proteus课程设计类似问题


大鹏pr剪辑入门视频课程
华为p40 pro摄影课程怎么领取
prae课程
西安cpr培训课程
pr软件大学课程论文封面格式
对pr课程的建议
瑞思学科英语pre-k的课程特点
重庆proe课程
springboot所有课程
pr课程建设方案

热门文章

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注