2022-07-28 03:13 AM
Hi,
I am using 4 NFC 4 Clicks in combination with 74HC138 to connect them directly to on I2C bus. Can anyone hep me how do I implement this in my code so that he controller would switch between every I2C device.
Rgrd,
Anej
2022-07-28 06:54 AM
Options:
Paul
2022-07-28 07:57 AM
I dont have any experience with those modules but it says they can be controlled via I2C.... you only need to connect a I2C bus (two wires + ground +vcc) and forget about the CS
2022-07-28 07:58 AM
So you are decided to use the SPI interface? do you chose it for the speed?
Do you know that SPI and I2C are different things ,right?
2022-07-28 08:23 AM
How's the 74HC138 wired in this contrivance?
Not sure it's something I'd use for I2C, is there some way to set or select I2C slave addresses?
How about sourcing SCL from different pins on the STM32 side, and then cycling who's using which one.
2022-07-28 08:27 AM
Agree with Javier,
*) CS is for SPI only.
Like Tesla said
a) Configure each NFC for different I2C address (if possible?)
b) Use different I2C ports on MCU for each NFC
or
c) Use the HC138 to fan out the SCK, and use two GPIO pins to control the HC138.