timer0 in pic16f84a:

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
 
Posting your question twice is not going to double your chances. If anything it will reduce them. You need to stick to one thread and not have 10 of the same ones. Nobody is going to help you if you don't help yourself. Try asking your teacher or fellow peer.
 
hahaha , i've got to tell u that i didn't see that coming, for a while i thought that i found someone who could help me .
and the only reason for me to post this question again, is because i thought that maybe it has more microcontroller than a robotic design.
so i said to my self to give it a try in the microcontroller section, that's why!!
anyway, thanx for ur advice, and i'll take it in my consideration..
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…