i want to interface CS5361 with avr microcontroller using I2S
protocol. i have generated MCLK 714 Khz using timer. i have written
the following code for adc data reading.
unsigned long adc_read(unsigned char channel)
{ unsigned long data=0;
if(channel==LEFT)
ADC_DATA_PORT&=~(1<
else
ADC_DATA_PORT|=(1<
ADC_DATA_PORT&=~(1<
delay(500);
ADC_DATA_PORT|=(1<
for(channel=0;channel<24;channel++)
{ delay(500);
if((ADC_DATA_READ&(1<
data|=1;
data<<=1;
ADC_DATA_PORT&=~(1<
delay(500);
ADC_DATA_PORT|=(1<
}
return data;
}
but microcontroller is not reading any data from adc. can anybody
tell me where is the problem. how can i resolve it.
thanks.
------------------------------------

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )