Ñγǹ¤Ñ§Ôº±¾¿ÆÉú±ÏÒµÂÛÎÄ (2010)
LED_temp(dis); bell=1;
show(10); //²âÁ¿Êý¾ÝÏÔʾ } }
TO=0;
show(10);
key();
if(show_temperature==1)goto T_show;
} }
//Èç¹ûWDΪ0ÔòÖ»ÏÔʾζÈ
//-------------------------------------------- void int1(void) interrupt 0 //ÍⲿÖжÏ0·þÎñ {
TR1=0; //Í£Ö¹¼ÆÊý EX1=0; //¹ØÍⲿÖжÏ1 flag=1; }
//-------------------------------------------- void timer1(void) interrupt 3 //T1¶¨Ê±Æ÷ÖжϷþÎñ {
// ET1=0; //¹ØÖÐ¶Ï EX1=0; //¹ØÍⲿÖжÏ1 TR1=0; //¹Ø¶¨Ê± TO=1;
temp[0]=0xF7; //δÊÕµ½»Ø²¨ÔòÏÔʾ --- temp[1]=0xF7; temp[2]=0xF7; £ý
41
³¬Éù²¨²â¾àϵͳµÄÉè¼ÆÓëʵÏÖ
³¬Éù²¨²â¾àϵͳµÄÉè¼Æ ÕªÒª£º³¬Éù²¨ÊÇָƵÂÊÔÚ20kHzÒÔÉϵÄÉù²¨£¬ËüÊôÓÚ»úе²¨µÄ·¶³ë¡£³¬Éù²¨Ò²
×ñÑÒ»°ã»úе²¨ÔÚµ¯ÐÔ½éÖÊÖеĴ«²¥¹æÂÉ£¬ÈçÔÚ½éÖʵķֽçÃæ´¦·¢Éú·´ÉäºÍÕÛÉäÏÖÏó£¬ÔÚ½øÈë½éÖʺ󱻽éÖÊÎüÊÕ¶ø·¢ÉúË¥¼õµÈ¡£ÕýÊÇÒòΪ¾ßÓÐÕâЩÐÔÖÊ£¬Ê¹µÃ³¬Éù²¨¿ÉÒÔÓÃÓÚ¾àÀëµÄ²âÁ¿ÖС£Ëæ×ſƼ¼Ë®Æ½µÄ²»¶ÏÌá¸ß£¬³¬Éù²¨²â¾à¼¼Êõ±»¹ã·ºÓ¦ÓÃÓÚÈËÃÇÈÕ³£¹¤×÷ºÍÉú»îÖ®ÖС£
ϵͳµÄÉè¼ÆÖ÷Òª°üÀ¨Á½²¿·Ö£¬¼´Ó²¼þµç·ºÍÈí¼þ³ÌÐò¡£Ó²¼þµç·Ö÷Òª°üÀ¨µ¥Æ¬»úµç·¡¢·¢Éäµç·¡¢½ÓÊյ緡¢ÏÔʾµç·ºÍµçÔ´µç·£¬ÁíÍ⻹Óи´Î»µç·ºÍLED¿ØÖƵ緵ȡ£ÎÒ²ÉÓÃÒÔAT89s52µ¥Æ¬»úΪºËÐĵĵͳɱ¾¡¢¸ß¾«¶È¡¢Î¢ÐÍ»¯Êý×ÖÏÔʾ³¬Éù²¨²â¾àÒǵÄÓ²¼þµç·¡£Õû¸öµç·²ÉÓÃÄ£¿é»¯Éè¼Æ£¬ÓÉÐźŷ¢ÉäºÍ½ÓÊÕ¡¢¹©µç¡¢Î¶ȲâÁ¿¡¢ÏÔʾµÈÄ£¿é×é³É¡£·¢Éä̽ͷµÄÐźž·Å´óºÍ¼ì²¨ºó·¢Éä³öÈ¥£¬µ¥Æ¬»úµÄ¼ÆÊ±Æ÷¿ªÊ¼¼ÆÊ±£¬³¬Éù²¨±»·¢Éäºó°´Ô··µ»Ø,ÔÚ¾¹ý·Å´ó´øÍ¨Â˲¨ÕûÐεȻ·½Ú,È»ºó±»µ¥Æ¬»ú½ÓÊÕ,¼ÆÊýÆ÷Í£Ö¹¹¤×÷²¢µÃµ½Ê±¼ä¡£Î¶ȲâÁ¿ºóË͵½µ¥Æ¬»ú,ͨ¹ý³ÌÐò¶ÔËٶȽøÐÐУÕý, ½áºÏÁ½ÕßʵÏÖ³¬Éù²¨²â¾àµÄ¹¦ÄÜ¡£Èí¼þ³ÌÐòÖ÷ÒªÓÉÖ÷³ÌÐò¡¢Ô¤ÖÃ×Ó³ÌÐò¡¢·¢Éä×Ó³ÌÐò¡¢½ÓÊÕ×Ó³ÌÐò¡¢ÏÔʾ×Ó³ÌÐòµÈÄ£¿é×é³É¡£Ëü¿ØÖƵ¥Æ¬»ú½øÐÐÊý¾Ý·¢ËÍÓë½ÓÊÕ£¬ÔÚÒ»¶¨Î¶È϶Գ¬Éù²¨ËٶȵÄУÕý£¬»¹ÓÐʵÏÖÊý¾ÝÕýÈ·ÏÔʾÔÚLEDÉÏ¡£ÁíÍâ³ÌÐò¿ØÖƵ¥Æ¬»úÏû³ý¸÷̽ͷ¶Ô·¢ÉäºÍ½ÓÊÕ³¬Éù²¨µÄÓ°Ïì¡£Ïà¹Ø²¿·Ö¸½ÓÐÓ²¼þµç·ͼ¡¢³ÌÐòÁ÷³Ìͼ¡£
ʵ¼ÊµÄ»·¾³¶Ô³¬Éù²¨ÓкܴóµÄÓ°Ï죬ÈçÍⲿµç´Å¸ÉÈŵçÔ´¸ÉÈÅÐŵÀ¸ÉÈŵȵȣ¬¿ÕÆøµÄζȶԳ¬Éù²¨µÄËÙ¶ÈÓ°ÏìÒ²ºÜ´ó¡£´ËÍ⹩µçµçÔ´Ò²»áʹ²âÁ¿²îÉúºÜ´óµÄÎó²î¡£ÔÙÉè¼ÆµÄ¹ý³ÌÖп¼ÂÇÁËÕâЩÒòËØ£¬²¢¸ø³öÁËһЩ½â¾ö·½°¸¡£
¹Ø¼ü´Ê£ºAT89c52£»³¬Éù²¨£»²â¾à
42
Ñγǹ¤Ñ§Ôº±¾¿ÆÉú±ÏÒµÂÛÎÄ (2010)
Ultrasonic ranging system design
Abstract: ultrasonic frequency in the above 20kHz refers to the sound wave,
it belongs to the category. Ultrasonic wave in general also follow the rules of the elastic medium, such as the boundary of the reflection and refraction phenomenon occurring in the media and after absorbing attenuation etc. Because these properties, ultrasonic can be used in measuring the distance. Along with the science and technology unceasing enhancement, ultrasonic technology has been widely applied in People's Daily life and work. The thesis mainly includes two parts, the design that hardware circuit and software program. The hardware circuit including microcontroller circuit, launch circuit, receiving circuit, display circuit and power circuit, in addition to reset circuit and control circuit LED etc. I used to AT89s52 SCM is the core of low cost, high precision, miniaturization digital display ultrasonic rangefinder hardware circuit. The circuit USES modular design, the signal transmission and reception, power supply, temperature measurement, display module. The launch of the probe signal amplifier and detection after the launch of the timer started out, microcontroller timer, ultrasonic was launched by the way, after the return on amplified bandpass filters orthopedics etc, then received by MCU, counter to stop work and time. After temperature measurement of single-chip microcomputer, through the procedure to speed adjustment, the realization of the ultrasonic ranging function. Software program mainly by the main program, preset subroutines, launch procedure, receiving subroutines, display subroutines etc modules. It control chip, sending and receiving data in a certain temperature of ultrasonic velocity correction, and data displayed correctly in LED. Another program control chip to eliminate the emitting and receiving ultrasonic probe. With the hardware circuit and relevant parts of the program flowchart. The actual environment has great influence on ultrasonic, such as external electromagnetic interference source channel interference etc, the temperature of the air of ultrasonic velocity are significantly affected. Besides supply power will also make great difference measurement errors. In the process of design to consider these factors, and proposes some solutions.
Keywords: AT89c52, Ultrasonic, distance
43
Ñγǹ¤Ñ§Ôº±¾¿ÆÉú±ÏÒµÂÛÎÄ (2010)
Ŀ ¼
1 ¸ÅÊö............................................................1 2 ¿ÎÌâÑо¿±³¾°¼°ÒâÒå..............................................1 2.1 ¿ÎÌâÑо¿±³¾°....................................................1 2.2 ¿ÎÌâÑо¿ÒâÒå....................................................1 3 ·½°¸Éè¼ÆºÍÑ¡Ôñ..................................................2 3.1 ³¬Éù²¨²â¾àµÄÔÀí................................................2 3.2 µ¥Æ¬»úAT89S52...................................................3 3.3 ³¬Éù²¨´«¸ÐÆ÷....................................................5 3.4 CAD¼ò½é.........................................................7 4 Ó²¼þµç·Éè¼Æ....................................................7 4.1 ÕûÌåµç·Éè¼Æ....................................................7 4.2 ³¬Éù²¨²â¾àϵͳÉè¼Æ............................................. 9 4.3 ÏÔʾµç·Éè¼Æ....................................................16 4.4 µçÔ´µç·Éè¼Æ ...................................................17 4.5 Ó²¼þµç·Éè¼ÆÓÅ»¯................................................19 5 Èí¼þÉè¼Æ........................................................22
5.1 ³ÌÐòÍê³ÉµÄ¹¦ÄÜ..................................................23 5.2 ³ÌÓïÑÔµÄÑ¡Ôñ................................................... 23 5.3 Ö÷Òª²¿·Ö³ÌÐòÁ÷³Ìͼ...............................................24 5.4 ʵÏÖÖØÒª¹¦ÄܵijÌÐòµÄ·ÖÎö.........................................25 6 ½áÊøÓï ..........................................................28 Ö л ..........................................................29 ²Î¿¼ÎÄÏ×............................................................ 30 ¸½Â¼Ò» pcbͼ........................................................32 ¸½Â¼¶þ ³ÌÐò´úÂë......................................................33
±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©Ô´´ÐÔÉùÃ÷ºÍʹÓÃÊÚȨ˵Ã÷
Ô´´ÐÔÉùÃ÷
±¾ÈËÖ£ÖØ³Ðŵ£ºËù³Ê½»µÄ±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©£¬ÊÇÎÒ¸öÈËÔÚÖ¸µ¼½ÌʦµÄÖ¸µ¼Ï½øÐеÄÑо¿¹¤×÷¼°È¡µÃµÄ³É¹û¡£¾¡ÎÒËùÖª£¬³ýÎÄÖÐÌØ±ð¼ÓÒÔ±ê×¢ºÍÖÂлµÄµØ·½Í⣬²»°üº¬ÆäËûÈË»ò×éÖ¯ÒѾ·¢±í»ò¹«²¼¹ýµÄÑо¿³É¹û£¬Ò²²»°üº¬ÎÒΪ»ñµÃ ¼°ÆäËü½ÌÓý»ú¹¹µÄѧλ»òѧÀú¶øÊ¹ÓùýµÄ²ÄÁÏ¡£¶Ô±¾Ñо¿Ìṩ¹ý°ïÖúºÍ×ö³ö¹ý¹±Ï׵ĸöÈË»ò¼¯Ì壬¾ùÒÑÔÚÎÄÖÐ×÷ÁËÃ÷È·µÄ˵Ã÷²¢±íʾÁËлÒâ¡£
×÷ Õß Ç© Ãû£º ÈÕ ÆÚ£º Ö¸µ¼½ÌʦǩÃû£º ÈÕ ÆÚ£º
ʹÓÃÊÚȨ˵Ã÷
±¾ÈËÍêÈ«Á˽⠴óѧ¹ØÓÚÊÕ¼¯¡¢±£´æ¡¢Ê¹ÓñÏÒµÉè¼Æ£¨ÂÛÎÄ£©µÄ¹æ¶¨£¬¼´£º°´ÕÕѧУҪÇóÌá½»±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©µÄÓ¡Ë¢±¾ºÍµç×Ó°æ±¾£»Ñ§Ð£ÓÐȨ±£´æ±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©µÄÓ¡Ë¢±¾ºÍµç×Ӱ棬²¢ÌṩĿ¼¼ìË÷ÓëÔÄÀÀ·þÎñ£»Ñ§Ð£¿ÉÒÔ²ÉÓÃÓ°Ó¡¡¢ËõÓ¡¡¢Êý×Ö»¯»òÆäËü¸´ÖÆÊֶα£´æÂÛÎÄ£»ÔÚ²»ÒÔÓ®ÀûΪĿµÄǰÌáÏ£¬Ñ§Ð£¿ÉÒÔ¹«²¼ÂÛÎĵIJ¿·Ö»òÈ«²¿ÄÚÈÝ¡£