Today 09:55
Forum: Website / Forum Issues
Starter: hadv215
Views: 0
Replies: 6
Today 07:40
Forum: WIKI Discussion
Starter: AlbertoFS
Views: 0
Replies: 9
Yesterday 22:26
Forum: The Lounge
Starter: normnet
Views: 0
Replies: 0
Go to last post By: charliecoultas
Yesterday 20:01
Forum: The Lounge
Starter: charliecoultas
Views: 0
Replies: 4
+ Reply to Thread
Results 1 to 6 of 6

Thread: Multi i2c channels188 days old

  1. #1
    Fanatical Contributor Tim's Avatar
    Join Date
    Jan 2003
    Posts
    7,942
    Thumbs Up
    Received: 67
    Given: 93
    Total Downloaded
    884.13 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,380
    Thumbs Up
    Received: 306
    Given: 117
    Total Downloaded
    1.50 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,942
    Thumbs Up
    Received: 67
    Given: 93
    Total Downloaded
    884.13 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,617
    Thumbs Up
    Received: 102
    Given: 146
    Total Downloaded
    2.75 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 22:35.
    George

  5. #5
    Member Henk57's Avatar
    Join Date
    Jan 2014
    Posts
    301
    Thumbs Up
    Received: 23
    Given: 28
    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
    Member Henk57's Avatar
    Join Date
    Jan 2014
    Posts
    301
    Thumbs Up
    Received: 23
    Given: 28
    Total Downloaded
    192.60 MB

    0 Not allowed!

    Default Re: Multi i2c channels

    ...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, 21:57
  3. 18F4550 and PWM channels
    By pdgnr in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 11th September 2007, 07:11
  4. HPWM to 3 channels
    By vhluc in forum Robotics
    Replies: 4
    Last Post: 24th June 2007, 09:01

Members who have read this thread : 40

Actions :  (Set 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