Hello, I have a project, I need 3 D/A converters on I2C. Looking at MCP3725 https://learn.sparkfun.com/tutorials/mcp4725-digital-to-analog-converter-hookup-guide
I saw the address bit A0 which can be used to implement 2 such DAcs.
But, I wonder, if someone takes out of pcb module (ie with a cable) pin A0, can he use it as "chip select"?
A rough demo could be :
pin2 goes to A0 module1
pin3 goes to A0 module2
pin4 goes to A0 module3
wire.begin(address for LOW); // every module has sameaddress, but only module 1 is LOW
...
wire.end(address for LOW);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
wire.begin(address for LOW); // every module has sameaddress, but NOW only module 2 is LOW
...
wire.end(address for LOW);
and so on.
Can it be done, or the bus "sees" 2 devices with same address and (no matter if none of them is used) it is troubled?
(pls ignore minor syntax errors)
Let me put it in another way :
We have a wire bus. On it, there are attached ....5 devices. 2 of them have the same address.
Is there any conflict as long as the address of the 2 devices is not used?
In other words :
Wire.end();
Wire.beginTransmission(addr1);
..
Is there any problem in bus if there are (more than one) devices with the same between them addr ie addr7 (addr7 != addr1)?
?
Check the datasheet for the latching behavior of A0 - sometimes you can use these address pins like a chip select... other times, the address is latched at startup or something. Finding this information in the datasheet can be difficult though, as you're looking for one or two sentences buried in what's usually a fairly long document.