Hi All,
I have a new simple microcontroller design coming up, but it needs two channels of D/A. I want to use a serial interface between the CPU and the external D/As to keep it simple, as no high speed is necessary. Would I be better off using the SPI or I2C interface for this? I haven't used either before (usually used memory mapped parallel interface).
Thanks,
Sean
Adding D/A converters, use SPI or I2C?
Re: Adding D/A converters, use SPI or I2C?
LEDs vs Bulbs, LEDs are winning.
Re: Adding D/A converters, use SPI or I2C?
Recently researched the same question for a project of my own. I needed 2 ch of 12 bit D/A. In the end I discovered much better availability of SPI as opposed to I2C. I guess the reason is that most often D/A applications DO require high speed, and SPI has it all over I2C when it comes to speed.
I ended up selecting Microchip MCP4822-E/P, available in stock from Allied.
I ended up selecting Microchip MCP4822-E/P, available in stock from Allied.
-
- Posts: 582
- Joined: Tue May 09, 2006 12:44 am
- Contact:
Re: Adding D/A converters, use SPI or I2C?
I've used both protocols in PIC controlled projects and find SPI easier to implement and more straight forward to handle. If you're a proficient coder and can design a decent circuit you should have no problems with either protocol, spec limits would be the ultimate deciding factor in that case.
Re: Adding D/A converters, use SPI or I2C?
I agree with SETEC, go with SPI.
SPI is very simple but requires more pins than I2C. You can even bit bang SPI pretty easily. I2C is more complex and harder to get right, even for experienced programmers. I2C's big advantage comes when you have more than 2 devices. They can all share the same 2 wires while SPI requires an additional pin per device (for select).
SPI is very simple but requires more pins than I2C. You can even bit bang SPI pretty easily. I2C is more complex and harder to get right, even for experienced programmers. I2C's big advantage comes when you have more than 2 devices. They can all share the same 2 wires while SPI requires an additional pin per device (for select).
-
- Posts: 400
- Joined: Tue Dec 25, 2001 1:01 am
- Location: Bellingham, WA
- Contact:
Re: Adding D/A converters, use SPI or I2C?
You're at the possible break even point. I2C devices have the device address hard wired into them. Some have one or two pins available to choose an address, but not all. You may need a separate pair of I/O pins just for a second I2C device, but with SPI you will need one per device in addition to the bus requirements.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 30 guests