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 : PicoMite - adventures in sound
Page 2 of 3 | |||||
Author | Message | ||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6795 |
I've ordered one of the red boards, Peter. I'll see how well that works. :) @ goc30 Just because the SD card socket is connected to the same SPI it doesn't necessarily mean that that socket will work. :) A socket is only empty pins until you plug a card in. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 427 |
of course, except that 1 - The topic makes you think that Pete tested his program before proposing it and therefore that the connections are correct 2 - the photo shows that Pete uses a specific card, where the SD reader is connected as standard 3 - to read an MP3 file it must be recorded on an SD card (card visible and inserted in the reader), so we are entitled to think that the VScard and the SDcard use the same SPI 4 - if there is a modification to the operation or wiring, we are likely to think that these modifications will be explained in this topic, specific to the use of the VSCcard, and not in the middle of the topic corresponding to updates picomite |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6795 |
While Peter is "playing" with the board I'd assume nothing. :) If you see a RC (like this one) with "fully supported" mentioned about it together with a list of commands for it then that's when you can start to see the results of his experimenting. You probably won't see it in this thread though. Although that board that he's using the VS1053 with in the photo has a SD card it may not be on the same SPI channel. Actually, a SD card on a PicoMite doesn't need a SDI port at all as they are handled in firmware. Edited 2023-11-30 03:43 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 427 |
As I have just explained to you, but perhaps I was not clear enough, I use the same cards as PETE, but the "MAKER PI PICO" card has an SD reader automatically wired to the GP10, GP11,GP12 pins. You cannot change them. So the photo clearly indicates that the SPI port of the VScard and the SPI port of the SDcard use the same pins (SPI or non-SPI it doesn't matter). |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 427 |
I don't come every day to see the new information on this forum, so I must have missed the corrections concerning the VSCard. This is why it is more judicious to post the corrections in the corresponding topic (created by PETE himself for this) rather than to drown these corrections in 17 pages of updating a general firmware |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9307 |
This sounds like it might be a candidate for my home-made electric drum-kit idea, leaving the CODEC chip to do all the playback, and the MM just sends the commands. I'm a bit late to this thread, but this is certainly an interesting little module and CODEC chip! Smoke makes things work. When the smoke gets out, it stops! |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9120 |
I modified Tom's "Entertainer" to PLAY MIDI rather than PLAY SOUND. See here . Sorry about the sound quality, actually in real life it sounds pretty good. Code changes Option Base 0 Option Default None Option Explicit On Play midi 'enable real time midi Play midi cmd &B11000001,10 'set the instrument for channel 1 Play midi cmd &B11000010,1 'set the instrument for channel 2 Option Break 4 On Key 3, on_break ' Plays the contents of the music%() array using interrupts. Sub music.play() Dim music_ptr% = Peek(VarAddr music%()) + 8 SetTick 200, music.play_interrupt, 1 Do While music_ptr% <> 0 : Loop End Sub ' Interrupt routine playing a single half-beat (per channel) from the music%() array. Sub music.play_interrupt() Local i%, n%, halted% = 0 Static nlast%(NUM_CHANNELS%) Local f! For i% = 1 To NUM_CHANNELS% n% = Peek(bp music_ptr%) Select Case n% Case 0 ' Play Sound i%, B, O Play note off i%,nlast%(i%) nlast%(i%)=0 Print Str$(i%) ": Rest" Case 1 To 254 f!=440 * 2^((n% - 49) / 12.0) Print Str$(i%) ":" f! " hz",n%, nlast%(i%) If n%<>nlast%(i%) Then Play note off i%,nlast%(i%) Play note on i%,n%,80 EndIf nlast%(i%)=n% ' Play Sound i%, B, T, f!, 15 Case 255 Play note off 1,nlast%(i%) ' Play Sound i%, B, O Print Str$(i%) ": Halted" Inc halted% End Select ' Inc music_ptr% Next If halted% = NUM_CHANNELS% Then music_ptr% = 0 ' Halt End Sub Edited 2023-11-30 18:33 by matherp |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9307 |
I've ordered a couple of modules to play about with during the Christmas break. Smoke makes things work. When the smoke gets out, it stops! |
||||
crazycloud Newbie Joined: 20/08/2023 Location: United StatesPosts: 37 |
what is meant by NB: ? |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9307 |
Latin for Nota bene - which means note well, or in English just a kind of shorthand for "Please note" or just "Note". Smoke makes things work. When the smoke gets out, it stops! |
||||
crazycloud Newbie Joined: 20/08/2023 Location: United StatesPosts: 37 |
I'm trying to get a VS1053 running. I'm confused as to what is required; Homa posted am example where he included "option audio vs1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6. but your post says PLAY VS1053 XCSpin, XDCSpin, DREQpin, XRSTpin [, fname$ [,interrupt]] do I wire mso msi and sck to gp2,gp3,gp4 or do I wire them to option system SPI GP10,Gp11,GP12? |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 427 |
Homa posted am example where he included "option audio vs1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6. but your post says PLAY VS1053 XCSpin, XDCSpin, DREQpin, XRSTpin [, fname$ [,interrupt]] do I wire mso msi and sck to gp2,gp3,gp4 or do I wire them to option system SPI GP10,Gp11,GP12? I give you my config and use it is aviable with cytron maker pi pico (same as card use by Pete - see on top of this topic) PicoMite MMBasic Version 5.07.08RC20 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SDCARD GP15 OPTION AUDIO VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6', ON PWM CHANNEL 1 > > play mp3 "b:track0002.mp3" For VS1053, you need to use other SPI pins than system SPI (like SdCard) And forget config and example of the first Pete's post, it is wrong because it uses the same SPI as the SPI System the good connect pin's function is: OPTION AUDIO VS1053 SPICLKpin, SPIMOSIpin, SPIMISOpin, CSpin, DCSpin, DREQpin, RESETpin OPTION AUDIO VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6 Edited 2023-12-17 13:49 by goc30 |
||||
crazycloud Newbie Joined: 20/08/2023 Location: United StatesPosts: 37 |
thank you for the quick reply. I tried this WebMite MMBasic Version 5.08.00b5 OPTION WIFI NETGEAR57, **************, PICOE6616408437 OPTION TELNET CONSOLE ON OPTION AUDIO VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6', ON PWM CHANNEL 1 but it did not work. I am watching all my pins with an oscilliscope. I get digital data on all the VS1053 lines, but only noise on the audio output. I have the audio wired into the aux input of a bluetooth speaker. I don't hear anything. I uploaded a sample mp3 file of about 700K. I can tell its getting to the VS1053 because the embedded leds on my pico board show activiy. I am using a pico carrier board that doesn't have a built in SD card. I didn;t define option SPI GP10 GP11 Gp12 because of that. Is that correct? I only need to define that if I have a 2nd SPI device? my wiring to the VS1053 is SPICLK=GP2 SPIMOSI GP3 SPIMISO GP4 CS GP9 DCS=GP8 DREQ = GP7 RESET = GP6. In the past months I have gotten a camera hooked up and working with my pico. I got the speech synthesis board working too. But this is much more confusing. |
||||
crazycloud Newbie Joined: 20/08/2023 Location: United StatesPosts: 37 |
don't i need to define the SPI pins like in appendix D? I/O Pins Before an SPI interface can be used the I/O pins for the channel must be allocated using the following commands. For the first channel (referred as SPI) it is: SETPIN rx, tx, clk, SPI Valid pins are RX: GP0, GP4, GP16 or GP20 TX: GP3, GP7 or GP19 CLK: GP2, GP6 or GP18 or is this taken care of when you define option audio VS1053? I'm not defining the SPI pins 1st with the info in appendix D from the manual |
||||
crazycloud Newbie Joined: 20/08/2023 Location: United StatesPosts: 37 |
I have 2 armmite F4s working with a LCD display. I was wondering if the sound board VS1053 will ever work with Armmite F4 boards. I reall like the format of the armmite F4, and its very fast. |
||||
crazycloud Newbie Joined: 20/08/2023 Location: United StatesPosts: 37 |
I just noticed that I don't have any digital data on GP8 which is the XDCS line. I have a schematic of the VS1053 board. according to the documentation XDCS is a chip select line and an active low signal. it should go low to activate the VS1053. My pin GP8 is always high. I wonder if I have a defective pico? Does anyone else have a scope hooked up to their VS1053 board? |
||||
crazycloud Newbie Joined: 20/08/2023 Location: United StatesPosts: 37 |
here is a schematic of the VS1053 board VS1003-Schematic-Diagram.pdf |
||||
cosmic frog Senior Member Joined: 09/02/2012 Location: United KingdomPosts: 284 |
wired into the aux input of a bluetooth speaker. I don't hear anything. If you are using the VS1053 demo board (Aliexpress) you cannot connect it to powered speakers or amp as it causes a short. You can only use the board with headphones. It must be modified to use an external amp. See this site It doesn't use a common ground, it uses something called GBUF which cannot be connected to ground. There is a circuit diagram on the above site that shows a workaround for this. Dave. Edited 2023-12-18 02:45 by cosmic frog |
||||
crazycloud Newbie Joined: 20/08/2023 Location: United StatesPosts: 37 |
I have this board https://www.aliexpress.us/item/3256805201102831.html?spm=a2g0o.order_list.order_list_main.29.412f18022vuP4L&gatewayAdapt=glo2usa I also connected it to high impedance headphones. Still no sound. |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 427 |
I tried this WebMite MMBasic Version 5.08.00b5 OPTION WIFI NETGEAR57, **************, PICOE6616408437 OPTION TELNET CONSOLE ON OPTION AUDIO VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6', ON PWM CHANNEL 1 With a webmite, you must also declare the SPI System pins my configuration WebMite MMBasic Version 5.07.08RC21 SPI SYSTEM OPTION GP10,GP11,GP12 AUTORUN ON OPTION COLOURCODE OPTION ON WIFI OPTION ******, ********************, PICOE6616408434 GP15 SDCARD OPTION AUDIO OPTION VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6', ON PWM CHANNEL 1 > I tested with the code provided by Pete to listen to an internet radio It works (for a while, then it stops). With French radios it also works but for less time Option escape Option explicit Option default none ' create the request for the radio site (ClassicFM) Dim a$="ice-the.musicradio.com" Dim q$="GET " Inc q$,"/ClassicFMMP3" Inc q$," HTTP/1.1\r\n" Inc q$,"Host: " Inc q$,a$ Inc q$,"\r\nConnection: close\r\n\r\n" 'create a circular buffer for reading the internet stream and 'read and write pointers Dim buff%(4095),w%,r% ' Configure the VS1053 and tell it to play from the circular buffer Play vs1053 GP9, gp8, gp7, gp6, buff%(), r%, w% ' Open the internet radio site WEB open tcp stream a$,80 ' Send the request to start the stream using the circular buffer specified WEB TCP CLIENT STREAM q$, buff%(), r%, w% 'sit back and listen Do Pause 500 Loop |
||||
Page 2 of 3 |
Print this page |