Hi,
I've been trying to use a PIC to measure RF time of flight thru this method:
I start TIMER0 and then transmit my data over RF to another PIC. The other PIC processes the data and replies. Upon receiving the data, i stop the timer. Taking the difference between the timer0 readings, and taking away all appropriate processor delays, I should be able to find the time-of-flight.
However, TIMER0 increments every instruction cycle(ie 4 clk cycles). With a processor speed of 40MHz, that gives 0.1us per increment. Leading to a very low accuracy. Each increment in TIMER0 will mean a 15m increase in distance.
I'm trying to reduce this value.
Anyone has any suggestions? OR am i doing this wrongly?
Thanks!!
I've been trying to use a PIC to measure RF time of flight thru this method:
I start TIMER0 and then transmit my data over RF to another PIC. The other PIC processes the data and replies. Upon receiving the data, i stop the timer. Taking the difference between the timer0 readings, and taking away all appropriate processor delays, I should be able to find the time-of-flight.
However, TIMER0 increments every instruction cycle(ie 4 clk cycles). With a processor speed of 40MHz, that gives 0.1us per increment. Leading to a very low accuracy. Each increment in TIMER0 will mean a 15m increase in distance.
I'm trying to reduce this value.
Anyone has any suggestions? OR am i doing this wrongly?
Thanks!!