DAC/ADC options...

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
archy587
 
Posts: 29
Joined: Wed Aug 27, 2014 12:56 pm

DAC/ADC options...

Post by archy587 »

I have a general question about the MCP4725 12 bit DAC breakout board adafruit offers.

i would like 3 - 12bit analog outputs, and 1 - 12 bit ADC for my project. I see the ADS1015 has 4 input channels, but are there any DAC's that have multiple channels? If not, is it possible to use 3 MCP4725 breakout boards? The description says you can only have 2 of these on 1 I2C bus, but the spec sheet for the chip says there are 8 possible addresses, so what gives?

I would like to use an UNO for this. So is the UNO limited to 1 I2C bus? or can you setup more pins as I2C?

as a general follow up, how do I know what the device number limit is on an I2C bus? can i have different types of devices running on 1 bus? example: 2xMCP4725, 1xADS1015, 3xdigipot, 1xteperature sensor. I understand things would slow down, but is it possible?

thanks for any advice!

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: DAC/ADC options...

Post by adafruit_support_bill »

Only one of the address bits is user selectable, so there are only 2 address possibilities, unless you special order a chip with different addressing from the factory. See section 7.2 http://www.adafruit.com/datasheets/mcp4725.pdf
• The choice of A2 and A1 bits are provided by the
customer as part of the ordering process. These
bits are then programmed (hard-wired) during
manufacturing
• The A2 and A1 are programmed to ‘00’ (default),
if not requested by customer
• A0 bit is determined by the logic state of A0 pin.
The A0 pin can be tied to VDD or VSS, or can be
actively driven by digital logic levels. The
advantage of using the A0 pin is that the users
can control the A0 bit on their application PCB
circuit and also two identical MCP4725 devices
can be used on the same bus line.
Other alternatives are to use the softi2c library to define a second bus.

The number of devices on a bus is limited mostly by available unique addresses. There are some electrical considerations also such as too many pullup resistors (although these can be removed) and/or too much line capacitance.

User avatar
archy587
 
Posts: 29
Joined: Wed Aug 27, 2014 12:56 pm

Re: DAC/ADC options...

Post by archy587 »

ok, i just have some follow up questions to help my understanding if thats ok.
The choice of A2 and A1 bits are provided by the
customer as part of the ordering process. These
bits are then programmed (hard-wired) during
manufacturing
so, adafruit orders these from the manufacturer all with the same A2 and A1? from the picture of the back of the adafruit breakout board-
I2C Address: 110001[A0]
this means adafruit ordered them with A2=0 A1=1, which is different from default '00'. So if I had 2 with default '00' and 2 of adafruit '01', then I could put all 4 on the same bus?

finally, under "technical details" adafruit says:
This board/chip uses I2C 7-bit address between 0x62-0x63, selectable with jumpers
is this just another way of saying A0 can be set to 'HIGH' or 'LOW' using jumpers?

thanks again for any clarification.

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: DAC/ADC options...

Post by adafruit_support_bill »

Correct on all counts.

User avatar
archy587
 
Posts: 29
Joined: Wed Aug 27, 2014 12:56 pm

Re: DAC/ADC options...

Post by archy587 »

great. thanks for the help! I think setting up multiple I2C busses would be the way to go.

one more thing though. So if you had, say, a 7bit address I2C device that has a 12bit output, and an 8bit I2C address device that has a 10bit output, could you put them both on the same bus?

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: DAC/ADC options...

Post by adafruit_support_bill »

The address length has no bearing on the data size. It is a byte-oriented serial bus and data of arbitrary length can be sent over it.

Also, don't be confused by the 7-bit/8-bit thing. It is simply an inconsistency in the way people interpret the address.

The device address is a 7-bit field. It is sent, along with an 8th read/write bit to indicate what operation you intend. Some interpret that as two separate 8-bit addresses.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”