Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
Thread Tools Display Modes
Old 13th February 2004, 05:39 PM   (permalink)
Default srf04 ultrasonic sensors

Hi,
I'm trying to interface two srf04 ultrasonic sensors to a PIC16F872. I'm wondering if any of you have already done this as I'm having problems writing the code in assembly and cannot find sample code on the net.
cjgalway1000 is offline   Reply With Quote
Old 23rd February 2004, 04:33 PM   (permalink)
Default

You may post your code onto here, we may help.

I wrote for SRF04, but with AT89C51, and I'm writing on PIC for Polaroid (not finished). But I think it's easy as you send or read a signal on a pin.

The fact that SRF04 has only 4 pins, 2 are connected to pwr, 2 other pins are the signal wires.

You have to do nothing, except start with a pulse and wait until an interrupt on the second pin. It's the simplest way.
falleafd is offline   Reply With Quote
Old 5th March 2004, 04:55 PM   (permalink)
Default SRF04 with Pic 16F876

I have just done to build and program for SRF04 and 08 with PIC16F876. That is quite easy. You can use command output_low and output_high and delay_us(10) to make a output trigger pulse to activate module and write down some simple code lines to measure the time of flight. You should use interrupt routine which is set up for period of time of interrupt routine to calculate the echo. Actually, it is quite simple so you can do it by your self.
If you have any stuck, let email to me and I can help you.
Email to: dungnt@mip.sdu.dk
Good luck
__________________
Learning by doing.
odense is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 05:41 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.