Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | AVRclub | [AVR club] About CS5361(ADC) interfacing with avr microcontroller

Atmel AVR Microcontroller discussion group.

[AVR club] About CS5361(ADC) interfacing with avr microcontroller - sukhdeepmanku - Sep 13 10:27:36 2008

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 )