70 www.xilinx.com Spartan-3E Starter Kit Board User GuideUG230 (v1.0) March 9, 2006Chapter 9: Digital to Analog Converter (DAC) RThe FPGA first sends eight dummy or “don’t care” bits, followed by a 4-bit command. Themost commonly used command with the board is COMMAND[3:0] = “0011”, whichimmediately updates the selected DAC output with the specified data value. Following thecommand, the FPGA selects one or all the DAC output channels via a 4-bit address field.Following the address field, the FPGA sends a 12-bit unsigned data value that the DACconverts to an analog value on the selected output(s). Finally, four additional dummy ordon’t care bits pad the 32-bit command word.Specifying the DAC Output VoltageAs shown in Figure 9-2, each DAC output level is the analog equivalent of a 12-bitunsigned digital value, D[11:0], written by the FPGA to the DAC via the SPI interface.The voltage on a specific output is generally described in Equation 9-1. The referencevoltage, V REFERENCE, is different between the four DAC outputs. Channels A and B use a3.3V reference voltage and Channels C and D use a 2.5V reference. The reference voltagesthemselves have a ±5% tolerance, so there will be slight corresponding variances in theoutput voltage.Equation 9-1DAC Outputs A and BEquation 9-2 provides the output voltage equation for DAC outputs A and B. Thereference voltage associated with DAC outputs A and B is 3.3V ± 5%.Equation 9-2DAC Outputs C and DEquation 9-3 provides the output voltage equation for DAC outputs A and B. Thereference voltage associated with DAC outputs A and B is 2.5V ± 5%.Equation 9-3Figure 9-4: SPI Communications Protocol to LTC2624 DAC310x xx xx xx xx xx x 9 10 a0 a1 a2 a 3 c0 c1 c2 c311876543210ADDRESSa3 a2 a1 a00 0 0 00 0 0 10 0 1 00 0 1 1AllDAC ADAC BDAC CDAC D1 1 1 1SPI_MOSISPI_SCKDAC_CSSPI_MISO12-bit UnsignedCOMMANDDon’t CareUG230_c9_04_021806msblsbDon’t CareDATASlave: LTC2624 DACMasterSpartan-3EFPGAV OUTD 11:0[ ]4096,--------------------- V REFERENCE×=V OUTAD 11:0[ ]4096,--------------------- 3.3V 5%±( )×=V OUTCD 11:0[ ]4096,--------------------- 2.5V 5%±( )×=