uchar i; uchar j=0xfe; dispbuf[3]=11; dispbuf[2]=11; dispbuf[1]=11; dispbuf[0]=0; for(i=0;i<4;i++) { P0=0xff; P0=ledcode[dispbuf[i]]; P2=j; delay10ms(1); j=(j<<1)+0x01; } }
void timer1(void)interrupt 3 {
TR1=0; TH1=0x00; TL1=0x00; }
void timer0(void)interrupt 1 {
send=!send; TH0=0x1f; TL0=0xf4; }
void int1(void)interrupt 2 {
if(TH1!=0x00&&TH0!=0x00) {
b=1; TR1=0; TR0=0;
t=TH1*256+TL1; t=t;
TH0=0x1f; TL0=0xf4; TH1=0x00; TL1=0x00; } else {
b=0;
*ÊäËÍÏÔʾÊý¾Ý*
TR1=0; TR0=0; TH0=0x1f; TL0=0xf4; TH1=0x00; TL1=0x00; } }
main() {
unint i;
EA=1; ¿ªÖжÏ
TMOD=0x10; É趨ʱÆ÷0¡¢¶¨Ê±Æ÷1¶¼¹¤×÷ÔÚ¶¨Ê±×´Ì¬£¬T0·½Ê½0£¬T1·½Ê½1
ET0=1; ¶¨Ê±Æ÷0ÖжÏÔÊÐí ET1=1; ¶¨Ê±Æ÷1ÖжÏÔÊÐí IT1=0; ÍⲿÖжÏ1µÍµçƽÓÐЧ TH0=0x1f; TL0=0xf4; TH1=0x00; TL1=0x00; send=1; receive=1; k1=1; k2=1; while(1) {
dis2();
if(k1!=1) ÅжÏk1ÊÇ·ñ°´Ï£¬°´ÏÂÔò¿ªÊ¼Ö´ÐÐζÈת»»ºÍ²â¾à²Ù×÷ {
delay(100); Ïû¶¶ if(k1!=1) {
tmpchange(); Æô¶¯Î¶Èת»» tmp();
EX1=1; ÍⲿÖжÏ1ÖжÏÔÊÐí TR0=1; T0¶¨Ê±¿ªÊ¼ TR1=1; T1¶¨Ê±¿ªÊ¼ delay10ms(7); distance(); EX1=0; while(1) {
dis1();
if(k2!=1) {
delay(100); if(k2!=1) {
for(i=0;i<200;i++) { tmpchange(); tmp(); dis(); } } } if(k3!=1) {
delay(100); if(k3!=1) break; } } } } } }
¸½Â¼3 ÍâÎĸ´Ó¡¼þ
Ultrasonic wave production:
The sound wave is the object mechanical vibrations condition (or energy) dissemination form. The so-called vibration is refers to material the particle the
reciprocating motion which carries on nearby its position of equilibrium. For example, drum surface after rap, it on all directions through the air medium, this is a sound wave. The ultrasonic wave is refers to the vibrational frequency to be bigger than above 20KHz, its each second vibration number of times (frequency) very ear sense of Sheng be essentially consistent, their common ground is one kind of mechanical vibrations, usually will disseminate by the longitudinal wave way in the elastic medium, will be one kind of energy dissemination form, its diversity will be the
ultrasonic frequency is certain distance along the straight line dissemination and the directivity, at present the abdomen supersonic image formation will use the frequency range in 2~5MHz, (will vibrate 1 time for 3~3.5MHz each second is 1Hz,1MHz=106Hz commonly used, namely each second will vibrate times, but Wen Bo frequency between HZ).
Two main parameters about ultrasonic wave:
Two main parameters about ultrasonic wave are: Frequency: F¡Ý20KHz; Power density: p= emissive power (W)emitting area (cm2); Usually p¡Ý0.3wcm2; The
supersonic wave energy which disseminates in the liquid carries on the clean to the object surface's contamination, its principle available ¡°the cavitation¡± the
phenomenon explained: The ultrasonic wave vibration disseminates when the liquid the sound wave intensity of pressure which achieves an atmospheric pressure, its power density is 0.35wcm2, by now the ultrasonic wave sound wave intensity of pressure peak value might achieve the vacuum or the negative pressure, but in fact does not the liquid, becomes the empty cavitation nucleus the liquid member tension fracture. This cavity very close vacuum, it when the ultrasonic wave intensity of pressure achieves reverse is biggest bursts, as a result of bursts the intense impact which produces to . This kind the shock-wave phenomenon which produces by the innumerable tiny cavitation air bubble collapse is called ¡°the cavitation¡± the phenomenon.
The function of ultrasonic wave:
The glass components, the glass and ceramic article's removing dirty stuff is terrible business, if puts in these goods in the cleaning liquid, passes over the
ultrasonic wave again, on the cleaning liquid fierce vibration impact goods dirt, can clean cleanly very quickly.
Although said that the to the favorable balance of trade sound wave, but many animals actually the garden, why the luminous situation soared, but will not lose the direction? The reason is the bat can send out 2 ~ ¡±. The bat is precisely uses this kind ¡°the radar¡± front the judgment flight is an insect, perhaps obstacle. But radar's quality some important performance precision. Antijamming ability and so on, bat far superior and modern wireless beacon. On the deep research animal body each