STM32 SID SD Card Player - with STM32F103C8 (blue Pill)
ฝัง
- เผยแพร่เมื่อ 19 พ.ย. 2024
- SID chip and 6502 CPU emulation and audio generation using (but not limited to) Blue Pill (STM32F103C8).
Compiled with Arduino IDE and uploaded (in my case) with ST-link (because i broke micro-USB on only Blue Pill i have that can be overclocked).
Source code:
github.com/Bak...
Project continues. Now, sid files are loaded from sd card's and played at alphabetical order. Next tune is played either after some time, or with button pressed.
Audio output is from pin PA8.
SID emulation is not perfect (filters are linear in all frequencies), and 6502 emulation is little slower then original 1MHz clock.
But it's enough to play VIC II interrupt based sid music files.
Limited internal RAM of Blue pill limits the maximum size of files that can be played, and only PSID V2 sids are playable.
Code itself is compatible with Roger's (Maple) core (only STM32F103xx),
Hello! I'm just trying to write and read something from a microSD module with a Blue Pill and I couldn't find an example code. Do you have something like that, please? I made the connections to PA7, PA6, PA5 and any pin for CS, like you said. Thank you in advance!
If you want to use built in Arduino SD library, go to File>Examples>SD from Arduino IDE menu. Tutorial how to use is at www.arduino.cc/en/Reference/SD .
In this project, i used SdFat library from github.com/greiman/SdFat (try example from github.com/greiman/SdFat/blob/master/examples/OpenNext/OpenNext.ino ).
It should work on both ( stm32duino or Roger's ) cores.
Your pinout is good, but i think with built-in SD library you need to manually set CS pin LOW before accessing sd card.
hello i am intersted in using SD shield for my project, my old version of the project was by arduino i only had to define SPI.h and SD.h wish didn't work using the STM32. i think cause there are 2 SPI ports how can i define the one i am using ..
Default pins for SPI1 on bluepill is MOSI: PA7, MISO: PA6, CLK: PA5. CS can be any pin.
@@bakisha thanks alot my friend but is there anything i have to add to my code includes ? I mean Except spi.h and sd.h ?
@@essouaiedameur7642 you'll need to include SD.h. just look at examples for stm32 cores.
can it play mp3 files?
No
@@bakisha can you suggest me any tutorial. I want to build an mp3 player using stm32