Content originally posted in LPCWare by pasta on Sat Jun 11 11:00:54 MST 2011
hi all:
i used lpc1768 to connect uda1380 by i2s and i2c,i2c works fine,but i2s works not good, sounds is noise not music(play mp3 file bitrate 96K,128K,192K,320K).please help me. thank you all.
HW setting:
lpc1768 uda1380
TX_MCLK SYSCLK
I2STX_CLK BCKI
I2STX_WS WSI
I2STX_SDA DATAI
SW setting:
lpc1768:
MCLK = PCLK *(x/y) /2 = 36MHz *(143/228) / 2 = 11289421(256*44100)
BCLK = MCLK / 8 = 1411177 (2*16*44100)
ws_halfperiod = 16 bits(0-15)
uda1380:
reg00H: enable Decimator clock, enable FSDAC clock,
enable interpolator clock,DAC clock select SYSCLK
Dividers for system clock input:256fs
reg02H: disable WSPLL, enable headphone driver, enable DAC,
enable BIAS
reg13H: disable master mute, disable channel 2 mute,
disable channel 1 mute
others register are default value.
1.MCLK,BCLK and ws_halfperiod setting are correct?
2.uda1380 setting are correct?
3.my mp3 file is head file,ex: const char MP3[] = {0xff,0xfb,0x92,0x04,....};
file size is 60KB,is it can played?
4.Anything else should pay attention to it?
my english is bed :(,sorry,please help , thank you all:)