![]() |
Forum Index : Microcontroller and PC projects : Picomite I2S possible?
Author | Message | ||||
atmega8![]() Guru ![]() Joined: 19/11/2013 Location: GermanyPosts: 723 |
Dear mmbasic friends. unfortunately I have no idea how to try it. Would it be possible to control an I2S device like the cheap and popular MAX98357 directly via mmbasic? For an MP3 player, or even an Internet radio? Your thoughts? THX |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10086 |
The RP2040 can't do real time 44100Hz stereo mp3 decoding and certainly wouldn't be able to decode internet radio in real time. The processor just isn't fast enough. I2S is apparently possible through using PIO but haven't tried it. The RP2040 doesn't have dedicated I2S H/W |
||||
atmega8![]() Guru ![]() Joined: 19/11/2013 Location: GermanyPosts: 723 |
Here some German guy’s who implemented I2S with PIO…. https://www.elektronik-labor.de/Raspberry/Pico13.html I2S with PIO Hard stuff for men ![]() ![]() |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4006 |
I found some other code but it uses DMA and more cores than are free with MMBasic, so not realistic. (Can't hack German, sorry.) Either way, doable, but not with MMBasic there as well, I suspect. John |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10086 |
As I said above I2S is doable - that is no issue. Decoding, in real time, even the lowest standard for internet radio on a RP2040 is almost certainly not. The code I use for MP3 conversion on the CMM2 and MMX will not run on the RP2040 and that code is about as lightweight as you can get for mp3. AAC decoding has no chance whatsoever. This is nothing to do with MMbasic. When I tried to get mp3 decoding working I allowed it to use any resource it wanted but still no good - and I have tried now three times. NB: this is proper mp3 - 44100Hz stereo. There is code out there that can handle 8KHz/16kHz mp3 but that is about as much use as a chocolate teapot Edited 2023-04-07 18:50 by matherp |
||||
atmega8![]() Guru ![]() Joined: 19/11/2013 Location: GermanyPosts: 723 |
When we have amp3 File on an SD card, and send it via I2S to a MAX 98357 Device or similar, then there is no decoding on the RP2040 necessary? Decoding will happen in this MAX98357 Chip? Am I right? |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10086 |
No. The decoding takes place before the I2S comms |
||||
LucV![]() Regular Member ![]() Joined: 19/02/2023 Location: NetherlandsPosts: 62 |
If it is only playing MP3 files on an SD card why not use the DF-Robot MP3 player card. Easy to interface, small footprint and SD-card on board. No good for internet radio but excellent as a stand alone mp3 player. Can get interfaced with the Raspberry Pi Pico. Available (here in the Netherlands) for about 4 Euro. DFRobot MP3 player Luc's tech Blog |
||||
mozzie Senior Member ![]() Joined: 15/06/2020 Location: AustraliaPosts: 109 |
G'day, might be a bit off track here... The VS1053 can do mp3 decoding if you can get the data to it quick enough and provides audio output, have not tried with a Pico but the MM+ can do SD-card to VS1053 for mp3 and almost M4a (audio) using MMbasic to shuffle the data, someone with better programming skills than me and a c-sub should have more success ![]() Not sure about internet radio with the WebMite? challenge anyone? Regards, Lyle |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |