0

I want to use four of MCP4725 DAC module at the same time but it only has two I2C addresses which can be set via jumpers:

In page 10 of the datasheet it says:

Device Address Selection pin. This pin can be tied to VSS or VDD, or can be actively driven by the digital logic levels. The logic state of this pin determines what the A0 bit of the I2C address bits should be.

Is there anyway to set more than two addresses for this module? or any hack via hardware/software...

ElectronSurf
  • 814
  • 4
  • 17
  • 43

1 Answers1

1

There is a trick to this, and it involves considering one device "active" and all others "inactive".

You only ever work with one address, and that is the address of the "active" unit. All other units are on the secondary "inactive" address which you ignore.

The address pin of each unit is then connected to an IO pin, and can be considered a "chip select" pin.

The sequence, then, is:

  • Set unit one's A0 low and all other units HIGH.
  • Communicate on Address 0
  • Set unit two's A0 LOW and all other units HIGH.
  • Communicate on Address 0
  • Etc for each unit

Since you never communicate on Address 1 the rest of the "inactive" units ignore all the communication.

Majenko
  • 105,851
  • 5
  • 82
  • 139