infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 2 of 2

Thread: TC1782 12 bit SPI

  1. #1
    Beginner Beginner PinGNU is on a distinguished road
    Join Date
    Jun 2017
    Location
    Cambridge
    Posts
    4
    Points
    53.75

    TC1782 12 bit SPI

    Hi

    I am trying to use a 16bit dac with 24bit SPI interface AD5689R_5687R
    I am using the 1782 SSC1 interface selecting 12bit MSB mode.
    I am not using the SLSO pins just an independent chip select

    I tried in the end random numbers and get an output but can not the relationship with the register
    This might be a general SPI question as I normally use a 8bit or a 16bit register to write to SPI what happens when I use a 24bit do I do 3x 8bit or 2x 12bit

    I do need to switch back to a 16bit device afterwards
    SSC1_SSOC.reg = 0x00000000; disable 16bit spi device
    SSC1_CON.bits.BM = 0xB; // transfer data width is 12 bit
    ChipSelect(12); //select device
    IO_vResetPin( IO_P0_15 ); // P_CSEL_OE
    SSC1_vSendData(first 12bit value);
    while(SSC1_STAT.bits.BSY); // BSY is set while a transfer is in progress
    SSC1_vSendData(2nd 12bit value);
    while(SSC1_STAT.bits.BSY); // BSY is set while a transfer is in progress
    IO_vSetPin( IO_P0_15 ); // P_CSEL_OE SYNC line high
    SSC1_CON.bits.BM = 0xF; // transfer data width is 16 bit for maindac
    SSC1_SSOC.reg = 0x00002000; // load SSC1 slave select output control reenable SLS0O5


    Carl

    https://www.analog.com/en/products/a...689R_5687R.pdf

  2. #2
    Advanced Advanced cwunder is on a distinguished road
    Join Date
    Feb 2015
    Location
    USA
    Posts
    71
    Points
    1257.5
    You could use 8-bit transfer and perform three of them. If you keep the transmit buffer full it will look like one continuous transfer which means you can use the automatic chip select.

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.