DAC components

Hi again. Another question about analog outputs. It seems I need a DAC to produce a true analog signal. Lefty already showed a nice product:
http://gravitech.us/MicroResearch/MINI/MR-MINI-12BIT-DAC/MR-MINI-12BIT-DAC-Manual.pdf

But as far as I know I can only get it via eBay and it must travel from the US to Europe(Netherlands). Do you guys know similiar products here in Europe? I have been looking, but I don't really know howto search, I don't know the microcontroller "jargon" yet! I can find dozens of DAC chips, but not baked on a ready-to-use board. What I need:

  • 2 analog outputs (x..5 Volt)
  • Fast Interface... SPI / I2C ?

The DAC from the link above has SPI support. But how fast is SPI? How long would it take to send a 16 bits value? I need to know this so I can do proper timing with some pulses that have to follow. As for the DAC mentioned here, it's not clear to me howto send the two output values either. Is there some sort of protocol (can't find it in the PDF)?

Forgive me for the questions, but I really have to learn all the hardware stuff from scratch.

Rick

That is a Futurlec board, http://www.futurlec.com/Mini_DAC.shtml, order directly from them and they will ship it to you. There's a link on the page to the data sheet, check section 5 for details in the serial interface.

Thanks! Got it ordened.

I'm reading the datasheet and the SPI tutorial

One question remains though. I need to write an output value towards DAC at a certain pulse. The first interrupt will write output for analog output 1, a second interrupt for analog output 2. It could happen that both interrupts happen at the same time... Can interrupt1 disrupt interrupt2? Ifso, can the SPI communication get messed up?

< execute interrupt 1 >
SPI_setup_for_AnalogOutput1
SPI_write_value1

< execute interrupt 2 >
SPI_setup_for_AnalogOutput2
SPI_write_value2

Could these functions overlap? Or is it a bad idea to send data within a interrupt anyway? The tutorial used lots of delays while writing to the EEPROM via SPI, but I guess I can do without?

The DAC sheet says:
"MCP492X utilizes a double-buffered latch structure to
allow both DACA's and DACB's outputs to be
syncronized with the LDAC pin, if desired"

I guess this also has something todo with my question, but I can't translate it into human language :slight_smile:

If so, can the SPI communication get messed up?

It shouldn't, I think the SPI is buffered, and tolerant of clock stretch.

As for dual latching, just send your output commands for both DACs (ie 32 bits of data and afterwards drive LDAC low. The data will load the DAC input buffers and the LDAC will latch both into the output buffers.