Hi everybody!
I'm working on ultrasonic sensor brought from parallax called ping))) operates at 40KHz.
I have successfully tested the ping and also the timer1 to get the required time elapsed each separately.
But when i gathered them into one code and tried to test the full action, the sensor does not give a response.
I think that the problem is the frequency that the UC (pic16f877a) read the back signal from the sensor with. It seems doesn't work at 40KHz.
My adjustments for the timer1 is:
TMR1L=0;
TMR1H=0;
T1CKPS1=0;
T1CKPS0=0;
T1OSCEN=0;
T1SYNC=1;
TMR1CS=0;
TMR1ON=1;
I'm using C language.
Any help with that??What do you think the problem is?
I'm working on ultrasonic sensor brought from parallax called ping))) operates at 40KHz.
I have successfully tested the ping and also the timer1 to get the required time elapsed each separately.
But when i gathered them into one code and tried to test the full action, the sensor does not give a response.
I think that the problem is the frequency that the UC (pic16f877a) read the back signal from the sensor with. It seems doesn't work at 40KHz.
My adjustments for the timer1 is:
TMR1L=0;
TMR1H=0;
T1CKPS1=0;
T1CKPS0=0;
T1OSCEN=0;
T1SYNC=1;
TMR1CS=0;
TMR1ON=1;
I'm using C language.
Any help with that??What do you think the problem is?
Last edited: