I am just starting my research this chip (YX5200).. but figured Id' post to see if anyone else has some input or has been down this road before..
I have been using the DFPlayer modules for many projects as of late... and it has always frustrated me that you can NOT access the SD card to read a .txt file or anything (like for setting parameters..etc) from it..
The YX5200 chip (as I understand it) is a way to control audio playback via serial commands.. (which I like, and is fairly easy and only takes a software serial line to get going)...
I was thinking about a new PCB that has the core 'Arduino' compatible circuit.. and the DFPlayer guts all on one board to make things a bit easier...
If I -ALSO- connected the SPI pins to the SD card.... can I initially do a READ of said TEXT file.. -and-0 continue to use the DFPlayer as it normally works?
I'm not clear on what pins/pads the DFPlayer needs for communication to the SD card to get audio data/playback..
but I would imagine that I would be 'double dipping' on the same pins of the SD card socket... that the DFPlayer also connects to..
Both the YX5200 chip and the amp it uses are fairly cheap..(used in the open source light saber project thats been floating around here for a while too I believe)
Master Out, Slave In (MOSI) - which is the data going from the master to the slave
Master In, Slave Out (MISO) - which is the data going from the slave to the master
Serial Clock (SCK) - when this toggles both the master and the slave sample the next bit
Slave Select (SS) - this tells a particular slave to go "active"
On the Arduino.... (pin#'s 13, 12, 12 and usually 10 for SS pin)..... connected to the SD card socket... (directly.. or with level shift/voltage divider..or even just direct if I make the compatible circuit a +3.3v version)..
Issues with ALSO connecting a YX5200 chip to same SD card....?? (however that is done/same way as DFPlayer... I havent checked out the schematic for it yet...more or less taking schematic, dumping it into eagle.. add my 'Arduino' compatible circuit/IO breakouts...etc..etc and also have the SPI lines connected to same SD socket)
I what they are. The qestion was what do that have to do with the product you linked and where are those
signals on that product. I can find nothing to indicate that product has those signals so can you post a photo that proves it does ?
I'm asking about setting up the YX5200 chip (ie: the whole DFPlayer circuit for arguments sake).. which connects to and use an SD card to play .wav and .mp3 files..
if I connected an Arduino (SPI pins) to that SAME SD CARD SOCKET..
(ie: 'double dipping' as mentioned above)
Do you think I can 'also' access that SD card using the normal libraries... (to read/parse a text file)...
and still have the DFPlayer/YX5200 work as intended?
Will have both devices connected to the SAME SD card/socket be an issue?
** In my original post, I mention I planned on making a custom PCB.. so its not technically 'two devices'..
update:
ok.. I took a quick peek at that open source project floating around here for some time.. and how they wired up the bare YX5200 chip... and it does look like are 'SPI' compatible pins on it as well?
I'm sorry, they didn't teach that term ("double-dipping") in my DeVry Electronics Engireering course. Didn't Anyone ever tell you you can't tie putputs to outputs ?
FYI, integated circuits are a little more complicated than potato chips.
I can't find a datasheet for the XY5200. It looks like chip talks to the CD card in SD Mode. Arduino libraries (SDfat) use SPI mode. You'd have to work out some buffering scheme to let the XY5200 or the uC control the card, while controlling reset and such:
There are two bus protocols defined for SD Cards. The default mode is native SD mode but the card can be configured to use a slower SPI mode. Protocol selection is done during the first reset command after power up. The SD Card powers up in SD mode. To switch the card to SPI mode, the CS signal must be asserted while the host issues a reset command to the card. Once a particular protocol is configured, it cannot be changed while power is applied. The only way to switch between protocol modes is to do a power cycle.
Thanks for that! So yeah a bunch of messing about with power cycling applying the CS signal.. (blah)..
Might be better to just seek out a different chip/option... I was just familiar with the library and ease of use.. (liked that it was serial controlled, and that it did all the work itself instead of making the ATmega328 do anything. (like the Adafruit WaveShield type of approach)