Need help getting VS1053 into RTMIDI through SPI on Arduino

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
Sushyoshi
User
Posts: 3
Joined: Tue 2020-08-11 12:10

Need help getting VS1053 into RTMIDI through SPI on Arduino

Post by Sushyoshi » Tue 2020-08-11 18:55

Hello,

I am very new at all this so please bear with me.

I am trying to get my VS1053 module to work with Arduino Uno on Real-Time MIDI mode. The module is has a VS1053 chip, it is from LC Technology, green PCB and does not contain SD card reader. The connection pins are: 5V, GND, MISO, MOSI, SCK, DREQ, XRST, XCS and XDCS. Here are my questions:

1 - How should I proceed to connect this to the Arduino. I understand that SCK, MISO, and MOSI are connected to D13, D12 and D11 respectively. What about the other pins?

2 - It is to my understanding that since the physical pins to set the chip to RTMIDI are not available, I should do this through a software patch. I found the patch but I really don't understand what to do with the rtmidistart.plg and rtmidistart.cmd files. Is there a code to write on Arduino IDE to apply the patch?

3 - Is there a way to check if the chip is set into Real Time MIDI mode.

4 - Is there any library for Arduino to use VS1053 modules on Real Time MIDI only through SPI?

I really appreciate all the help I can get on this and it would be great if someone with the same setup could help out as well. Thank you.

User avatar
pasi
VLSI Staff
Posts: 1703
Joined: Thu 2010-07-15 16:04

Re: Need help getting VS1053 into RTMIDI through SPI on Arduino

Post by pasi » Wed 2020-08-12 11:28

1 - You also need at least xCS of vs1053b connected, preferably also xDCS. Being able to see the state of DREQ is also pretty important, although with care you can get away with having access to it.

2 - The patch / plugin is something you need to load every time after reset. The upload is performed through the serial control interface (SCI). It's possible that whatever codebase you use as a starting point, it already contains code to upload a patch. The pseudo-C code to upload a plugin is also included in the .plg file.

Also see the rtmidi application and its document from http://www.vlsi.fi/en/support/software/ ... tions.html

3 - SCI_AUDATA is 0xac45 if RTMIDI mode has been successfully started. (We assume you're not playing stereo 44.1kHz audio otherwise.)

4 - I don't know.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Sushyoshi
User
Posts: 3
Joined: Tue 2020-08-11 12:10

Re: Need help getting VS1053 into RTMIDI through SPI on Arduino

Post by Sushyoshi » Thu 2020-08-13 7:10

Thank you for you response.

1 - I have all the pins connected just in case;

2 - I have tried to use the code in the file on Arduino IDE and was sucessfully uploaded, however I dont know if I am in Real Time MIDI mode or not. Does this code have to be executed each time the arduino resets? Does this code need to be included on my program or will it be saved forever in the chip?

3 and 4 - I found one arduino library that has an example to show the AUDATA value: https://github.com/maniacbug/VS1053

Using that example I was able to get the following information:

VS1053 Configuration:
00 MODE = 0x800
01 STATUS = 0x3b
02 BASS = 0x00
03 CLOCKF = 0xb800
04 DECODE_TIME = 0x00
05 AUDATA = 0x1f40 // It does not seem to be on Real Time MIDI mode

Using the above library that gets me the AUDATA I am trying to add the patch code to it to see if I can get working in rt midi mode, but so far I have not be able.

I would be very gratefull if anyone could help with a code for Arduino to use the patch and then check the audata to see if I am in real time midi mode. I am sorry to ask this, as I am still very inexperienced on coding.

Thanks.

User avatar
pasi
VLSI Staff
Posts: 1703
Joined: Thu 2010-07-15 16:04

Re: Need help getting VS1053 into RTMIDI through SPI on Arduino

Post by pasi » Thu 2020-08-13 9:18

2 - there is no non-volatile storage (other than ROM) in vs10xx chips, so you need to load these patches, plugins, or applications after each reset.

Your SCI register dumps look correct.

Depending on the code you upload, you may need to start it separately by writing the specified start address to SCI_AIADDR. Other times, this write is included in the .plg file as one of the records to send to vs1053.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Sushyoshi
User
Posts: 3
Joined: Tue 2020-08-11 12:10

Re: Need help getting VS1053 into RTMIDI through SPI on Arduino

Post by Sushyoshi » Thu 2020-08-13 19:54

I finally got hold of another module with vs1053 chip and this one seems to be working fine and I was able to get into MIDI mode through the patch. This board is one of thos red pcb geetech vs1053 shield that actually can be mouted on an arduino UNO. I am starting to believe that there might be a problem with my other module in in terms of pcb connections, which might not be able to get into rtmidi mode.

Thank you very much for your help. After much struggle I was finally able to understand how to get the patch running in Arduino.

Post Reply