Multi i2c channels


Yesterday 23:03
Forum: Proton Plus Compiler v3
Starter: gdesantis
Views: 0
Replies: 3
Yesterday 20:28
Forum: PICKit Plus
Starter: evan
Views: 0
Replies: 7
Yesterday 11:23
Forum: The Lounge
Starter: Les
Views: 0
Replies: 12
+ Reply to Thread
Results 1 to 6 of 6

Thread: Multi i2c channels362 days old

  1. #1
    Fanatical Contributor Tim's Avatar
    Join Date
    Jan 2003
    Posts
    7,564
    Thumbs Up
    Received: 65
    Given: 91
    Total Downloaded
    895.24 MB

    0 Not allowed!

    Default Multi i2c channels

    Hi,

    I have 2 i2c chips that I need to talk to but there have the same address. Is there a way to have 2 software i2c coms running?

    I'm currently running as a slave SPI on hardware so the hardware i2c is not available to me.

    Thanks

    Tim
    Tim

  2. #2
    Fanatical Contributor Les's Avatar
    Join Date
    Feb 2002
    Posts
    3,019
    Thumbs Up
    Received: 312
    Given: 120
    Total Downloaded
    1.51 GB

    0 Not allowed!

    Default Re: Multi i2c channels

    See I2Cin and I2Cout. With these commands, the pins used for SCL and SDA can be chosen in the commands themselves.
    For more example programs for Proton and Proton24 or updates, please visit: Proton WIKI or Proton Files

  3. #3
    Fanatical Contributor Tim's Avatar
    Join Date
    Jan 2003
    Posts
    7,564
    Thumbs Up
    Received: 65
    Given: 91
    Total Downloaded
    895.24 MB

    0 Not allowed!

    Default Re: Multi i2c channels

    Dooow

    Shows how long its been since I read the manual. I thought it was a one of Define.

    Thanks
    Tim

  4. #4
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,853
    Thumbs Up
    Received: 163
    Given: 162
    Total Downloaded
    3.24 GB

    0 Not allowed!

    Default Re: Multi i2c channels

    have the same address
    That was pretty unlucky.

    Some devices have a mechanism to change their address.
    Last edited by towlerg; 15th December 2017 at 23:35.
    George

  5. #5
    Senior Member Henk57's Avatar
    Join Date
    Jan 2014
    Posts
    401
    Thumbs Up
    Received: 40
    Given: 35
    Total Downloaded
    192.60 MB

    0 Not allowed!

    Default Re: Multi i2c channels

    On devices that have only one I2C, then you can also add I2C Multiplexer like TCA9548A https://learn.adafruit.com/adafruit-...akout/overview

    Henk.

  6. #6
    Senior Member Henk57's Avatar
    Join Date
    Jan 2014
    Posts
    401
    Thumbs Up
    Received: 40
    Given: 35
    Total Downloaded
    192.60 MB

    0 Not allowed!

    Default Re: Multi i2c channels

  7. ...and if you have (slave) devices with the same adress then you have a go.
    Here's a little snippit,

    Code:
    HBusOut %11100000, [%00000000] ; tri-state, no channel select (and after POR)
    HBusOut %11100000, [%00000001] ; Channel0 active
    HBusOut %11100000, [%00000010] ; Channel1 active
    HBusOut %11100000, [%00000100] ; Channel2 active
    ;
    HBusOut %11100000, [%10000000] ; Channel7 active
    ; etc.
    Device adress is standard, but with A0-A2 you can can select ie. %11101000 in this case A2 line has a pull-up resistor.
    Full description: 1110-A2-A1-A0-X, and X is the R/W bit.

    Henk.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Multi-Master-Slave I2C operation
    By shunt010 in forum Projects discussion
    Replies: 4
    Last Post: 15th September 2014, 21:14
  2. ADC channels 16F887 seems not to be according to datasheet
    By volvo in forum Proton Plus Compiler v3
    Replies: 11
    Last Post: 12th November 2011, 22:57
  3. 18F4550 and PWM channels
    By pdgnr in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 11th September 2007, 07:11

Members who have read this thread since 1st December 2018, 17:03 : 0

Actions :  (Set Date)  (Clear Date)

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

Tags for this Thread

Posting Permissions

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