The tcDspDac7616 class is used to set up and send data to a BurrBrown DAC7616 Quad D-to-A converter. The converter is accessed via a McBSP interface.
This is a simple example of tcDspDac7616 creation and usage:
{ // This class controls the MityDSP FPGA, and provides // register interfaces for CS control lines, etc. This // class is generally specific to a MityDSP application. class tcFPGA : public tcDspOutputLatch { ... public: typedef enum { ... eeDAC_CS, eeDAC_LDAC, ... } teOutputs; // This method manages the CS output latch for various devices int SetOuput(unsigned int ID, unsigned int Value); ... } int main (int argc, char *argv[]) { tcFPGA FPGA; tcDspMcbsp MCBSP(0x018C0000, DATA_DELAY1, // rx_data_delay WORD_LENGTH_16, // rx_word_len RXJUST_RJZF, // rx_justify DATA_DELAY1, // tx_data_delay WORD_LENGTH_16, // tx_word_len FSYNC_MODE_EXT, // rx_fsync FSYNC_MODE_INT, // tx_fsync CLK_MODE_INT, // rx_clock CLK_MODE_INT, // tx_clock FSYNC_POL_HIGH, // rx_fsync_polarity FSYNC_POL_LOW, // tx_fsync_polarity CLKR_POL_FALLING, // rx_clock_polarity CLKX_POL_FALLING, // tx_clock_polarity CSTOP_NODELAY); // clock_stop tcDspDac7616 DAC(&MCBSP,&FPGA,tcFPGA::eeDAC_CS,tcFPGA::eeDAC_LDAC); ... // Set DAC A output to mid range... DAC.update(DAC_A_ADDRESS, 2048); } }