下载
加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 单片机例程C1

单片机例程C1.doc

单片机例程C1

你抹杀了my高傲
2017-11-14 0人阅读 举报 0 0 暂无简介

简介:本文档为《单片机例程C1doc》,可适用于综合领域

单片机例程Cfor(num=num<num)#include<regh>,{sbitD=P^P=tempunsignedintabeep=voidmain()delay(){temp=cror(temp,)D=P=xff*for(a=a<=a){}beep=D=delay()for(a=a<=a){}*}}}while()}}voiddelay(uintz){uintx,yfor(x=zx>x)for(y=y>y)}#include<regh>,voidmain(){P=xfd}#include<regh>,#include<intrinsh>#defineuintunsignedint#defineucharunsignedcharuchartemp,num,numsbitbeep=P^voiddelay(uint)voidmain(){temp=xfewhile(){for(num=num<num){for(num=num<num){P=tempbeep=delay()temp=crol(temp,)P=xffbeep=delay()}}for(num=num<num){#include<regh>,sbitp=P^unsignedintavoidmain(){while(){a=p=while(a)a=while(a)p=a=while(a)a=while(a)}}#include<regh>,#include<regh>,#defineuintunsignedint#defineuintunsignedint#defineucharunsignedchar#defineucharunsignedcharsbitD=P^sbitdula=P^voiddelay()sbitwela=P^voiddelay(uint)ucharnumvoidmain()ucharcodetable={{xf,x,xb,xf,while()x,xd,xd,x,{xf,xf,x,xc,D=x,xe,x,x}delay()voiddelay(uintz)D=voidmain()delay(){}wela=}P=xeavoiddelay(uintz)wela={while()uintx{ucharyfor(num=num<num)for(x=zx>x){for(y=y>y)dula=}P=tablenumdula=delay()}}}voiddelay(uintz){uintx,yfor(x=zx>x)for(y=y>y)}#include<regh>,sbitdula=P^sbitwela=P^voidmain(){wela=P=xcwela=dula=P=xdula=while()}num#include<regh>,if(num==)#defineuintunsignedintnum=#defineucharunsignedchardula=sbitdula=P^sbitwela=P^P=tablenumsbitd=P^dula=ucharnum}ucharcodetable={}xf,x,xb,xf,}x,xd,xd,x,xf,xf,x,xc,voiddelay(uintz)x,xe,x,x}{voiddelay(uintz)uintx,yvoidmain()for(x=zx>x){for(y=y>y)EA=开开中断}EX=开外部中断IT=voidtime()interruptTCON=x{wela=TH=()P=xeaTL=()wela=ttwhile()}{voidtime()interruptfor(num=num<num){{TH=()d=TL=()dula=num}P=tablenumdula=delay()}}}voiddelay(uintz){uintx,yfor(x=zx>x)for(y=y>y)}voidexter()interrupt{d=}#include<regh>,if(numwe==)#include<intrinsh>#defineuintunsignedintnumwe=#defineucharunsignedchar}uchartemp,aa,numdu,numwe}sbitdula=P^}sbitwela=P^*ucharcodetable={voiddelay(uintz)xf,x,xb,xf,{x,xd,xd,x,uintx,yxf,xf,x,xc,for(x=zx>x)x,xe,x,x}for(y=y>y)ucharcodetablewe={}*xfe,xfd,xfb,xf,xef,xdf}voiddelay(uintz)voidtimer()interruptvoidmain(){{TH=()numdu=TL=()numwe=aaaa=}TMOD=xTH=()TL=()EA=ET=TR=while(){delay()temp=crol(temp,)P=tempif(aa==){aa=numduif(numdu==)numdu=dula=P=tablenumdudula=wela=P=tablewenumwewela=numwe#include<regh>,dula=#defineuintunsignedintP=tablebai#defineucharunsignedchardula=uchartemp,aa,bai,shi,geP=xffsbitdula=P^wela=sbitwela=P^P=xfeucharcodetable={wela=xf,x,xb,xf,delay()第一部分x,xd,xd,x,dula=xf,xf,x,xc,P=tableshix,xe,x,x}dula=voiddisplay(ucharbai,ucharshi,ucharge)P=xffvoiddelay(uintz)wela=voidinit()P=xfdvoidmain()wela={delay()第二部分init()初始化子程序dula=while()P=tablege{dula=if(aa==)P=xff{wela=aa=P=xfbtempwela=if(temp==)delay(){}voidinit()temp={}wela=bai=tempdula=shi=temptemp=ge=tempTMOD=x}TH=()display(bai,shi,ge)TL=()}EA=}ET=voiddelay(uintz)TR={}uintx,yvoidtimer()interruptfor(x=zx>x){for(y=y>y)TH=()}TL=()voiddisplay(ucharbai,ucharshi,ucharge)aa{}TL=()aaTL=()#include<regh>,EA=#include<intrinsh>ET=#defineucharunsignedcharET=#defineuintunsignedintTR=sbitdula=P^TR=sbitwela=P^}ucharcodetable={xf,x,xb,xf,voidtimer()interruptx,xd,xd,x,{xf,xf,x,xc,TH=()x,xe,x,x,TL=()x,x,x,xf,}tuchartemp,t,t,bai,shi,ge,flag,flagif(flag!=)uintshu{voidinit()if(t==)void{display(uchar,uchar,uchar,uchar,uchar,uchar)t=voiddelay(uintz){temp=crol(temp,)uintt,yP=tempfor(t=zt>t)}for(y=y>y)}}elsevoidmain(){{if(t==)init()P=~Pwhile()if(t==){{if(flag!=)TR=P=xffdisplay(,,,bai,shi,ge)flag=else}}display(,,,,,)}}}voidtimer()interrupt{voidinit()TH=(){TL=()shu=ttemp=xfeif(t==)P=temp{TMOD=xt=TH=()shuTL=()TH=()bai=shuwela=shi=shuP=xfbge=shuwela=if(shu==)delay(){dula=P=tablebaTR=dula=P=xffTH=()wela=P=xfTL=()wela=delay()TR=dula=flag=P=tablesht=dula=P=xffP=xffwela=P=xefTR=wela=}delay()}}dula=P=tablegvoiddisplay(ucharaa,ucharbb,ucharcc,uchardula=ba,ucharsh,ucharg)P=xff{wela=dula=P=xdfP=tableaawela=dula=delay()P=xff}wela=P=xfewela=delay()dula=P=tablebbdula=P=xffwela=P=xfdwela=delay()dula=P=tableccdula=P=xffd=#include<regh>,#defineuintunsignedintdula=#defineucharunsignedcharP=tablenumsbitd=P^dula=sbitdula=P^}sbitwela=P^}sbitkey=P^ucharcodetable={xf,x,xb,xf,x,xd,xd,x,xf,xf,x,xc,x,xe,x,x}ucharnumvoiddelay(uintz){uintx,yfor(x=zx>x)for(y=y>y)}voidmain(){wela=P=xfewela=P=xffwhile(){if(key==){delay()if(key==){d=numif(num==)num=}while(!key)delay()while(!key)}elseP=xfe#include<regh>,temp=P#defineuintunsignedinttemp=tempxf#defineucharunsignedcharwhile(temp!=xf)sbitdula=P^{sbitwela=P^sbitkey=P^delay()ucharcodetable={xf,x,xb,xf,temp=Px,xd,xd,x,xf,xf,x,xc,temp=tempxfx,xe,x,x,}ucharnum,temp,numwhile(temp!=xf)voiddelay(uintz){{uintx,ytemp=Pfor(x=zx>x)for(y=y>y)switch(temp)}ucharkeyscan(){voiddisplay(ucharaa)casevoidmain()xee:num={num=breakdula=caseP=xde:num=dula=wela=breakP=xccasewela=xbe:num=while()break{casedisplay(keyscan())xe:num=}}breakvoiddisplay(ucharaa){}dula=P=tableaawhile(temp!=xf)dula=}{ucharkeyscan(){temp=Ptemp=tempxf}}}P=xfdtemp=Ptemp=tempxfwhile(temp!=xf){delay()temp=Ptemp=tempxfwhile(temp!=xf){breaktemp=P}switch(temp)while(temp!=xf){{casetemp=Pxed:num=temp=tempxfbreakcase}xdd:num=}}breakcaseP=xfxbd:num=temp=Ptemp=tempxfbreakwhile(temp!=xf)case{xd:num=delay()breaktemp=P}temp=tempxfwhile(temp!=xf)while(temp!=xf){{temp=Ptemp=Ptemp=tempxfswitch(temp)}{}Case}xe:num=breakP=xfbcasetemp=Pxd:num=temp=tempxfwhile(temp!=xf)break{casexb:num=delay()breaktemp=Pcasex:num=temp=tempxfbreakwhile(temp!=xf){}temp=Pwhile(temp!=xf)switch(temp){{temp=Pcasexeb:num=temp=tempxfbreak}case}xdb:num=}breakreturnnumcasexbb:num=}breakcasexb:num=#include<regh>,#include<regh>,sbitcsda=P^#defineucharunsignedcharsbitwr=P^#defineuintunsignedintsbitwr=P^voidmain()sbitrd=P^{voiddelay(uintz)csda={wr=uintt,yP=for(t=zt>t)while()for(y=y>y)}}voidinit()voidstart()voidmain(){init()while(){start()delay()rd=delay()rd=delay()}}voidinit(){P=}voidstart(){wr=wr=wr=}#include<regh>,unsignedcharflag,avoidmain(){TMOD=x开置定开器开工作方式TH=xfdTL=xfdTR=REN=SM=SM=EA=ES=while(){*if(RI==){RI=P=SBUF}*if(flag==){ES=flag=SBUF=''while(!TI)TI=SBUF=''while(!TI)TI=SBUF=''while(!TI)TI=ES=}}}voidser()interrupt{RI=P=SBUFa=SBUFflag=}#include<regh>()writecom(x)#defineucharunsignedcharwritecom(x)#defineuintunsignedintwritecom(xx)ucharcodetable="ILIKEMCU!"}ucharcodetable="WWWTXMCUCOM"voidmain()sbitlcden=P^{sbitlcdrs=P^init()sbitdula=P^for(num=num<num)sbitwela=P^{ucharnumwritedata(tablenum)delay()}voiddelay(uintz)writecom(){writecom(xx)uintx,yfor(num=num<num)for(x=zx>x){for(y=y>y)writedata(tablenum)}delay()voidwritecom(ucharcom)}{for(num=num<num)lcdrs={P=comwritecom(x)delay()delay()lcden=}delay()while()lcden=}}voidwritedata(uchardate){lcdrs=P=datedelay()lcden=delay()lcden=}voidinit(){dula=wela=lcden=writecom(x)writecom(xe)#include<regh>()#defineucharunsignedcharvoidwritebyte(uchardate)sbitsda=P^{sbitscl=P^uchari,tempucharatemp=datevoiddelay(){}for(i=i<i)voidstart()开始信号{{temp=temp<<sda=scl=delay()delay()scl=sda=CYdelay()delay()sda=scl=delay()delay()}scl=delay()voidstop()停止}{scl=sda=delay()delay()sda=scl=delay()delay()}sda=delay()ucharreadbyte()}{uchari,kvoidrespons()开答scl={delay()ucharisda=scl=delay()delay()for(i=i<i)while((sda==)(i<))i{scl=scl=delay()delay()}k=(k<<)|sdascl=voidinit()delay(){}sda=returnkdelay()}scl=delay()voiddelay(ucharx)}{uchara,bfor(a=xa>a)for(b=b>b)}voidwriteadd(ucharaddress,uchardate){start()writebyte(xa)respons()writebyte(address)respons()writebyte(date)respons()stop()}ucharreadadd(ucharaddress){uchardatestart()writebyte(xa)respons()writebyte(address)respons()start()writebyte(xa)respons()date=readbyte()stop()returndate}voidmain(){init()writeadd(,xaa)delay()P=readadd()while()}#include<regh>()voidinit()#defineucharunsignedchar{#defineuintunsignedintucharnumsbitdula=P^dula=sbitwela=P^wela=sbitrs=P^lcden=sbitlcden=P^fen=sbits=P^miao=sbits=P^shi=sbits=P^writecom(x)sbitrd=P^writecom(xc)ucharcount,snumwritecom(x)charmiao,shi,fenwritecom(x)ucharcodetable="MON"writecom(x)ucharcodetable="::"for(num=num<num)voiddelay(uintz){{uintx,ywritedate(tablenum)for(x=zx>x)delay()for(y=y>y)}}writecom(xx)for(num=num<num)voidwritecom(ucharcom){{rs=writedate(tablenum)lcden=delay()P=com}delay()TMOD=xlcden=TH=()delay()TL=()lcden=EA=}ET=TR=voidwritedate(uchardate)}{rs=voidwritesfm(ucharadd,uchardate)lcden={P=dateucharshi,gedelay()shi=datelcden=ge=datedelay()writecom(xxadd)lcden=writedate(xshi)}writedate(xge)}{rd=voidkeyscan()if(s==)miao={delay()writesfm(,miao)if(s==){snumwritecom(xx)while(!s)if(snum==){}TR=if(snum==)writecom(xx){writecom(xf)fen}}if(fen==)if(snum==){fen=writecom(xx)writesfm(,fen)}if(snum==)writecom(xx){}writecom(xx)if(snum==)}{if(snum==){shisnum=if(shi==)writecom(xc)TR=shi=}writesfm(,shi)}writecom(xx)if(snum!=)}{}if(s==)}{if(s==)delay(){if(s==)delay(){if(s==){while(!s)while(!s)if(snum==){if(snum==){miao*if(miao==)if(miao==){miaomiao=if(miao==)writesfm(,miao)miao=writecom(xx)writesfm(,miao)}*writecom(xx)TL=()}countif(count==)if(snum==){{count=miaofenif(miao==){if(fen==)miao=fenfen=if(fen==){writesfm(,fen)fen=writecom(xx)shi}if(snum==)if(shi==){{shishi=}if(shi==)writesfm(,shi)shi=}writesfm(,shi)writesfm(,fen)}writecom(xx)writesfm(,miao)}}}}}}}voidmain(){init()while(){keyscan()}while()}voidtimer()interrupt{TH=()defineh#include<regh>()#defineucharunsignedchar#include<defineh>#defineuintunsignedintvoiddelay(uintz)sbitdula=P^{sbitwela=P^uintx,ysbitrs=P^for(x=zx>x)sbitlcden=P^for(y=y>y)sbits=P^}sbits=P^sbits=P^voiddidi()sbitrd=P^{sbitbeep=P^beep=sbitdscs=P^delay()sbitdsas=P^beep=sbitdsrw=P^delay()sbitdsds=P^beep=sbitdsirq=P^delay()ucharcount,snum,flag,flagbeep=charmiao,shi,fen}ucharcodetable="MON"voidwritecom(ucharcom)ucharcodetable="::"{voidwriteds(uchar,uchar)rs=voidsetalarm(uchar,uchar,uchar)lcden=ucharreadds(uchar)voidsettime()P=comdelay()lcden=delay()lcden=}voidwritedate(uchardate){rs=lcden=P=datedelay()lcden=delay()lcden=}voidinit(){ucharnumEA=EX=writecom(xx)IT=}dula=if(snum==)wela={lcden=settime()shisetalarm(,,)writeds(xB,x)if(shi==)readds(xc)fen=shi=miao=shi=writesfm(,shi)writecom(x)writecom(xc)writecom(xx)writecom(x)}writecom(x)}writecom(x)}for(num=num<num)if(s==){{delay()writedate(tablenum)if(s==)delay(){}writecom(xx)while(!s)for(num=num<num){if(snum==){writedate(tablenum)*delay()if(miao==)}{}miao=voidwritesfm(ucharadd,uchardate){writesfm(,miao)ucharshi,geshi=datewritecom(xx)ge=datewritecom(xxadd)}*writedate(xshi)writedate(xge)miao}if(miao==)voidkeyscan()}miao=if(snum==){writesfm(,miao)writecom(xx)writecom(xx)}}if(snum==){if(snum==)snum={writecom(xc)fenflag=if(fen==)writeds(,miao)fen=writeds(,fen)writesfm(,fen)writeds(,shi)}writecom(xx)}}if(snum==)if(snum!=){{if(s==)shi{delay()if(shi==)if(s==){shi=while(!s)writesfm(,shi)if(snum==)writecom(xx){}}miao}}if(miao==)writecom(xx)miao=}writesfm(,miao)if(snum==){writecom(xx)shi}if(shi==)if(snum==)shi={writesfm(,shi)fenwritecom(xx)if(fen==)}}fen=}if(s==)writesfm(,fen){delay()if(s==)writecom(xx){}while(!s)if(snum==){if(snum==){shi*if(miao==)if(shi==){shi=miao=writesfm(,shi)writesfm(,miao)writecom(xx)}writecom(xx)}dsds=}dsas=}dscs=}returndsdatevoidwriteds(ucharadd,uchardate)}{voidsettime()dscs={dsas=writeds(,)dsds=writeds(,)dsrw=}P=adddsas=voidsetalarm(ucharashi,ucharafen,uchardsrw=amiao)P=date{dsrw=writeds(,amiao)dsas=writeds(,afen)dscs=writeds(,ashi)}}ucharreadds(ucharadd)voidmain(){{init()uchardsdatewhile()dsas={dsds=keyscan()dsrw=if(flag==)dscs=didi()P=addif(flag==)dsas={dsds=miao=readds()P=xfffen=readds()dsdate=Pshi=readds()writesfm(,miao)writesfm(,fen)writesfm(,shi)}}}voidexter()interrupt{ucharcflag=c=readds(xc)}

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/39

单片机例程C1

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利