hello to all,
I have a question regarding I2C used with Annex.
I would like to connect on the same ESP at the same time, an OLED screen 128*64 and an RTC clock DS3231. is it possible?
is there any specifical trick regarding connections and commands ?
thank you in advance for your help.
regards.
two i2C device at same time...
- PeterN
- Posts: 374
- Joined: Mon Feb 08, 2021 7:56 pm
- Location: Krefeld, Germany
- Has thanked: 176 times
- Been thanked: 212 times
- Contact:
Re: two i2C device at same time...
The I2C- bus addresses the devices by their specific 7bit addresses , so theoretically 128 devices at one bus with only two pins.
The help file gives some more hints: [Local Link Removed for Guests]
Take a look at the i2C-scanner there.
The help file gives some more hints: [Local Link Removed for Guests]
Take a look at the i2C-scanner there.
Re: two i2C device at same time...
thanks,
i had seen that i2c devices have address. but when we use oled screen or other devices that are directly driven by the annex (oled, rtc..) we don't use direct i2c commands (begin, end, etc...) so we don't really select an address.
i had seen that i2c devices have address. but when we use oled screen or other devices that are directly driven by the annex (oled, rtc..) we don't use direct i2c commands (begin, end, etc...) so we don't really select an address.
-
- Posts: 142
- Joined: Mon Feb 08, 2021 10:10 pm
- Location: Scotland
- Has thanked: 46 times
- Been thanked: 50 times
Re: two i2C device at same time...
You don't see the addresses because Annex has them inbuilt - it knows the DS3231 is fixed address of &H68 for example and the OLED will be &H3c (or 3d).
So - to answer your question - yes you can use two I2C devices on the same wires but not e.g. two DS3231s as their addresses would be the same.
So - to answer your question - yes you can use two I2C devices on the same wires but not e.g. two DS3231s as their addresses would be the same.
Re: two i2C device at same time...
Extremely clear, that what i was suspecting and you confirm it clearly. thank you for your time to answer my questions![Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sun Jul 11, 2021 2:41 pm You don't see the addresses because Annex has them inbuilt - it knows the DS3231 is fixed address of &H68 for example and the OLED will be &H3c (or 3d).
So - to answer your question - yes you can use two I2C devices on the same wires but not e.g. two DS3231s as their addresses would be the same.