My first question

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
walidkhier
User
Posts: 4
Joined: Mon 2020-03-16 11:14

My first question

Post by walidkhier » Mon 2020-03-16 11:45

Dear All,

This is my first post to this forum. It came after a considerable deal of reading and watching tutorials. There are still a plenty of confusion and open questions, so please bear with me.

First, I am familiar with AVR micro controllers. I have made my own DCC function decoder for model railway. I use plain C and Arduino for prototyping, and plain C for the final release.

My aim is to build a sound module for an RC car simulation engine start and sound, and possibly mixing with other sounds like police serine, for example.

Now the questions:

1- From what I could grasp, the micro controller's role is to read sound data and feed the sound decoder byte by byte (or chunk by chunk) whenever the latter signals its readiness for more, right? If yes, this leaves no time for the Micro controller to carry out any serious task. I know, or I think I read somewhere that it is possible to let micro controller instructs the decoder to read sound data directly from external storage. Did I understand that correctly? If yes, here where I need assistance.

2- My micro controller will run most probably at 8 MHz or 16 MHz. The VS1053, for example runs at 12 comma something MHz. Would it be safer to have a single external crystal running to ensure synchronization between the micro controller and decoder?

3- Data sheets are not my strongest point, I know, could anyone let me know please where to find out information regarding the SPI frequency of the VS1053?

Well, I think that is enough as a start :D

Thanks in advance

Walid

PS. To the moderator, please free to move the post if this is not the appropriate place.

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

Re: My first question

Post by Panu » Mon 2020-03-16 12:26

Hi, and welcome to the forum!

Have you taken a look at the VS1000 module? It allows you to store ogg sound files in the included SPI flash or on an SD card and play them using GPIO pin triggers or serial commands? It's one option on how to do it.

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

walidkhier
User
Posts: 4
Joined: Mon 2020-03-16 11:14

Re: My first question

Post by walidkhier » Mon 2020-03-16 19:56

Hallo Panu,

Thanks for your reply.

I have been exploring the VS1000 since I received your comment.

From what I could see, the playback can be controlled either by setting pins (in a binary manner) or using UART to send specific commands. What I failed to understand is how to choose between the two modes. Or does the chip accept commands both ways at the same time?

Regards

Walid

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

Re: My first question

Post by pasi » Tue 2020-03-17 10:00

walidkhier wrote:
Mon 2020-03-16 19:56
What I failed to understand is how to choose between the two modes. Or does the chip accept commands both ways at the same time?
The mode of operation depends on the firmware that is loaded from the beginning of the SPI FLASH. The rest of the FLASH is used for audio content. (The SPI FLASH is populated on the underside of the module.)

It is also possible to customize the firmware.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

walidkhier
User
Posts: 4
Joined: Mon 2020-03-16 11:14

Re: My first question

Post by walidkhier » Tue 2020-03-17 14:37

It is also possible to customize the firmware.

Using VSIDE and USB cable I presume, or do I need a special programmer?

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

Re: My first question

Post by pasi » Tue 2020-03-17 15:14

walidkhier wrote:
Tue 2020-03-17 14:37
Using VSIDE and USB cable I presume, or do I need a special programmer?
If the module already has a firmware programmed, you can update the firmware and content using a uSD card. If the module doesn't have firmware or it is corrupted, you can program the module firmware with UART (either in VSIDE or with pcflash.exe ).

The VSIDE solution for VS1000 Audio Module firmware is available from http://www.vlsi.fi/en/support/software/ ... tions.html , also see http://www.vlsi.fi/en/support/software/vs1000tools.html , specifically the programming examples:
http://www.vlsi.fi/fileadmin/software/V ... 1-prog.pdf .
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

walidkhier
User
Posts: 4
Joined: Mon 2020-03-16 11:14

Re: My first question

Post by walidkhier » Tue 2020-03-17 16:45

    Great, one last question: when everything goes right and I am done with the prototyping phase I will put the components on my own custom PCB. I presume the same procedure applies to the stand alone IC as the in the module.

    Regards

    Walid

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

    Re: My first question

    Post by pasi » Wed 2020-03-18 10:58

    Programming through UART works the same for your own board.

    You need a compatible SPI FLASH (4kB block erase) and need to copy the audio module schematics so that you have access to the UART for programming the initial firmware, and preferably a way to pull xCS low during powerup so that you can prevent boot if you want or need to reprogram.
    Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

    Post Reply