Yesterday 23:52
Forum: Proton 24
Starter: SimonJA
Views: 0
Replies: 6
Yesterday 14:05
Forum: Proton Plus Compiler v3
Starter: Mike Pink
Views: 0
Replies: 1
Yesterday 14:02
Forum: Proton Plus Compiler v3
Starter: NEX
Views: 0
Replies: 3
Yesterday 13:23
Forum: Proton Plus Compiler v3
Starter: RGV250
Views: 0
Replies: 3
+ Reply to Thread
Results 1 to 6 of 6

Thread: Multi i2c channels33 days old

  1. #1
    Fanatical Contributor Tim's Avatar
    Join Date
    Jan 2003
    Posts
    7,872
    Thumbs Up
    Received: 53
    Given: 85
    Total Downloaded
    808.64 MB

    1 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
    Developer Les's Avatar
    Join Date
    Feb 2002
    Posts
    3,278
    Thumbs Up
    Received: 253
    Given: 107
    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,872
    Thumbs Up
    Received: 53
    Given: 85
    Total Downloaded
    808.64 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,405
    Thumbs Up
    Received: 66
    Given: 131
    Total Downloaded
    2.37 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
    Member Henk57's Avatar
    Join Date
    Jan 2014
    Posts
    229
    Thumbs Up
    Received: 14
    Given: 21
    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
    229
    Thumbs Up
    Received: 14
    Given: 21
    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, 22: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 : 37

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