I2C issue


Closed Thread
Results 1 to 17 of 17

Thread: I2C issue

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    Thanks for the link, I may have to use that technique. I'm currently setting up the hardware to do the WRITE.
    I already use it for READ.
    I have never been 100% successful in getting the HW WRITE to work, so I usually just fall back to bit
    banging. Fortunately, I'm hooked up to the real SDA and SCL on the chips.
    It was always real easy to do a master-slave thing by sending in software and receiving in hardware,
    you don't have to reconfigure any registers.

    And for those of you that want to play with I2C: If you use my interrupt-driven slave (posted on this forum), you can
    use I2CREAD and I2CWRITE at the same time the slave is running. One chip at both ends of the conversation!
    A great debugging tool.
    Charles Linquist

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    Name:  I2C_using_shift.jpg
Views: 922
Size:  163.7 KBThe SHIFTOUT / SHIFTIN method does, indeed look like it is going to work. I get a lot more control over what is going on.
    I don't have eveything configured perfectly yet, but Thanks!
    Charles Linquist

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    Cool!!!
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    BUT --- I can't use the shiftin/shiftout commands to write I2C. It violates the open-collector spec. That leaves me with a couple of options:
    1. Learn to use the hardware
    2. Modify the library to give shiftin/shiftout an open-collector mode (like I already have with DEBUG)
    3. Do everything at the bit level myself.
    Charles Linquist

  5. #5
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    I vote hardware!!
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    Working on it now. I'll get an interrupt-driven routine going and share it when it gets done.
    Charles Linquist

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: I2C issue

    Is there anything here that would help? I have not used DTs instants for this.
    http://darreltaylor.com/DT_INTS-18/home.html

    Looking forward to seeing your solution.
    Dave
    Always wear safety glasses while programming.

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