Please help with I2S - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level

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
Reply
 
Thread Tools Search this Thread
Old 13th April 2010, 11:37 PM   #1
diyAudio Member
 
Join Date: Apr 2010
Default Please help with I2S

Hi everyone,
I'm building an additive synth with a dspic33f processor and midi input. The DAC I'm using is a TDA 1543.

I know the I2S encoding, but I'm confused as to what I'm actually encoding in the bytes. Say I want to generate a 700 Hz Sine wave. What would I output onto the I2S data line? Is it the current voltage level of the wave? If so what voltage level does 0xFF and 0x00 represent?(TTL?) I'm thoroughly confused as this is the first time I'm trying such a project.

Thanks!
John
  Reply With Quote
Old 14th April 2010, 04:45 AM   #2
diyAudio Member
 
Join Date: Mar 2007
The I2S spec can be obtained from NXP/Philips here.

It is MSB first (big-endian) two's complement (signed) integer format. The number of bits/sample is not defined as part of the interface, you can send as much as you want, only the MSB that the DAC can produce are looked at.

Full scale + is 0x7fff, full scale - is 0x800. This is standard 16-bit two's complement. TTL means TTL levels, or 5V logic. You may need level shifters to use this with your dsPIC if it uses a 3.3V supply.

Fairly straightforward.
__________________
http://audio.gotroot.ca/
  Reply With Quote
Old 14th April 2010, 05:31 AM   #3
diyAudio Member
 
Join Date: Apr 2010
Hi,
Thanks a lot for the reply. So 0x7fff would represent a 5V analog output and 0x8000 would be -5? These values are huge numbers, so am I to understand that they scale to 5 and -5V?

Also, the digital bits are describing the analog voltage level, and the dac says that it reads a high input(ie a 1) as 2 volts(and it says it uses TTL levels, in which case 2V to 5V is a high). This being the case, I'm unsure as to why I would need to do any shifting on my pic's output.

Sorry for being so ignorant!

Thanks,
John

Last edited by Johnny225; 14th April 2010 at 05:47 AM.
  Reply With Quote
Old 14th April 2010, 06:34 AM   #4
diyAudio Member
 
Join Date: Mar 2007
Quote:
Originally Posted by Johnny225 View Post
Hi,
Thanks a lot for the reply. So 0x7fff would represent a 5V analog output and 0x8000 would be -5? These values are huge numbers, so am I to understand that they scale to 5 and -5V?
You need to read the DAC datasheet to figure out what its output is. TDA1543 is probably a single-ended current output DAC. You will need an I/V converter, and it is probably not a differential current output. An appropriately sized resistor may work.

Quote:
Also, the digital bits are describing the analog voltage level, and the dac says that it reads a high input(ie a 1) as 2 volts(and it says it uses TTL levels, in which case 2V to 5V is a high). This being the case, I'm unsure as to why I would need to do any shifting on my pic's output.
You need to reconcile the Voh of the dsPIC against the Vih of the DAC. It is possible that the minimum output from the PIC isn't high enough to trigger the DAC at its minimum input high voltage. Or it might do. I'm not sure, check the datasheets.
__________________
http://audio.gotroot.ca/
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is I2S SamL Digital Source 11 15th April 2014 02:26 PM
Left-justified I2S to Philips I2S Converter curva Digital Line Level 23 19th February 2009 02:50 PM
Direct Wiring a DDDAC USB-->I2S to a P3A DAC I2S DIN input dkj7a Digital Source 1 26th March 2006 06:46 PM
How do i get i2s? homer09 Digital Source 7 25th May 2004 11:30 PM
Need help with I2S vit Digital Source 0 7th November 2003 05:07 PM


New To Site? Need Help?

All times are GMT. The time now is 01:12 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2