How do I send in data using SPI/SCI?

Status
Not open for further replies.

fouadalnoor

Member
Hi guys,

I am currently trying to create a very simple MP3 player using the VS1011 MP3 Decoder and the PIC16LF877 Microcontroller as well as an SD card adaptor.

I am a little confused about how the PIC will communicate with the decoder. I know that both IC's will use the SPI Protocol to send and recieve data, but when I look at the decoder data sheet it talks about "SCI" and "SPI".

I know SCI is used to control the the decoder (setting the "mode" registers, volume etc) while SPI is used to actually send the music data. How do I switch between the two modes?

Decoder datasheet: https://www.vlsi.fi/en/products/vs1011.html
PIC Data Sheet: https://www.datasheetarchive.com/PIC16LF877-datasheet.html

Thanks,

Fouad.
 
Last edited:
From the VS1011 datashet: https://www.electro-tech-online.com/custompdfs/2012/08/vs1011.pdf

page 16:

The SPI Bus - that was originally used in some Motorola devices - has been used for both
VS1011e’s Serial Data Interface SDI (Chapters 7.3 and 8.4) and Serial Control Interface SCI
(Chapters 7.5 and 8.5).

So: You have two SPI buses in the VS1011, one for data (Called SDI in the datashet), another for control (called SCI).

You need two SPI buses in the microcontroller. If you only have 1 implemented in "hardware", you can always bitbang another one, with some software and using more digital pins.
 

Thanks for your reply!

Hmm...from reading that statement it seems to me that they are actually stating that both SCI and SPI use the same pins...

If you look at page 15 you can see the connection diagram on figure 5. Here the microcontroller is connected to:

SO
SI
SCLK
xCS

But maybe I am interpreting that wrong, having two separate buses make more sense to me...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…