I2c, srf02, 16f688 -> ultrasonic rangefinder


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: I2c, srf02, 16f688 -> ultrasonic rangefinder

    Code seems OK, perhaps too short the delay between the write I2C command and the read

    Did you place the pullup resistors on the SDA and SCL lines?

    Cheers

    Al.
    Last edited by aratti; - 24th February 2011 at 05:42.
    All progress began with an idea

  2. #2
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default Re: I2c, srf02, 16f688 -> ultrasonic rangefinder

    Thanks, Al.

    Quote Originally Posted by aratti View Post
    Code seems OK, perhaps too short the delay between the write I2C command and the read.
    It's the same delay used by jellis00, but I think he was running 18F devices and I don't know at what speed. (Or if that would make a difference.)

    Did you place the pullup resistors on the SDA and SCL lines?
    Yes; per the SRF02 specifications recommendation, I used 1.8K (see the schematic).

    Russ
    Attached Images Attached Images
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: I2c, srf02, 16f688 -> ultrasonic rangefinder

    Russ, I think your problem is in the this line of code:

    SCL VAR PORTA.4 ' Serial clockS

    PortA.4 is an open collector pin and I think not suitable for I2C comm.

    Try to change pin.

    Cheers

    Al.
    All progress began with an idea

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts