Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:37 23 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Help needed with Pico2 and VS1053 sound module

Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 11:42am 25 Sep 2024
Copy link to clipboard 
Print this post

I think I may have found a bug with how the Pico2 firmware communicates with a VS1053 (primarily around initialisation).

The setup comprises of a standard Raspberry PI Pico 2 and the 'Arduino footprint version' of a VS1053 module (and it does have the VS1053 chip onboard). Note too that I have added the 'line-out' mod so I can drive powered speakers.

Pico2 Firmware is the non-VGA/HDMI/USB variant v6.00.00b8.

The following OPTIONs have been set:

OPTION CPUSPEED 378000
OPTION AUDIO VS1053 GP10, GP11, GP12, GP3, GP4, GP5, GP6

After various experimaental commands typed at the command prompt, everything appears to work as expected. My main tests were around using PLAY TONE left_parameter,right_parameter,duration (and sure enough all was good).

But here is the issue. IF I reset the Pico2 (either by power-cycling, WATCHDOG, or reset pin), the Pico resets as expected, but I just hear white-noise primarily in the left speaker. If I then type a PLAY TONE command I briefly hear some white noise in right speaker, then silence, then after about 1 second I hear the PLAY TONE that I typed (in other words there is a delay of about 1 second before I hear the correct sound).
All subsequent PLAY TONE commands act right away as expected UNTIL I reset the Pico2 (in which case I continue to hear noise in the left speaker until I send the first sound command).

In addition, if I use the EDITor then upon pressing ENTER (after typing EDIT) I get a burst of white noise. On exiting the editor, then on sending the 'next' sound command I will have the delay before the sound is outputted (sometimes white noise during the delay, sometimes not - but there is the delay)

So it appears that the VS1053 is not being initialised on startup, and on exiting the editor.

Also, if I switch to MIDI mode, then back out of MIDI, the 'dela/noise' issue always appears at the time of the first PLAY TONE command.

I hope this all makes sense and was wondering if this is what other people are seeing ?

I can confirm I have tried one other VS1053 module (same footprint, same supplier) and that does exactly the same
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4222
Posted: 01:36pm 25 Sep 2024
Copy link to clipboard 
Print this post

Hi White Wizzard,

I do not have the same setup as you have, but is the behaviour different when you use a lower CPU clock ?
The noise you hear could be from ripple on the power supply (in case you use PWM output from the pico itself, starting the editor makes noise.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9100
Posted: 03:51pm 25 Sep 2024
Copy link to clipboard 
Print this post

The vs1053 has different firmware loaded depending on use. This is done the first time it is used. What you are seeing is correct. The delay is the time taken to load the firmware. A work round would be to issue a dummy play tone in mm.startup
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 04:19pm 25 Sep 2024
Copy link to clipboard 
Print this post

I was going to do a dummy PLAY TONE 0,0,1 in mm.startup but guess that won’t address the delay on using the EDITor (or will it? Not icurrently n front of PICO  to try)
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024