|
|||||||
| Home | Forums | Rules | Articles | Store | Gallery | Blogs | Register | Donations | FAQ | Calendar | Search | Today's Posts | Mark Forums Read | Search |
| Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc. |
|
Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving |
|
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
diyAudio Member
Join Date: Dec 2004
Location: Home :D
|
I'm trying to make some kind of a soundcard for my ATMEGA8 AVR microcontroller. For that I got a TDA1543 and a NE5532, wired them as in the datasheet schematic (tda's Vref to the noninverting input of the 5532, AOL to inverting input, feedback resistor) and expected to work. Well, it doesn't.
I tried sending the whole range (-32000 to 32000) to both left and right channels. I get something strange. Between -32000 and -14000 (aprox. values) the voltage lowers from 1.69V to 1.48V, then goes up to 2 V, then lowers to 1.48 (at 18000), goes back to 2 then to 1.69 (at 32000). From this I guess I haven't understood the i2s protocol right I'd like to see some code implementation (C, pseudocode, I don't care) because I don't understand a thing from those electrical diagrams. I mean in the datasheet they say that the MSB must be sent first, but in the datasheet after switching the WS line, it first sends the LSB of the previous value, then the MSB of the current value. The LSB of the current value will be sent after switching the WS again. It's wierd, I'm sure I'm missing something. Please, help! P.S. I'm using single-supply for the 5532 (+5V and 0V). Do you thing it has anything to do with this?
__________________
Have FUN, FeeL E! |
|
|
|
|
#2 |
|
diyAudio Member
Join Date: Oct 2001
Location: .
|
1. Is the data in the two's complement ?
2. What is the value of Vref at the + inputs ? it should be around 2.5v The image below shows an I2S diagram with serial clock running at 64Fs ie 32 bits per frame. Note the position of the lsb of the left channel frame. |
|
|
|
|
#3 |
|
diyAudio Member
Join Date: Dec 2004
Location: Home :D
|
1. Yes, the data is in two's complement.
2. The value of Vref is 2.15 V, measured in this schematic. I don't know... Maybe it's because the first thing I'm sending after switching the WS is the MSB of the current value, instead of the LSB of the previous one. The data is retained on the LO->HI transition of the BCK, right? BTW: Merry Christmas!
__________________
Have FUN, FeeL E! |
|
|
|
|
#4 | |
|
diyAudio Member
Join Date: Oct 2001
Location: .
|
Quote:
What get transmitted after the transition of WS depends on the size of the frame. If the frame is only 16bits per channel then all 16 audio data bits occupy the entire frame. WS is the same size as the frame i.e low for 16 bits or 16 SCK transitions and high for the same time. The MSB of the audio word is aligned with the second transition of SCK that occurs after a transition of WS, for the left channel that would be a falling edge. For a 16 bit per channel frame size, that would align the LSB of the left channel word with first transition of SCK that occurs after a transition of WS, in this case a rising edge.The MSB of the right channel word follows immediately afterwards aligning it with second transition SCK that occurs after the rising edge of WS. In other words, it looks like this. |
|
|
|
|
|
#5 |
|
diyAudio Member
Join Date: Dec 2004
Location: Home :D
|
Ok, I'll modify the algorithm to use only the first 15 bits, so that the LSB will always be 0. This way I solve some problems. I only hope it works...
__________________
Have FUN, FeeL E! |
|
|
|
|
#6 | |
|
diyAudio Member
Join Date: Oct 2001
Location: .
|
Quote:
Clear WS Clear Sck Send 16th R bit i.e. LSB, to port. End of L/R word 1 Set Sck Clear Sck Send 1st L bit i.e. MSB, to port. Start of L/R word 2 Set Sck . . . . Clear Sck Send 15th L bit Set Sck Set WS Clear Sck Send 16th L bit. Left channel LSB Set Sck Clear Sck Send 1st R bit. Right channel MSB Set Sck . . . . Clear Sck Send 15th R bit Set Sck Clear WS Clear Sck Send 16th R bit. Right channel LSB. End of L/R word 2 Set Sck Clear Sck Send 1st L bit. Start of L/R word 3 Set Sck . . |
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wtb: Tda1543 | leadbelly | Swap Meet | 0 | 19th October 2006 06:42 AM |
| USB-I2S-TDA1543 kit | jkeny | Digital Source | 0 | 4th April 2006 11:56 AM |
| TDA1543 dac | dariusku | Digital Source | 3 | 31st March 2006 07:38 PM |
| Where to buy TDA1543 D/A | stan_33 | Digital Source | 32 | 7th May 2004 08:54 AM |
| TDA1543 Non OS DAC | jean-paul | Digital Source | 83 | 22nd January 2004 11:27 PM |
| New To Site? | Need Help? |
| Page generated in 0.10481 seconds (81.82% PHP - 18.18% MySQL) with 11 queries |