multiple i2c devices does not work with mikrosdk 2.0

Fully featured PIC compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
luquas
Posts: 15
Joined: 01 Jan 2020 17:29

multiple i2c devices does not work with mikrosdk 2.0

#1 Post by luquas » 06 Oct 2021 23:44

I'm having i2c problem when using mikrosdk 2.0. When using multiple devices on the bus, only the one started last works. I'm using Necto studio 1.8.2.
Last edited by luquas on 07 Oct 2021 11:20, edited 1 time in total.

User avatar
Tanja_Kovacevic
mikroElektronika team
Posts: 98
Joined: 09 Aug 2021 11:39

Re: Vários dispositivos i2c não funciona com o mikrosdk 2.0

#2 Post by Tanja_Kovacevic » 07 Oct 2021 09:55

Hi Luquas,

I have to ask you to write in English because the purpose of the forum is,
above all, that other users can understand questions and answers.


Kind regards,
Tanja

luquas
Posts: 15
Joined: 01 Jan 2020 17:29

multiple i2c devices does not work with mikrosdk 2.0

#3 Post by luquas » 07 Oct 2021 11:17

Good night,
I'm having i2c problem when using mikrosdk 2.0.
When using multiple devices on the bus, only the one started last works.
I'm using Necto studio 1.8.2.

User avatar
Tanja_Kovacevic
mikroElektronika team
Posts: 98
Joined: 09 Aug 2021 11:39

Re: multiple i2c devices does not work with mikrosdk 2.0

#4 Post by Tanja_Kovacevic » 11 Oct 2021 13:13

Hi Luquas,

Do those I2C devices, which are attached to the same mikroBUS, have the same slave address?


Kind regards,
Tanja

luquas
Posts: 15
Joined: 01 Jan 2020 17:29

Re: multiple i2c devices does not work with mikrosdk 2.0

#5 Post by luquas » 15 Oct 2021 21:14

Good afternoon,
No, it's three devices with different addresses.
After initialization only the last one works.
with two when before calling the read or write function I have to close the ones I'm not going to use and initialize again the one I want to use.
i am using a click temp8 an rtc and i2c driver.

User avatar
Tanja_Kovacevic
mikroElektronika team
Posts: 98
Joined: 09 Aug 2021 11:39

Re: multiple i2c devices does not work with mikrosdk 2.0

#6 Post by Tanja_Kovacevic » 20 Oct 2021 10:28

Hi,

With different slave addresses, you should be able to use those clicks simultaneously (one by one, without having to initialize every time).
You can send us some pictures or connection schematics and your project at
support att mikroe dot com
to try to find out the cause.


Kind regards,
Tanja

Post Reply

Return to “PIC AI compilers”