Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
wowowee said:ok.. can i use pic16f877 instead of the lego rcx? what does lego rcx do?
Yes it makes no sense using another chip to do that when it can also be done with the PIC.Nigel Goodwin said:however, you could also generate the 40KHz directly from the PIC instead!.
William At MyBlueRoom said:Here's a PIC UltraSonic project.
https://www.micro-examples.com/public/microex-navig/doc/200-pic-microcontroller-examples.html
Nigel Goodwin said:Yes, the four opamps are the ultrasonic receiver, with the last one as a comparator giving a logic level output. As long as the 555 is fed off the same 5V as the PIC, there should be no problem gating it via pin 4 - however, you could also generate the 40KHz directly from the PIC instead!.
wowowee said:how do you generate 40khz from the pic? i never thought the pic can generate that much.
is it by using the pwm?
Hero999 said:I'm not a PIC person but I assume you use the timer to produce a pulse on an output port every 25:mu:S
wowowee said:okay thanks. i just found out that the pwm output can generate 40khz.
Nigel Goodwin said:You're missing the point - by doing it in software it not only means you're not restricted to a PIC with PWM (and limited to that specific pin), it means you can produce exact numbers of cycles of 40KHz very easily.
Nigel Goodwin said:Read my post above about how to do it, it's really VERY easy!.
wowowee said:what will happen if two ultrasonic range meters (in the link below) face one another? i mean the ultrasonic modules will face each other. will there be any problems regarding the ultrasonic pulses? or will it work just fine?
Nigel Goodwin said:Only if they transmit at different times - otherwise the tranmission from the other one could be mistaken for a reflection and give the wrong range.