Urgent help with ping)))

Discussion in 'Embedded Systems and Microcontrollers' started by Sherif Amer, Jul 6, 2010.

  1. Sherif Amer

    Thread Starter New Member

    Jul 6, 2010
    8
    0
    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?
     
    Last edited: Jul 6, 2010
  2. Sherif Amer

    Thread Starter New Member

    Jul 6, 2010
    8
    0
    I've already solved it and thanks to ALLAH it's working so properly right now :)

    Thx guys! :)
     
Loading...