Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

robot motion control:

Status
Not open for further replies.

remas

New Member
hi,
my name is rasha, and i'm doing my project about controlling the movement of a robot , so it will have smooth way, and don't hit Obstacles,
i'm using an ultrsound sensor to detect any obstacles 10cm away..
and the problem that i'm facing is how to use the pic16f84a MCU to control the tx sending operation (40KHz), and how to use the timer to calculate the time that has been taken for the rx to receive the signal???
and to be more clear i want from the microcontroller the following methods:
1.to send 40KHz signal to the ultrasound tx.
2.to start timer
3.wait untill the ultrasound rx to receive the ultrasound tx signal.
4.stop the timer
5.calculate the distace using the following rule:
speed of sound*(timepassed/2)
my question is how can i program that in c language? i'm not asking anyone to the program for me i just need to know the timer control idea!!
so if you please take a look and try to help me with something, coz i try to google that but the info that i found is in assemply language!!
so is there anyone can help me???!!! i'll be very thankful to u
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top