# External DAC

**URL:** <https://discourse.myriadrf.org/t/external-dac/2820>\
**Category:** LimeSDR\
**Created:** [16 May 2018 12:57 UTC](https://discourse.myriadrf.org/t/external-dac/2820 "2018-05-16T12:57:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matti](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Matti](https://discourse.myriadrf.org/u/Matti)\
**Post date:** [16 May 2018 12:57 UTC](https://discourse.myriadrf.org/t/external-dac/2820/1 "2018-05-16T12:57:22Z")

</div>

I would like to have external DAC to LimeSDR USB/mini. It seems that it is not easy to use GPIO header for SPI/I2C interface. Can I get somehow SPI/I2C interface for external DAC?

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [16 May 2018 16:27 UTC](https://discourse.myriadrf.org/t/external-dac/2820/2 "2018-05-16T16:27:09Z")

</div>

I’m guessing you’d need to modify the FPGA gateware. Something similar-ish was done for the larger LimeSDR-USB board — albeit to give SPI access to the LMS7002M from a micrcontroller attached via GPIO.

> [@Control LimeSDR via SPI using Arduino MCU](https://discourse.myriadrf.org/t/control-limesdr-via-spi-using-arduino-mcu/981/18):
>
> Well, FPGAs are a different paradigm. In an FPGA you are literally fabricating logic to run bits around your board at the hardware level. This allows, for example, having instantaneous and asynchronous, non-clocked propagation of logic signals (concurrent logic); likewise, you can also build state machines running synchronously on some clock domain you define. FPGAs are the closest thing to the highest speed you can get, other than building a custom application specific IC (ASIC). VHDL (als…

@Zack could likely advise.

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [17 May 2018 06:11 UTC](https://discourse.myriadrf.org/t/external-dac/2820/3 "2018-05-17T06:11:50Z")

</div>

> [@Matti](#):
>
> It seems that it is not easy to use GPIO header for SPI/I2C interface.

Why is that?

> [@Matti](#):
>
> Can I get somehow SPI/I2C interface for external DAC?

Of course. Just have to change FPGA gateware by assigning GPIO pins for SPI/I2C and updating NIOS system. Although FPGA skills required.

---

<div class="post-metadata">

**Author:** ![Matti](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Matti](https://discourse.myriadrf.org/u/Matti)\
**Post date:** [17 May 2018 06:27 UTC](https://discourse.myriadrf.org/t/external-dac/2820/4 "2018-05-17T06:27:17Z")

</div>

I don’t have much FPGA experience, so that is the reason, why I would not like to modify FPGA gateware. I just wonder if someone has done that already.

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [17 May 2018 06:35 UTC](https://discourse.myriadrf.org/t/external-dac/2820/5 "2018-05-17T06:35:30Z")

</div>

What DAC? Do you need to control it all the time or just set some level at some point and forget?

---

<div class="post-metadata">

**Author:** ![Matti](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Matti](https://discourse.myriadrf.org/u/Matti)\
**Post date:** [17 May 2018 06:55 UTC](https://discourse.myriadrf.org/t/external-dac/2820/6 "2018-05-17T06:55:24Z")

</div>

Model is not defined, but I would need two adjustable bias voltages. No need for high speed control. Few times per second would be enough.

---

<div class="post-metadata">

**Author:** ![Zack](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/zack/32/89_2.png) [@Zack](https://discourse.myriadrf.org/u/Zack)\
**Post date:** [17 May 2018 07:49 UTC](https://discourse.myriadrf.org/t/external-dac/2820/7 "2018-05-17T07:49:12Z")

</div>

Let me know your desired DAC and how you want to connect it to GPIO. Then I can help you with FPGA/SW side at my free time. Do not promise it to be quick although.

---

<div class="post-metadata">

**Author:** ![Matti](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Matti](https://discourse.myriadrf.org/u/Matti)\
**Post date:** [18 May 2018 05:42 UTC](https://discourse.myriadrf.org/t/external-dac/2820/8 "2018-05-18T05:42:49Z")

</div>

For example MCP4822 would meet my requirements. It has SPI interface, which is probably easier than I2C. Basically I would SCK and SDI signals and then CS and LDAC signals can be probably controlled as current GPIO implementation.
