[VS1053] Simultaneous ADC recording and DAC playback

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
admin86
User
Posts: 3
Joined: Fri 2024-09-06 22:51

[VS1053] Simultaneous ADC recording and DAC playback

Post by admin86 »

Is it possible to simultaneously record two channel PCM data from line-in and play (different) signal on line output, using VS1053 chip.
A little bit more of context: I am using VS1053 in one of my designs - a media player capable of playing audio stream from internet. In next hardware revision I'd like to add possibility to receive also typical analog radio stations using SDR technology. I am going to use Tayloe circuit to produce low-frequency IQ signals that need to be digitized with some two-channel ADC. I was going to use line-in of VS1053, as it is already there. Sample rate of 48000 Hz should be well enough for AM/SSB/CW transmissions. Sampled IQ signals need to be demodulated in software to produce final PCM voice data, that could be played by DAC. But would it be possible to perform that both operations simultaneously: recording IQ signals with ADC and playing demodulated audio with DAC?
User avatar
pasi
VLSI Staff
Posts: 2159
Joined: Thu 2010-07-15 16:04

Re: [VS1053] Simultaneous ADC recording and DAC playback

Post by pasi »

By "record" you don't actually mean you want to store the captured line inputs, just decode it and play back from the DAC, right?

I.e. receive 2-channel audio data, perform IQ demodulation, feed the resulting signal to the DAC?

If you're a relatively proficient programmer, you could create your own plugin/app to implement the function. VSIDE has a StereoFIR example solution for vs1053b to start development from.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
admin86
User
Posts: 3
Joined: Fri 2024-09-06 22:51

Re: [VS1053] Simultaneous ADC recording and DAC playback

Post by admin86 »

pasi wrote: Mon 2024-09-09 11:25 By "record" you don't actually mean you want to store the captured line inputs, just decode it and play back from the DAC, right?
Yes. This is exactly what I mean. Is it possible to simultaneously digitize PCM samples with VS1053 ADC and play different set of data (demodulated signal) on DAC?

If you're a relatively proficient programmer, you could create your own plugin/app to implement the function. VSIDE has a StereoFIR example solution for vs1053b to start development from.
I suspected it might be possible to write some kind of plugin to perform SDR demodulation inside VS1053 chip. However I wasn't sure if it has required computational power. For now I'd like to perform SDR operations on my MCU and use VS1053 to digitization of input IQ signal and playback of demodulated audio.
User avatar
pasi
VLSI Staff
Posts: 2159
Joined: Thu 2010-07-15 16:04

Re: [VS1053] Simultaneous ADC recording and DAC playback

Post by pasi »

Isn't the demodulation a few multiplications and other simple arithmetic?

vs1053 run at 4.5x clock should be able to manage that even when the code is written fully in C.

In my view it would be simpler to do it in vs1053 than to transfer data back and forth (which requires extra FIFOs).
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
admin86
User
Posts: 3
Joined: Fri 2024-09-06 22:51

Re: [VS1053] Simultaneous ADC recording and DAC playback

Post by admin86 »

pasi wrote: Wed 2024-09-11 12:05 In my view it would be simpler to do it in vs1053 than to transfer data back and forth (which requires extra FIFOs).
In that case maybe I will try to do it that way.
But anyway in early stage of development I'd like to try write the code for PIC32 - I am familiar with it, but I don't have any experience with writing plugins for VS10xx chips.
So can you confirm it is possibile to use ADC and DAC independently at the same time?
User avatar
pasi
VLSI Staff
Posts: 2159
Joined: Thu 2010-07-15 16:04

Re: [VS1053] Simultaneous ADC recording and DAC playback

Post by pasi »

DAC and ADC can be used at the same time. However, I'm not sure what is the easiest way to do that with an external controller, i.e. without needing to develop an application for the vs1053b.

I think you can first start the encoding mode (and set low volume for the monitoring path SCI_VOL=0xc0c0 and/or DAC_VOL), then load and run the vs1053b PCM Mixer and play back using that. Use a 24k or 48k rate.

(Higher rates are possible if you develop the application yourself. The ADC can run at 96k and the output can be fed to the sidechannel path at 96k.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
Post Reply