Page 2 of 2

Re: A clock frequence can be adjust from 100Mhz to 400Mhz step by 20Mhz?

Posted: Mon Mar 09, 2020 1:04 pm
by Schatz143
if there is an ADC which has a feature "20-MHz Serial Interface".
Can i just configure configure_clock_rate(clk,100,5) in the master and syncronise ?

Re: A clock frequence can be adjust from 100Mhz to 400Mhz step by 20Mhz?

Posted: Mon Mar 09, 2020 1:22 pm
by mon2
I think there may be some confusion between the fixed clocks and serial communication clocks.

Can you post your exact ADC part number? Sounds like you are referencing the SPI SCLK value for the ADC?

If yes then the SPI master IP must be configured to generate this SCLK value at 20mhz.

See attached document on how to achieve this value.

XMOS-SPI-Component-Documentation_X3171A.pdf

Re: A clock frequence can be adjust from 100Mhz to 400Mhz step by 20Mhz?

Posted: Mon Mar 09, 2020 2:00 pm
by Schatz143
Here is the ADC.Would like to interface this one .
http://www.ti.com/product/ADS7886

Re: A clock frequence can be adjust from 100Mhz to 400Mhz step by 20Mhz?

Posted: Mon Mar 09, 2020 3:29 pm
by mon2
Yes, SPI interface and IP can be used to communicate with this ADC. Google for the keywords "ADS7886 SPI" to review the code deployed by others using Arduino / STM32 and other CPUs.

Re: A clock frequence can be adjust from 100Mhz to 400Mhz step by 20Mhz?

Posted: Wed Mar 11, 2020 8:14 am
by Schatz143
I am confused how to use serial data input( Mosi )for this ADC. Am i missing something here?

Re: A clock frequence can be adjust from 100Mhz to 400Mhz step by 20Mhz?

Posted: Wed Mar 11, 2020 8:37 am
by mon2
For this ADC, the MOSI pin not be used. You will use MISO (master in, slave out) and SCLK.

MISO = SDO

SCLK = SCLK

#CS = #CS

Re: A clock frequence can be adjust from 100Mhz to 400Mhz step by 20Mhz?

Posted: Wed Mar 11, 2020 9:07 am
by Schatz143
is there any example code to understand the SPI Interface functionality for this ADC.I read interfacing high speed adc but slave module is in simulation and its has all the pins MISO;MOSI;SCLK;CS:
And i searched for ADS7886 SPI on google and code for Arduino / STM32 isnt helpful .have no idea in using that code in XC.Would appreciate little help in forming a simple code .