LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cores > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Richard Damon<Richard@D...>
    Date: Thu Apr 12 01:40:35 CEST 2007
    Subject: [oc] recent i2c questions
    Top
    The way you drive I2C to meet the spec is to use a tri-state pin, but the
    data goes to the ENABLE of the gate (enable if want low), and the data is
    set to gnd. This effectively makes the pin an open collector signal. This
    works for almost all devices. The only problem would be a device that has a
    limited number of Enable signals.

    Richard

    -----Original Message-----
    From: cores-bounces@o... [mailto:cores-bounces@o...] On
    Behalf Of Matt Ettus
    Sent: Wednesday, April 11, 2007 7:08 PM
    To: cores@o...
    Subject: [oc] recent i2c questions


    I just joined the list, but looked over the recent i2c discussion. I
    have a related question which I don't believe was answered.

    The directions in the I2C documentation say to use a tri-state pin for
    SCL and SDA, but I thought that an open-drain was necessary. My
    thinking is this:

    I2C is not collision-free by design. The intention is that you can
    detect when there is a collision if you intend to send a 1 and the bus
    looks like a zero because someone else is driving it low.

    In the case where there are 2 devices driving the bus, if they both
    drive low, there is no problem. If they both "drive" high (really
    disconnected since they are open-drain, letting the pull-up do the weak
    driving) then there is no problem. If one drives low and one "drives"
    high, the one driving high detects a collision, but nobody's outputs are
    shorted since you don't actually drive the bus high, you just let the
    bus be pulled up.

    However, if you use a plain tri-state output, then when you drive high,
    you are really driving the bus high, and someone else driving the bus
    low will result in a short.

    Am I missing something here? The only other option I can see is to
    de-assert the OE signal when you want to send a 1, thus turning off the
    drive and simulating an open drain, but I don't know if that works in
    practice. Most FPGAs don't have real open-drain outputs, do they?

    Thanks,
    Matt


     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.