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

Technical discussions around xCORE processors (e.g. xcore-200 & xcore.ai).
Schatz143
Member++
Posts: 31
Joined: Mon Jan 20, 2020 9:54 am

Post 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 ?


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post 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
(271.24 KiB) Downloaded 170 times
XMOS-SPI-Component-Documentation_X3171A.pdf
(271.24 KiB) Downloaded 170 times
Schatz143
Member++
Posts: 31
Joined: Mon Jan 20, 2020 9:54 am

Post by Schatz143 »

Here is the ADC.Would like to interface this one .
http://www.ti.com/product/ADS7886
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post 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.
Schatz143
Member++
Posts: 31
Joined: Mon Jan 20, 2020 9:54 am

Post by Schatz143 »

I am confused how to use serial data input( Mosi )for this ADC. Am i missing something here?
Attachments
adc.png
adc.png (9.05 KiB) Viewed 5840 times
adc.png
adc.png (9.05 KiB) Viewed 5840 times
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post 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
Schatz143
Member++
Posts: 31
Joined: Mon Jan 20, 2020 9:54 am

Post 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 .
Post Reply