Please help with I2S

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
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
 
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.
 
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!:eek:

Thanks,
John
 
Last edited:
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.

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.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.