Mar 15, 2019
06:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 15, 2019
06:42 AM
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/ad5689r.html?doc=AD5689R_5687R.pdf
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/ad5689r.html?doc=AD5689R_5687R.pdf
Labels
- Tags:
- audo tc1782
- IFX
3 Replies
Mar 17, 2019
04:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 17, 2019
04:58 PM
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.
Apr 04, 2019
07:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 04, 2019
07:29 AM
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
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
Jul 16, 2019
10:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 16, 2019
10:13 AM
How SSC1_SSOC.reg = 0x00002000; work can you help me with that.