This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DAC 7568

Other Parts Discussed in Thread: DAC7568, DAC7568EVM

I want to communicate C2000 MCU with my DAC7568 using SPI interface Please help me with the procedure. Also on the circuit board There are 2 ports A and B for J2 and J3  so which port signifies which feature?

  • Hello Pranav,

    Each J1, J2, and J3 on the DAC7568EVM have an "A" and "B" designated connector. One refers to the connector on the top of the PCB and the other refers to the connector on the bottom of the PCB. The schematic shows the pinout for the "A" connectors that are on the top of the PCB.

    The DAC7568 has a relatively straight forward serial interface that can either support operation in what is commonly referred to as "Frame Sync" mode or in "Chip Select" mode. The input data word is 32 bits wide, so the serial input frame from your peripheral should be configured to send a 32-bit frame or smaller sequential frames to create the 32-bit word that all occur with the SYNC line held low. The interface supports clock polarity 1 or 0, data bits are clocked in on the falling edge of SCLK - as indicated by the timing requirements on page 7 of the datasheet. You'll want to review these timing requirements as you proceed into configuring your serial peripheral.

    If you have further questions concerning the DAC7568 serial interface, I would be happy to help. For maximum effectiveness with configuring your C2000 MCU though, I would suggest you post a question about configuring its serial peripheral on the C2000 forum. I'm simply not familiar enough with the peripheral to give much guidance.

  • In order to power the card I am using a 15v variable supply. So I have to supply +ve port of the supply to Vdd i.e. J3 pin3 and short negative and ground of the supply and connect it to pin j3 5 ie ground. Is it correct?

    Also in the EVM manual analog interface and digital interface are explained, but both have same addresses.  ie in the analog interface J2.1-j2.19 are gnd, but the same pins are given specific operations in digital interface. Can you explain this?

  • Pranav,

    The table has some typos it would seem. The analog header designator is J2A (left side of PCB). The digital header is J1A (right side of PCB). The schematic is correct.

    You can apply power at J3 if you'd like. Alternatively there is a test point provided that you can attach your lead to at TP1 with JP4 in the 2-3 position.

  • Hi,


    How can I Define the baud rate of the DAC card?.
     And what other things I would need to define other than this?

    Regards,

    Pranav Parikh

  • Pranav,

    The digital input data-rate is defined in the timing characteristics table. Using these minimum timing requirements you can calculate the maximum throughput for the digital inputs. You could update the device at this rate if you would like, but the output may not be fully settled for determining the maximum output data rate.

    For fully settled data on the output, the output data rate is governed by the output voltage settling time specification.

    Hope this helps.

  • ...also, here is a blog that may help you

    http://e2e.ti.com/blogs_/b/analogwire/archive/2013/08/26/dac-essentials-understanding-your-dac-39-s-speed-limit.aspx

  • I am very well used to with programmable logic controllers, but I am using a MCU after 5 years. In PLC we can select baud rates for communication in both master and slave device. Does the C28xx MCU and DAC 7568 work on fixed baud rate or is it possible for the user to change the baud rate?.

  • Pranav,

    I've deleted the duplicate of this post on the blog. We will continue here...

    The communication speed between the MCU and the DAC does not have to be fixed. The only requirement is that you do not exceed the minimum requirements in the timing diagram of the datasheet. So long as you are within those bounds, you may do as you wish.

  • I have modified the original program to following is it sufficient for the communication between the DAC and C28xx MCU?

    #include "DSP28x_project.h"
    #include "dsp2834x_cputimers.h"
    #include "dsp2834x_gpio.h"
    #include "DSP2834x_spi.h"



    void delay_loop(void);
    void spi_xmit(Uint16 a);
    void spi_fifo_init(void);
    void spi_init(void);
    void error(void);

    void main(void)
    {
        int16 sdata1,sdata2;  // send data
        int16 rdata;// received data

        InitSysCtrl();
        InitSpiaGpio();
        DINT;
         InitPieCtrl();
         IER = 0x0000;
            IFR = 0x0000;
            InitPieVectTable();
            EALLOW;
            spi_fifo_init();      // Initialize the Spi FIFO
               spi_init();          // init SPI
               sdata1 = 0x8017;
               sdata2 = 0xF001;
               SpiaRegs.SPIBRR=50;
                  for(;;)
                  {
                    // Transmit data
                    SpiaRegs.SPICTL.bit.TALK=1;
                    spi_xmit(sdata1);
                    delay_loop();
                    
                    while(SpiaRegs.SPIFFRX.bit.RXFFST !=1) { }
                                    // Check against sent data
                                    rdata = SpiaRegs.SPIRXBUF;
                                if(rdata != sdata1) error();
                                    sdata1++;
                                    spi_xmit(sdata2);
                                    
                                    // Wait until data is received
                                while(SpiaRegs.SPIFFRX.bit.RXFFST !=1) { }
                                    // Check against sent data
                                    rdata = SpiaRegs.SPIRXBUF;

                                if(rdata != sdata2) error();
                                    sdata2++;
                  }



    }


    void delay_loop()
    {
        long      i;
        for (i = 0; i < 1000000; i++) {}
    }


    void error(void)
    {
        asm("     ESTOP0");                        // Test failed!! Stop!
        for (;;);
    }

    void spi_init()
    {
        SpiaRegs.SPICCR.all =0x000F;                 // Reset on, rising edge, 16-bit char bits
        SpiaRegs.SPICTL.all =0x0006;                 // Enable master mode, normal phase,
                                                     // enable talk, and SPI int disabled.
        SpiaRegs.SPIBRR =0x007F;
        SpiaRegs.SPICCR.all =0x009F;                 // Relinquish SPI from Reset
        SpiaRegs.SPIPRI.bit.FREE = 1;                // Set so breakpoints don't disturb xmission
    }

    void spi_xmit(Uint16 a)
    {
        SpiaRegs.SPITXBUF=a;
    }

    void spi_fifo_init()
    {
    // Initialize SPI FIFO registers
        SpiaRegs.SPIFFTX.all=0xE040;
        SpiaRegs.SPIFFRX.all=0x204f;
        SpiaRegs.SPIFFCT.all=0x0;
    }




    //===========================================================================
    // No more.
    //===========================================================================

  • For a code review, post to the C28xx forum. I am not familiar with their peripherals to view your code.

    If you probe the bus with an oscilloscope and post your captures I'd be happy to look at it.