Microcontroller examples for VS1063, VS1053, VS1003, VS1011

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
User avatar
Panu
VLSI Staff
Posts: 2417
Joined: Tue 2010-06-22 13:43

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by Panu » Thu 2014-03-27 11:00

Hi, hmmh, do you have an oscilloscope to test it? Are you sure that xCS is high when you send data with xDCS? Do you hear anything or is the chip just "silent"?

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

xuanvn
User
Posts: 17
Joined: Wed 2013-12-25 6:02

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by xuanvn » Thu 2014-03-27 11:10

Hi Panu,

Thank you for your help.

I have an OSC, I will test the XDCS as your idea. I wonder why how can I capture this pulse.

By the way, I hear nothing from the chip. The program passed the playing function too fast (about 500ms) although my mp3 test file is about 1 minute long.

Maybe there is something wrong when I read the file from SD card.

Xuanvn

User avatar
Panu
VLSI Staff
Posts: 2417
Joined: Tue 2010-06-22 13:43

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by Panu » Thu 2014-03-27 11:14

The program passed the playing function too fast (about 500ms) although my mp3 test file is about 1 minute long.
This means that the VS10xx cannot detect that it's MP3 data. It keeps requesting more and more data until it can detect something that it can play.

Please test with another MP3 file. Is it possible that your file is actually MP2 and that's why it doesn't play...? But more probably it's a problem with the data transmission.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

xuanvn
User
Posts: 17
Joined: Wed 2013-12-25 6:02

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by xuanvn » Thu 2014-03-27 11:36

Thanks Panu,

I will check it both and tell you the results

Xuanvn

ghoola
User
Posts: 3
Joined: Tue 2014-05-20 18:26

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by ghoola » Wed 2014-05-21 16:43

hi can i use this test code in CodeVision and compile it?
http://www.vlsi.fi/en/support/software/ ... tware.html.

User avatar
illi_ei
User
Posts: 2
Joined: Sun 2015-04-12 15:52
Location: Israel

writing code for VS1063 - NIOS-II; help

Post by illi_ei » Sun 2015-04-12 17:23

Hello everyone,
1. I'm a new member and new in these products of audio encoding/decoding, but I have an experience in microcontrollers and FPGAs.
2. If I writes this post in the wrong place, please forgive me and I'll move it to another place.

My name is illi, and I work on a project, One of the goals is to record an audio file to SD-Card;

My system is NIOS-II processor based computer, build on Altera FPGA (DE0_Nano development board http://www.terasic.com.tw/cgi-bin/page/ ... 139&No=593). I have lot of GPIOs to connect whatever I want (3.3V), I already have a working SD-Card (used for another application right now, and I will disable this application and use it for the VS).
All the code is written in C language (no OS is used), and I can add source and headers files to my project when necessary.
I bought the VS1063 breakout form SparkFun (https://www.sparkfun.com/products/11684), which has all the basic to operate (I don't have a VS development board), and it's connected to my system and "ON" (has LED).

the operation that I need is:
access the module, configure it as an encoder (ogg, 8kHz mono, quality 5, 13 kbit/s) and by a command to start/stop encoding. The output data will be written to the SD.

Must I write a special plugin and write it to the chip, or use modules, or can I just configure internal registers, send a start/stop command and read the spi (sci) bus?
I'm not looking for any special features, not now and not in the future.
What spi clock should I have to use (Onboard 12.288MHz oscillator)?

honestly, I want to write a procedure, as much as simple, that initialize the VS1063 and prepare it to operation, and use it in my code whenever I want. I read in the forum and didn't find something that can help me in my problem. Sorry if my question bad :?
I appreciate any answer.

Thanks,
illi

User avatar
Panu
VLSI Staff
Posts: 2417
Joined: Tue 2010-06-22 13:43

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by Panu » Tue 2015-04-14 16:34

Hello, Illi, and welcome to the Forum!

You don't need to write a plugin, or indeed any DSP code, but you will have to upload a patch (bugfix file) to the VS1063.

Please follow the "MCU Howto" link, it leads to posts that have other links which lead to documents written by Henrik which are useful to you.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

User avatar
illi_ei
User
Posts: 2
Joined: Sun 2015-04-12 15:52
Location: Israel

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by illi_ei » Thu 2015-04-23 16:58

Hello Panu,
I'm glad to be here too, there is a lot to learn here :-)

This is great news, so what I need is to make a reset, configure relevant registers and start/stop the encoder.
I saw the patch's info and there is nothing regarding to OGG format, so I don't think I should upload it (I'm not going to use any other formats in the future), is that right?

I was looking at "Microcontroller Playback and Recording Example using VS1063" in the software section, and in the example there are the most procedures, I'll use the
procedures referring to init, recording and stopping, make my own "main" to encode only, SPI (sci, sdi) to communicate, and SD-card to write to, to work with my hardware, and that's all, am I right?

PS
when I starts the encoder, does the data start automatically flow in the sdi bus?
What is the timing procedure if I want to send something to the sci? am I going to loose data when doing this?
The "LoadPlugin" in that example means loading the patch, is that correct?

I will have to make some modifications to "VS1063RecordFile" to suit it in my environment.

User avatar
Panu
VLSI Staff
Posts: 2417
Joined: Tue 2010-06-22 13:43

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by Panu » Thu 2015-04-23 19:12

Hi!

In general, you should always load the latest patchset for any of our IC that you use. Our examples and procedures might depend subtly on the patch being loaded, since generally we always have the latest patches loaded when we work on the chips.

The microcontroller examples for VS1063 at http://www.vlsi.fi/en/support/software/ ... tware.html (vs1063an_playrec) always include and load vs1063a-patches.plg.
when I starts the encoder, does the data start automatically flow in the sdi bus?
No. SDI is not used for reading encoded data because SDI hardware does not have data out pin. The procedure is to read the value of one SCI register to see how much data is available and then repeatedly read another SCI register many times to get the data. Repeat this until you want to end recording. Then follow the procedure to end recording.
What is the timing procedure if I want to send something to the sci?
You may interleave SCI register reads and writes as you like.
Am I going to loose data when doing this?
No, provided that you can store the encoded data reasonably fast.
The "LoadPlugin" in that example means loading the patch, is that correct?
Correct.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

viragdoshi
User
Posts: 3
Joined: Thu 2015-11-26 2:48

Re: Microcontroller examples for VS1063, VS1053, VS1003, VS1

Post by viragdoshi » Thu 2015-11-26 4:43

Hi,
I recently bought the Sparkfun VS1063 breakout board. I have used your libraries provided at [url]http://www.vlsi.fi/fileadmin/app_notes/ ... layrec.zip[/url]. I wrote the required functions, such as writeSCI and readSCI, etc. Upon checking on a logic analyzer, the mentioned signals seemed to be following the required timings.

The VSTestInitSoftware returned 0, meaning it could correctly read the values in the SCI_HDAT0 and SCI_HDAT1 registers.

I tried to test using a sine wave, which also worked fine, and I could hear a beep at the output.

Then I tried to play several mp3 and a couple of wmv files. The wmv file did not produce any output at all, and in case of the mp3 file, the output was a distorted version of the original track.
I would be extremely grateful if someone could please help me debugging the said problem.

Regards,
Virag

Post Reply

Who is online

Users browsing this forum: No registered users