I2S ADC/DAC channels number

Technical questions regarding the XTC tools and programming with XMOS.
ffomich
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

I2S ADC/DAC channels number

Post by ffomich »

In xSOFTip I2S Master Audio Device Driver have possible ADC/DAC channels number = 2/4/6/8.
Does this component support channels number = 0 (ADC or DAC,
not simultaneously)?


srinie
XCore Addict
Posts: 158
Joined: Thu Mar 20, 2014 8:04 am

Post by srinie »

ffomich wrote: Does this component support channels number = 0 (ADC or DAC,
not simultaneously)?
Channel 0? Do you mean just a mono channel for ADC and DAC functionality?
ffomich
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

Post by ffomich »

srinie wrote: Channel 0? Do you mean just a mono channel for ADC and DAC functionality?
No,
ADC_ch_num=0, DAC_ch_num<>0 for dev board with only DAC channels

ADC_ch_num<>0, DAC_ch_num=0 for dev board with only ADC channels

*I think for mono channel ADC/DAC_ch_num=1
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

In theory yes..Although I recall older tools versions had an issue with array of size zero, which happen if I2S_MASTER_NUM_IN or I2S_MASTER_NUM_OUT is set to zero.

However if you have output only for example, then you can't select on the channel communication at the app side.
If you have an app that selects on an output from I2S (which would be the ADC data being sent over) then having no input channel means you can't do that. It would mean you would need to change the code such that you would do the processing, then output to I2S over the channel. The output to I2S, being channel based, will block if I2S is not ready to accept. This means the rate of the app outputting to I2S will be governed by the loop speed of I2S, which is the rate of the I2S LR clock.

So the app code would need to be:

Code: Select all

Init I2S
loop:
do audio processing //make sure this always takes less than LR clock period
output to I2S
goto loop
lucylee378
Newbie
Posts: 1
Joined: Thu Feb 26, 2015 9:29 pm

Post by lucylee378 »