《超声波测距实验报告12907.pdf》由会员分享,可在线阅读,更多相关《超声波测距实验报告12907.pdf(22页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、目录 1、课 题设计的目的和意义.3 2、课 题要求.3、基本功能要求.3、提高要求.4 3、重 要器件功能介绍.4、CX20106A红外线发射接收专用芯片.4、AT89C51系列单片机的功能特点.5、ISD1700优质语音录放电路.6 4、超声波测距原理.8 4.1、超声波测距原理图.8、超声波测距的基本原理.9 5、硬件系统设计.10、超声波发射单元.10 11111212614715151516917.1 71810221 2 AT89C51(1)(2),(3)(4)2m(5)2cm(6)(7)(8)3.5m(9)1cmAT89C51CX201063CX20106A CX20106AAB
2、LCCX20106ACX20106CX20106A38KHZ41KHZ40KHZCJ(_IN CX:OIO5*1 40k Q2 RCR1C1,C1 R1=Q,C1F3 4 5 f0 R=200kQf042kHz,R=220kQf038kHz6 330pF7 22k Q,8 AT89C51 51AT89C5140DIPCPU 4kbROM 256BRAM 216B/T0T1/48BI/OP0,P1,P2,P3,Flash 514kb256BRAM 32I/O216b 521CPURAMRAM51ISD1700*cTfU p WTiRDRtstrKLKAn*hi MIC*MK-J-45e TLIY
3、I$D17OO?FT2VII VOL111213141?AUDiAUX15 ISD170012MCI(SPI)3MICANAIN4PWM AUD/AU)5255678ISD17001,6V21ua320mAISD1700SPI(1ISD17302SPISPI SPIISD1700SPI1SPI/SSRIM21 0 D iF 51 11700Th-5 CtJt FSF E&n rnuninnWit,cin bf IOMF GT MW wfutiE&!4NT/FtDY 27vAJrn*KI Vcc|p|pznd 2SPI/SS3SCLKMOSISCLKMISO4SPI17005MOSMISO6SP
4、I/SS7SPICLR_INT44.12000;:40KHz51 340m/stss=340X t/2 55VCC C9 74LS04VPP10VMAX232MAX232RS-2325V12V CX2010640KHZ71602LCDR6 2:CX201M345pfLufufU1LED21602LCD ISD176020Rsoc80K8kHz,60s471pf 1041021000pf74LS04MAX2320.5m.40kHz6.yes 1 1 no7HI 50us 0911 7 MAX232CX20106A40KHz5-8cmAT89C51 LCD-2m-2m1cm,1 2 3 8 c H
5、 I fa-IHF 9EI5 H Bl 69.2.1 void main()led_init();ISD_Init();while(1)EX0=0;if(key=0)delay(5);if(key=0)if(kai=0)timer_init();led_finished();fasong(2);TR0=1;/0*delay(3);EX0=1;/0 while(1);else if(kai=1)while(1)timer_init();led_traning();fasong(2);TR0=1;/0*delay(3);EX0=1;/0 delay(1000);/9.2.2 void ISD173
6、0_Set_Play(unsigned char VOICE_NUM)unsigned int Add_ST,Add_ED;unsigned char Add_ST_H,Add_ST_L,Add_ED_H,Add_ED_L;do RdStatus();while(SRO_L&OxO1)|(!(SR1&OxO1);/if(SR0_Ly=1)system Err ClrInt();GetToneAdd(VOICE_NUM,&Add_ST,&Add_ED);/Add_ST_L=(unsigned char)(Add_ST&0 x00ff);Add_ST_H=(unsigned char)(Add_S
7、T8)&0 x00ff);Add_ED_L=(unsigned char)(Add_ED&0 x00ff);Add_ED_H=(unsigned char)(Add_ED8)&0 x00ff);/SPI DISENISD1730_SS;ISD1730_SCLK_H;ISD1730_MOSI_L;ENISD1730_SS;/SET_PLAY/S10:S0E10:E0 ISD1730_Spio(SET_PLAY);/ISD1730_Spio(0 x00);/1ISD1730_Spio(Add_ST_L);/ISD1730_Spio(Add_ST_H);/2,8S7:S03,3S10:S8,ISD1
8、730 ISD1730_Spio(Add_ED_L);/ISD1730_Spio(Add_ED_H);/4,8E7:E05,8E10:E8,ISD1730 ISD1730_Spio(0 x00);/DISENISD1730_SS;6do RdStatus();while(SRO_L&OxO1)|(SR1&OxO4);/if(SR0_LA0=1)system Err 9.2.3 void fasong(int num)while(num-)fa=0;nop();nop();nop();nop();nop();nop();nop();nop();nop();nop();nop();nop();fa
9、=1;nop();nop();nop();nop();nop();nop();nop();nop();nop();nop();nop();nop();nop();fa=0;9.2.3 lcd lcden=0;write_com(0 x38);/*void timer_init()TMOD=Ox11;01 TH0=0;TL0=0;PX0=1;/0 EA=1;/ET0=1;/*lcd*write_com(0 x0c);write_com(0 x06);write_com(0 x01);/write_com(0 x80);for(num=0;table0num;num+)write_dat(table0num);delay(1);9.2.4 0 void exter0()interrupt 0/FM=1;/TR0=0;/;jishi=TH0;jishi=(jishi8)|TL0;ET0=0;EX0=0;length=jishi*17/100;/led_xian(length);/lcd dushu(length);/9.2.5 0 void Time0(void)interrupt 1 TR0=0;EX0=0;ET0=0;led_error();FM=0;/101 SST2010251 20113 STC89C51RC/RINT0 20114M 2011 5M 2011 62010
限制150内