I have designed a circuit by System Generator to implement on FPGA. The output signal is a sinusoidal with changeable frequency. I need to read the output signal by oscilloscope. I should put a DAC at the output since the output of FPGA is parallel and digital. I do not know how should I do this, since I am not familiar with DAC. My FPGA is Spartan3. Can I design the DAC by FPGA itself or it must be a physical circuit implemented by resistors, capacitors etc.? Can anyone show me a circuit or program for a DAC which is applicable for me?
You need to work out what sort of specifications you need because DACs come in all sorts of varieties from the basic ladder network all the way up to very high speed ones. A cursory glance at Maxim shows they make around 350 varieties alone, so you can imagine the quantity of DACs available on the market by the rest of the big guys.
Basic things to consider when choosing a DAC:
- Current or Voltage? Because there are DACs for both types.
- Speed. If you're sampling greater than 1MHz then you need to consider specialized high-speed DACs.
- Precision. A barebones 10-bit DAC will give you 2^10 levels, which on 5V will give you 4.8mV precision. Does your application need a finer resolution than that? If so, then you need a higher-bit DAC. A DAC IC will have less error and thermal variance than a R-2R network with 5% resistors.
- Interface. Serial DACs are available which will take up only a data and clock line, or tie into peripherals such as SPI or I2C. Parallel DACs take up a lot of lines but are trivial to drive.
- Form factor. Things like DIPs and SOTs are easy to prototype with. VFNs/BGAs are basically impossible without a reflow station.
I'd say you'd be fine with a DAC0808 which is an inexpensive 8 bit parallel ADC.