hi, i want to interface 24 bit ADC interfacing with LPC2378 using
I2S protocol. i am using ADC CS5361.if i shall enable 32 bit word width. then
how can it read 24 bit data.because it will change WS after recieving 32 bit
data.but ADC will give 24 bit after that it expected that WS should be changed
to show 24 bit data of another channel. how can i manage this
problem?Kindly help me.i will be grateful for your help.Thanks
Add more friends to your messenger and enjoy! Go to
http://messenger.yahoo.com/invite/
24 bit ADC interfacing with LPC2378 using I2S
Started by ●February 4, 2009
Reply by ●February 4, 20092009-02-04
sukhdeep singh schrieb:
> hi, i want to interface 24 bit ADC interfacing with LPC2378 using
> I2S protocol. i am using ADC CS5361.if i shall enable 32 bit word
> width. then how can it read 24 bit data.because it will change WS
> after recieving 32 bit data.but ADC will give 24 bit after that it
> expected that WS should be changed to show 24 bit data of another
> channel. how can i manage this problem?Kindly help me.i will be
> grateful for your help.Thanks
Did you try it with 32bit ? Or are just "guessing" ?
Check out slave-mode !
--
42Bastian
Note: SPAM-only account, direct mail to bs42@...
> hi, i want to interface 24 bit ADC interfacing with LPC2378 using
> I2S protocol. i am using ADC CS5361.if i shall enable 32 bit word
> width. then how can it read 24 bit data.because it will change WS
> after recieving 32 bit data.but ADC will give 24 bit after that it
> expected that WS should be changed to show 24 bit data of another
> channel. how can i manage this problem?Kindly help me.i will be
> grateful for your help.Thanks
Did you try it with 32bit ? Or are just "guessing" ?
Check out slave-mode !
--
42Bastian
Note: SPAM-only account, direct mail to bs42@...
Reply by ●February 4, 20092009-02-04
Thanks for help. I havetried with 32 bit
word width. but data when i am reading is fluctuating. i am not able to read it
properly. i am using you the code wriiten
#include "hardware.h"__irq void tick(void);unsigned long read[2];void i2s(void);void main(){ VICIntEnClr=1<<5;
VICIntEnable=1<<5;
VICVectAddr5=(unsigned long)tick;
VICVectCntl5=1<<5; void i2s(); while(1)
{ obj_display.HDSP_value(read[0],0,EIGHT);
obj_display.HDSP_value(read[1],8,EIGHT);
}
}
void i2s()
{ CS5361_FIODIR|=(CS5361_RST_LOW|CS5361_M_S|CS5361_MDIV|CS5361_HPF_LOW|CS5361_I2S_LJ|CS5361_M0|CS5361_M1);
CS5361_FIOSET=(CS5361_RST_LOW|CS5361_HPF_LOW|CS5361_I2S_LJ|CS5361_OVFL_LOW);
PCLKSEL0|=1<<2;
PINSEL3|=3<<24;
T0MR0=19;
T0MCR=0X2;
T0EMR=0X1|3<<4;
T0TCR=2;
T0TCR=1;
I2S_PINSEL|=((1< CS5361_FIOSET=CS5361_HPF_LOW|CS5361_I2S_LJ|CS5361_M_S|CS5361_OVFL_LOW;
CS5361_FIOCLR=CS5361_RST_LOW|CS5361_MDIV|CS5361_M_S|CS5361_M0|CS5361_M1;
obj_delay_routine.delay_ms(10);
CS5361_FIOSET=CS5361_RST_LOW;
I2S_DAI=(3< obj_delay_routine.delay_ms(10);
I2S_DAI=(3< I2S_DMA1=1< //I2S_TXRATE=159;
I2S_RXRATE=159;
}__irq void tick(void)
{ static char u;
if((I2S_STATE & (1<<1)))
{ if(u++==3)
{ read[0]=I2S_RX_FIFO;
read[1]=I2S_RX_FIFO;
u=0;
read[0]>>=8;
read[1]>>=8;
}
}
VICVectAddr=0;
T1IR|=1;
}
kindly help me how can i stop fluctuation.waiting for reply.Thanks
Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
#include "hardware.h"__irq void tick(void);unsigned long read[2];void i2s(void);void main(){ VICIntEnClr=1<<5;
VICIntEnable=1<<5;
VICVectAddr5=(unsigned long)tick;
VICVectCntl5=1<<5; void i2s(); while(1)
{ obj_display.HDSP_value(read[0],0,EIGHT);
obj_display.HDSP_value(read[1],8,EIGHT);
}
}
void i2s()
{ CS5361_FIODIR|=(CS5361_RST_LOW|CS5361_M_S|CS5361_MDIV|CS5361_HPF_LOW|CS5361_I2S_LJ|CS5361_M0|CS5361_M1);
CS5361_FIOSET=(CS5361_RST_LOW|CS5361_HPF_LOW|CS5361_I2S_LJ|CS5361_OVFL_LOW);
PCLKSEL0|=1<<2;
PINSEL3|=3<<24;
T0MR0=19;
T0MCR=0X2;
T0EMR=0X1|3<<4;
T0TCR=2;
T0TCR=1;
I2S_PINSEL|=((1< CS5361_FIOSET=CS5361_HPF_LOW|CS5361_I2S_LJ|CS5361_M_S|CS5361_OVFL_LOW;
CS5361_FIOCLR=CS5361_RST_LOW|CS5361_MDIV|CS5361_M_S|CS5361_M0|CS5361_M1;
obj_delay_routine.delay_ms(10);
CS5361_FIOSET=CS5361_RST_LOW;
I2S_DAI=(3< obj_delay_routine.delay_ms(10);
I2S_DAI=(3< I2S_DMA1=1< //I2S_TXRATE=159;
I2S_RXRATE=159;
}__irq void tick(void)
{ static char u;
if((I2S_STATE & (1<<1)))
{ if(u++==3)
{ read[0]=I2S_RX_FIFO;
read[1]=I2S_RX_FIFO;
u=0;
read[0]>>=8;
read[1]>>=8;
}
}
VICVectAddr=0;
T1IR|=1;
}
kindly help me how can i stop fluctuation.waiting for reply.Thanks
Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/