VS1053: How to enable I2S ?

Writing software that controls the system and peripherals such as displays, SD cards, Buttons, LEDs, Serial Ports etc.
User avatar
pasi
VLSI Staff
Posts: 2053
Joined: Thu 2010-07-15 16:04

Re: VS1053: How to enable I2S ?

Post by pasi »

Do you get audio from the analog outputs? Have you tried the sine test?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
mr_smit
User
Posts: 10
Joined: Fri 2020-02-28 9:30

Re: VS1053: How to enable I2S ?

Post by mr_smit »

pasi wrote: Mon 2023-01-16 12:12 Do you get audio from the analog outputs? Have you tried the sine test?
I have 2 boards. The first uses the VS1053 analog output. And everything works great. I made a second board to try I2S output. VS1053 passes all tests on it, produces the correct I2S signals (see waveforms). But the external DAC itself is silent. I2S 32Fs 16 bits comes to PCM5122 inputs. But if I apply I2S 64Fs 16 bits to it from another source, it works. So I don't understand where the trick is. Sine test outputs 32Fs 16 bit.

I think TI is lying a bit on the datasheet because they use 16 bits at 32 bits per channel. And figure 14 shows 16 bits at 64Fs, not at 32Fs. Although I may be wrong.
pcm.jpg
pcm.jpg (184.32 KiB) Viewed 1271 times
pcm2.jpg
pcm2.jpg (112.13 KiB) Viewed 1271 times
pcm3.jpg
pcm3.jpg (116.61 KiB) Viewed 1271 times
User avatar
pasi
VLSI Staff
Posts: 2053
Joined: Thu 2010-07-15 16:04

Re: VS1053: How to enable I2S ?

Post by pasi »

Are you supplying the master clock to the SCK input or using the DAC without (8.3.6.3)?

It seems the Switching Characteristics is referring to the master clock, not to bit clock.

Table 32 tells that 96kHz samplerate is supported by the PLL mode (12.288MHz), but it seems to be only available in software mode (not hardwired mode). In hardwired mode you would probably need 24.576MHz (or 18.432MHz).

1. Try configuring the I2S output to 48kHz, as that seems to be supported with 12.288MHz master clock (from vs1053's I2S_MCLK).
2. Try without clock applied to the SCK input (keep it low) for the PLL mode (8.3.6.3 PLL mode, I2S 3-wire mode)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
mr_smit
User
Posts: 10
Joined: Fri 2020-02-28 9:30

Re: VS1053: How to enable I2S ?

Post by mr_smit »

pasi wrote: Thu 2023-01-19 13:22 1. Try configuring the I2S output to 48kHz, as that seems to be supported with 12.288MHz master clock (from vs1053's I2S_MCLK).
2. Try without clock applied to the SCK input (keep it low) for the PLL mode (8.3.6.3 PLL mode, I2S 3-wire mode)
The problem was that I looked at the presence of a signal with an oscilloscope. And it was necessary to connect to the amplifier...

PCM5122 (in hardware mode) works fine!!! with VS1053 (in I2S audio data format), but only if there is a master clock from VS1053 (12.288 MHz). 4-wire mode only. I tried 48 kHz mode. I think that PCM5102 will also work because it is very similar to PCM5122.

So you can add PCM5102 and PCM5122 to the list of supported DACs (such as WM8741, CS4398 and PCM1780 series).
Post Reply