用AT89C2051设计超声波测距仪

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

-31-AT89C2051DesignofSupersonicWaveTelemeterwithAT89C2051JiangDaolianNingYanyiYuanShiliang:AT89C2051,,,,0.1:;;;AT89C2051:TM930.9:B:1006-6977(2000)12-0031-041AT89C2051,:,,,AT89C2051GSM97C2051,1,t,S=Ct/2,C,C,1,,,,,12AT89C2051AT89C20512kEPROMMCS-51,,AT89C2051:2kE2PROM128RAM15I/O216/51,4.25V5.5V12MHz/24MHz,LED,AT89C2051,CPU,RAM/RAM,AT89C2051216/Timer0Timer1,1,12,1/12,©1994-2008ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.=Ct/2,LCD,:,,2©1994-2008ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.(5,SPEED)ROM(LARGE)IV/**/#includereg52.h#includeabsacc.h#includestdio.h/**/typedefunsignedcharbyte;typedefunsignedintword#defineucharunsignedchar#defineunintunsignedint#defineulongunsignedlong/**/#defineTRUE1#defineFALSE0#defineC=340/**//**/sbitbflag=ACC7;sbitVOLCK=P1^5;sbitMING=P3^5;sbitQUIET=P1^3;sbitBACK=P1^2;/**/ucharidataON[16]={,L,E,N,G,T,H,’=,8,.,’8’8’,’m’,’’,’’,’’};/**/voidmain-delay(void){registeri;TRO=1;for(i=0;i15;i++){TH0=0;TL0=0;do{}while(!TF0);TF0=0;}TR0=0;}3AT89C20515©1994-2008ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.(DSP)SAA8116,PC,(USB1.1)SAA8116PCSAA8116,PC,PC,SAA8116,SAA8116,,,,,SAA8116DSP,CPU15fps(/)VGA()30fpsSIF()CPU30fpsVGAUSB,PCSAA8116USB,(POR)LQFP100TFB2GA112,SAA8116,(CCD)(CMOS):001218PCSAA8116*/*/voiddelay(void){uninti;for(i=0;i200;i++){;}}/**/voidkey-delay(void){uninti;for(i=0;i200;i++){;}}/**/voidstart-main(){registeri;uchara[16]={,L,E,N,G,T,H,=,8,.,8,8,m,,,};for(i=0;16;i++){ON[i]=a[i];}nit-lcd();/**/display(ON);/**/}/**/voidmain(){registers,keycode;longidatat;start-main();/**/main-delay();/**/;if(keycode==true){keycode=key-scan-wait();/**/t=measure();*/*/S=0.5*t*C;*/*/decode-bcd(s,0x09);/**/init-lcd();/**/display(ON);/**/}}5,AT89C2051,,1.,.C51...19982..C...199731ATMEL.989C2051DATASHEET.1998:2000-05-25:001210©1994-2008ChinaAcademicJournalElectronicPublishingHouse.Allrightsreserved.

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功