|
|||||||
| Home | Forums | Rules | Articles | Store | Gallery | Blogs | Register | Donations | FAQ | Calendar | Search | Today's Posts | Mark Forums Read | Search |
| Digital Line Level DACs, Digital Crossovers, Equalizers, 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: Feb 2012
Location: HK
|
Hello,
This is my first thread and I have a problem with demultiplexing the digital PCM audio data stream. Recently I designed a discrete R-2R DAC using information from the I2S spec sheet and wiki, but when i first tested it, the output wave is split in 2: upper part and lower part. I later found out that the PCM stream is coded as a signed integer using the 2's compliment method but the shift-register can only decode a unsigned integer. My question is if theres anyway I could change the signed PCM stream into unsigned? OR Is there another way of decoding this PCM Stream? Thanks, Boris |
|
|
|
#2 |
|
diyAudio Member
Join Date: Mar 2004
Location: Budapest, Hungary
|
You need to invert the MSB.
|
|
|
|
#3 |
|
diyAudio Member
Join Date: Feb 2012
Location: HK
|
Thanks for your Advice
But i have tried that and it seems that the mid-point is out of place is there a way to fix it? Another question: the output wave seems to have some of its voltage levels shifted vertically, is this caused by the resistor errors in the R-2R ladder? I will try to get a photo from my oscilloscope ASAP. Thanks, Boris |
|
|
|
#4 |
|
diyAudio Member
Join Date: Jan 2008
Location: Virginia
|
Invert (and add one) will give the "inverse" voltage:
http://en.wikipedia.org/wiki/Two's_c...27s_complement Last edited by SoNic_real_one; 8th February 2012 at 04:59 PM. |
|
|
|
#5 |
|
diyAudio Member
Join Date: Feb 2012
Location: HK
|
but how exactly do I "Add 1" to a digital stream...
|
|
|
|
#6 |
|
diyAudio Member
Join Date: May 2007
|
With an adder? You can get a chip which will do this, and deal with carry in and out. Known as a 'full adder'.
|
|
|
|
#7 |
|
diyAudio Member
Join Date: Feb 2012
Location: HK
|
The main problem is that the data is in serial format
|
|
|
|
#8 | |
|
diyAudio Member
Join Date: Mar 2004
Location: Budapest, Hungary
|
Quote:
|
|
|
|
|
#9 | |
|
diyAudio Member
Join Date: Feb 2012
Location: HK
|
Quote:
|
|
|
|
|
#10 |
|
diyAudio Member
Join Date: Mar 2004
Location: Budapest, Hungary
|
That is called glitch, caused by imperfect switches. Do you have a sample-and-hold circuit after the DAC? That should hold the previous analog level during the glitch. I have built a similar R-2R discrete DAC, but I could reach 10-bit resolution with stock 0,1% resistors. The remaining 6 bits had to be trimmed.
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Power R-2R ladder DAC? | cuallito | Class D | 2 | 3rd May 2011 02:33 PM |
| DIY discrete dac chip. | Lgrau | Digital Line Level | 114 | 13th March 2010 04:18 PM |
| A good way to reduce R-2R DAC linear error | AD1865 | Digital Source | 103 | 27th May 2005 02:55 PM |
| CS8415A serial data output | jimbo69 | Digital Source | 0 | 25th February 2003 03:34 PM |
| use serial data | A'af | Digital Source | 2 | 16th January 2002 07:50 PM |
| New To Site? | Need Help? |
| Page generated in 0.10582 seconds (77.00% PHP - 23.00% MySQL) with 10 queries |