1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

I2C - Do i need to check all the states of I2C bus?

Discussion in 'Embedded' started by abhay, Feb 1, 2007.

  1. abhay

    abhay Guest

    hi,
    i am working with philips microcontroller LPC935 which is to be
    attached to I2C port expander.
    i have to write a code for this .As my device is configured as master
    receiver to read (i have to read only) the value or status of port
    pins .

    my question is that : Do i need to check for all 25 states of I2C bus
    from status register for my operation ?
     
    abhay, Feb 1, 2007
    #1
    1. Advertisements

  2. abhay

    Tauno Voipio Guest

    It depends.

    If the bus does not have other chips which could
    claim bus mastership, you can forget the states
    with change of mastership and losing the arbitration.

    Otherwise, you have to consider all the states.
     
    Tauno Voipio, Feb 1, 2007
    #2
    1. Advertisements

  3. abhay

    abhay Guest

    there is no other chip on the bus , just one slave port
    expander................do u have a small C-code for this application
     
    abhay, Feb 1, 2007
    #3
  4. On such port expander you might even get by without considering clock
    stretching etc.
    Try to find the far most simple I2C example for your controller. Afaik all
    you need to do is to send a start condition, send the adress with R/W set to
    read and then read out the status byte - followed by a stop.
    /Roland
     
    Roland Zitzke, Feb 1, 2007
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.