Banner_AURIX_Security-Solution Banner_AURIX_Safety_Products ShieldBuddy TC275 Banner_AURIX_OnzerOS


infineon4engi@twitter twitter

infineon4engineers Facebook

infineon@linkedin linkedin

infineon@youtube youtube


+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Beginner Beginner PinGNU is on a distinguished road
    Join Date
    Jun 2017
    Location
    Cambridge
    Posts
    6
    Points
    54.375

    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
    119
    Points
    2282.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.

  3. #3
    Beginner Beginner PinGNU is on a distinguished road
    Join Date
    Jun 2017
    Location
    Cambridge
    Posts
    6
    Points
    54.375

    Fixed with 8bit mode

    I changed to 8 bit mode and it worked also eventually used just chip select rather than slave select.
    Part of my problem may have been damaged devices I probably overheated them on install awaiting more to retry.
    As they were dacs perhaps the resistor ladder was damaged I was getting a strange non-linear response but eventually one of the boards worked perfectly.
    I have not tried 12bit again as 8bit would be easier to use anyway

  4. #4
    Intermediate Intermediate KDN is on a distinguished road
    Join Date
    Oct 2017
    Posts
    40
    Points
    318.75
    How SSC1_SSOC.reg = 0x00002000; work can you help me with that.

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.