Interfacing both ADC and DAC to startKit to act as a digital processing unit
Posted: Wed Apr 11, 2018 1:13 am
Hi folks,
I have been working on a project that involves the following signal flow: PCM4202 (ADC) --------> startKit (MCU) ---------> PCM1794 (DAC)
My goal is to input a signal through the ADC then for the ADC to sample the data and output it to the control via the I2S protocol, then the controller will read it in, process it, and then output it to the DAC.
I have been trying to use the XMOS I2S library and it seems that I am either not using it right or I have a misunderstanding of what it was meant to be used for since I have a weird timing issue. Could there be a problem in the fact that both the ADC and DAC are using a 24-bit bit depth while the library (and subsequently the MCU) expects a 32-bit value as well as outputting it?
I want to rule out that I am using the library wrong before I start modifying library code so any help would be appreciated. I will try to update this thread once I go back to the lab and capture the timing behavior I have mentioned.
I have attached the code that I am using.
Some notes:
-The ADC is the master, the MCU and DAC are slaves
-The MCU is intended to act as a pass through for now, simply taking in the data and then outputting the same data
-This code was sort of frankensteined together by looking up other I2S examples and trying to get something simple to work and then build on
I am fairly new to programming on XMOS, but I am familiar with a good amount of programming so any help is appreciated. Thank you again
I have been working on a project that involves the following signal flow: PCM4202 (ADC) --------> startKit (MCU) ---------> PCM1794 (DAC)
My goal is to input a signal through the ADC then for the ADC to sample the data and output it to the control via the I2S protocol, then the controller will read it in, process it, and then output it to the DAC.
I have been trying to use the XMOS I2S library and it seems that I am either not using it right or I have a misunderstanding of what it was meant to be used for since I have a weird timing issue. Could there be a problem in the fact that both the ADC and DAC are using a 24-bit bit depth while the library (and subsequently the MCU) expects a 32-bit value as well as outputting it?
I want to rule out that I am using the library wrong before I start modifying library code so any help would be appreciated. I will try to update this thread once I go back to the lab and capture the timing behavior I have mentioned.
I have attached the code that I am using.
Some notes:
-The ADC is the master, the MCU and DAC are slaves
-The MCU is intended to act as a pass through for now, simply taking in the data and then outputting the same data
-This code was sort of frankensteined together by looking up other I2S examples and trying to get something simple to work and then build on
I am fairly new to programming on XMOS, but I am familiar with a good amount of programming so any help is appreciated. Thank you again