|
FAQ Search KeywordSearch Results
What does STREAM_MODE mean?SM_STREAM changes the way DREQ works. When SM_STREAM=0 (the normal mode), the sample rate of the song is fixed and VS1053 asks for new data when there is room in the stream buffer.
Expert: Panu I'm having trouble playing an MP3 file using VS10XX and a microcontroller. What should I check?- First check that you are doing more or less what it says in our FAQ item "So what exactly do I have to do to play a song?". -See that power, crystal and reset signals are at valid states. Check that you don't have unconnected GPIO's in the VS10xx and that the TEST and RX pins are pulled high. The initial problems in starting to hear MP3 music from VS1011 are usually the same. The usual remedies include: - Select NEW_MODE if it's possible. Don't set "SHARED MODE" if you can connect both XCS and XDCS to your microcontoller. - Be very careful with the chip select signals! - Check that XCS and XDCS are never both "0" at the same time. - Check that your chip select signals remain low until the end of the last bit of the last byte of the transmission. - Measure XCS, XDCS, SCK, MOSI and DREQ signals with your oscilloscope. - Check that when DREQ is physically high/low (pull up and down the signals on the PCB) that your microcontroller can reliably read these. If not, check your microcontrollers GPIO states (data direction, gpio/periph mode, pullup/pulldown). - Start by sending the Sine Test sequence with ALLOW_TESTS bit set in the MODE register. - Verify that GBUF/CBUF signal is at 1.25 volts. - Verify that you can hear a beep. - Then send an MP3 file, just as you would send the sine test sequence. At this point you should hear music. If it plays at the wrong speed, check CLOCKF register value. If it is choppy or noisy, double check the XCS/XDCS signals. Also check the SPI bus speed. It should be less than 1/4 (1/6 for reading) of the chip clock. - Note that before setting the CLOCKF register clock doubler/multiplier the SPI bus speed must be less than 1/6 of your crystal clock. Expert: Panu Why so many pull-down resistors for VS1000 data lines?The ROM firmware of VS1000 assumes a Nand Flash and 5 buttons connected to the Nand Flash data bus with pull-down and pull-up resistors. The firmware reads the buttons every now and then. If the data line is pulled low by the resistor then no action is taken. However, if the line does not have a pull-down resistor it might be high after the last Nand Flash transaction. This causes an "false" button event to be recognized by the firmware. This can cause unpredicted results. Either use pull-down resistors on Nand Flash data signals D0 .. D4 or write a custom software with a custom keyhandler that ignores possible false key events. Expert: Pekka How can I make an Internet Radio based on VS1053It's a relatively straightforward task to make an internet radio from VS1053. You need to have a microcontroller running some TCP/IP code so you can open a TCP connection and then just feed the bytes from the TCP connection to VS10xx. Additionally, you'll need some buffer memory for the incoming packets - at least a few kilobytes but more buffer memory will give you better resilience with bad network connections. For reference on the hardware/software design, you can look at some existing solutions. There are at least 2 published internet radio designs that use VS1053 (or its predecessor): the Microchip Internet Radio and the Elektor Internet Radio. It's easy to find info on them in the net. If you have trouble finding the schematics, contact VLSI support. The Microchip internet radio obviously uses a PIC and the Elektor Internet Radio uses an Atmel ARM as the host processor. In addition, several commercial manufacturers use VS1053 because it's so easy to use and versatile, but we can't give any information on those. For information on how to write software that communicates with VS1053, I suggest that you first of all read the datasheets and application notes and then look at our example microcontroller software at http://www.vlsi.fi/en/support/software/microcontrollersoftware.html Start your software development as you would make a "normal" MP3 player. Connect VS1053's Serial Control Interface (SCI) and Serial Data Interface (SDI) to your microcontroller's SPI or SSI port. Preferably use separate chip select lines for both (xCS and xDCS). Connect DREQ to an IO pin to the microcontroller, preferably an interruptible one. Execute VS1053 reset as in the microcontroller source example, and do the Sine Test to verify that you can get a beep. Then send an MP3 file to the SDI port and enjoy the excellent sound quality. Then pick an internet radio station with MP3 data format. Listen to it using your PC and use Ethereal/Wireshark to see how the connection is opened. Make note of the IP address, port number and the HTTP GET line used to request the connection. Then do the same with your microcontroller. Once you open the TCP connection and send the correct HTTP GET line to the connection, the radio station should start sending you the data. Feed the response bytes to VS1053 and listen to the broadcast. Finally, after you get it working, you might want to adjust the sample rate of VS10xx manually because you have information on the fill level of your big buffer, which the VS10xx doesn't have. This way you can adapt precisely to the incoming bitstream speed and eliminate all problems that you might have from buffer overruns/underruns. An MP3 radio station starts playing almost instantaneously. With WMA/AAC bitstreams, there are some ways to make it start faster. Contact support for details.
Expert: Panu Why is the CVCC capacitor smaller than the one for AVDD or DVDD?Like all regulators also the VS1000 requlator requires filter capacitors. It is recommended to use one 10uF cap for the AVDD and one for the DVDD regulator output. Also 100nF capacitors should be connected from all other AVDD and DVDD pinst to ground. The CVDD capacitor should be 1uF. Also a one mega ohm (1MOhm) resistor should be connected in paraller with this cap. This drains the capacitor faster during power down an prevents the regulator from starting up when the power button is released after power down. Expert: Pekka Standalone application - VS1011 vs. VS1003I have a technical query regarding VS1003, comparing it to our current project with VS1011. VS1011 reference design (i.e. standalone player) has 3 user controls (play/pause, volume-/prev, vol+/next). We cannot have more user controls because there is not enough internal memory for extra firmware. VS1003 http://www.vlsi.fi/fileadmin/app_notes/vlsi/vs1003_plugins.pdf tells me that I can have 16 or 32 buttons, yet it has exactly the same internal memory (5.5KiB) as VS1011. Can you find out how the extra user button firmware is fitted into the VS1003?, or am I misunderstanding something? VS1003 16/32 button application uses ADC of VS1003. Buttons make resistive string. Expert: Teppo VS1053b Ogg Vorbis Encoder: How large is the end-to-end audio delay in a streaming system?The end-to-end delay depends on what you set as the maximum block size at the encoder end. See VS1053b Vorbis Encoder documentation, Chapter "VS1053b Ogg Vorbis Encoder Registers", SCI_AICTRL3 bits 7:4: Max samples in frame. If you set this register to the minimum value 1, you will get a new frame after each 4096 samples. Because of byte alignment restrictions given in the document, you can expect to get a new frame after each 8192 samples. Then there are internal encoding buffers that are approximately 2000 samples, and the decoding delays from the receiving VS1053 which is in the order of 2000 samples, for a total of Expert: Henrik VS1053b Ogg Vorbis Encoder: How do I catch and send the Ogg Vorbis headers?For an Ogg Vorbis decoder to work, it always needs to be able to read initial Ogg Vorbis headers. The headers contain dynamic compression tables, channel mappings and other important stuff. Typical Ogg Vorbis encoders code these headers in approximately 4 KiB, but the VS1053 Ogg Vorbis Decoder uses slightly less than 1.5 KiB to encode them. There are cases where the transmitter of an Ogg Vorbis stream is on all the time, but the decoder or several decoders are connected to the stream only afterwards in such a way that it is not realistic to start the encoder all over again (e.g. you don't want to restart the encoder each time a new listener is attached to an Internet radio). In such cases there must be an alternative way to determine and transmit the headers. If the system is a closed system like RF headphones, the headers may be catched once and somehow sent to the receiver (or they can even be hardcoded to the receiver's microcontroller firmware and sent by it to the decoding VS1053 as the first thing). On open systems where there may be many listeners with different versions of the encoder / decoder, the standard headers may be transmitted during startup (e.g. internet) of the connection or trickled cyclically as a low-bandwidth sidestream signal along the main signal and collected by the microcontroller so that after a few seconds they can be transmitted to VS1053 so that it can then start playing audio data (e.g. digital radio). The important headers can be detected as follows: When you start the VS1053b Ogg Vorbis Encoder, receive and store data until you run into the following bytes (XX means no matter): 0x4f 0x67 0x67 0x53 0x00 0x00 XX XX XX XX XX XX XX XX XX XX XX XX 03 00 00 00. This data is the first bytes that is NOT a part of the initial headers but of actual audio data. After the VS1053 decoder has received the initial headers you may start sending audio data from any point of your stream. Expert: Henrik VS1053b Ogg Vorbis Encoder: Can I stream Ogg Vorbis over RF?Ogg Vorbis, just like MP3, WMA and AAC are compression schemes which take away as much redundancy of the audio files as possible. Because redundant information has been removed, there is no resiliance against bit errors left. The VS1053b Ogg Vorbis decoder can recover from errors as soon as there is new header data present, but still upto 490 ms of audio can be undecodeable after a bit error (when sampled at 44100 Hz and 128 kbit/s). Thus, if there is a significant bit error rate, e.g. 10-5, the stream will be practically completely unlistenable. For a good listening experience, there should be less than one bit error per 10 minutes in good listening conditions, which at a 128 kbit/s stream means a bit error rate 10-8 or less. To achieve these kinds of error rates with a realistic RF channel requires effective channel coding. This is also true to Internet protocols like UDP where correctness of data cannot be guaranteed. (TCP does guarantee correctness, but it may require infinite resends, so you'll need a large buffer.) All unreliable commercial media use channel coding, including but not limited to digital radio, mobile phones, CD's and DVD's. Depending on the application, channel coding typically increases the number of bits to be transferred by 20 - 200%. Another important point is that the decoder needs to see the initial Ogg Vorbis header frames without any errors whatsoever. For details on how to do this, see the FAQ question: "VS1053b Ogg Vorbis Encoder: How do I catch and send the Ogg Vorbis headers?"
Expert: Henrik Is it possible to supply the VS1000 IOVDD externally?Is it possible to supply the vs1000b IOVDD over pin 7 and 19, from externally with 3.3 volt and leave the IOVDD regulator output pin 30 open? You can do this but I have three concerns:
Expert: Teppo How do I make a mono line-out connection?You can make a mono line out connection simply by summing the left and right output together with two resistors. Connect a 1k ohm resistor in resies with with each analog output (LEFT & RIGHT). Then connect the resistorc to a DC-isolation capacitor. See "ESD protection" app. note figure 8 for more info. Notice that this connection is not suited for use with headphones. For a software that downmixes the decoded audio to mono in the VS10xx contact support@vlsi.fi Expert: Pekka How can I connect external clock signal to VS10xx?If your system has suitable pulse or sine clock available you do not need to use a separate crystal for VS10xx. You can connect external pulse clock to directly XTALI pin of VS10xx. If the clock signal is sine you must connect it to XTAL through a small value capacitor. Also connect a 1Meg resistor between XTALi and XTALO. Expert: Pekka How to determine the correct chip version from VS1011E registers? Also: SCI_STATUS register says my VS1011E is actually VS1002. What is wrong? Expert: Henrik How can I make a Line Out connection?I hear a loud pop when I connect the outputs to a stereo set. What can I do about it? See latest info from application note: "ESD protection". Expert: Pekka Do you have software examples of using VS10xx?For microcontroller example see http://www.vlsi.fi/player_vs1011_1002_1003/modularplayer/index.html and http://www.vlsi.fi/en/support/software/microcontrollersoftware.html VS10xx code examples, patches and software tools: http://www.vlsi.fi/en/support/software.html Expert: Panu Where do I get example code for microcontrollers?VS10xx KIT uses c51 microcontroller as master processor. The example code is available in http://www.vlsi.fi/en/support/software/microcontrollersoftware.html
Expert: Henrik Power-on click problem Can you please clarify how to use a transistor to eliminate the power-on click - this is the primary reason why we re-layouted out the board for the VS1011 versus the 1001, with the expectation that the newer chip (according to the documentation) eliminated this issue. We are planning on using the capacitor coupling. x = ReadVS1011Register(1); Expert: Pekka Can you please clarify the usage of the VCM (GBUF) pinVCM (pin 42) is virtual analog ground output. Left and Right outputs have dc bias which is equal to voltage at VCM pin (about 1.25V). If you connect you earphones between Left/Right and VCM (instead of AGND) you can have dc coupling. But if you use AGND as ground reference you need to use ac coupling capacitors at the L/R outputs. So, basic idea of this pin is to save two capacitors and provide good bass. But never connect VCM to ground! Expert: Panu What is the price in 1K quantity?Small quantities can be purchased from our Web Store see Buy. Web Store has price reductions up to 500 or 1000 pcs depending on the product. For bigger quantities please ask quotation from us. Expert: Teppo Would you please tell me where I can get some samples?Samples are available via our distributors. Expert: Teppo Adjusting the samplerate of the currently playing file In vs1003B new value for the sample rate generation is only calculated when the samplerate changes, not when only CLOCKF changes. Expert: Pasi Notes on the different communication modes in SCI/SDI There are 4 different communication modes in various vs10xx chips:
Expert: Pasi Notes on parsing WMA streamsHere is a basic description of the operation of VS1003 and WMA: VS1003 operation WMA found: The WMA rewind patch replaces the main decode loop with a version that tries to resynchronize to the ASF packets. Minimum requirements for WMA header ASFFileProperties: 68 bytes skipped, ASFStreamProperties: 16 bytes: ASFAudioMedia Expert: Pasi Migrating from earlier products Here are combined some general migration notes regarding VS1003 and other VS10xx series devices. They are of help to you, who have used an earlier device and wish to upgrade. http://www.vlsi.fi/en/support/evaluationboards/vs10xxkit.html http://www.vlsi.fi/en/support/evaluation-boards/vs10xx-proto-board.html
Migrating to a new version of the VS10xx family (VS1001k -> VS1011B -> VS1011E -> VS1002 -> VS1003 -> VS1023) is quite easy since the devices are mostly compatible with their predecessors. Only where retaining compatibility would mean compromising chip performance, changes are made. These include dropping VS1001k BSYNC compatibility in VS1002 and changing CLOCKF register (clock multiplier added) in VS1003. player_vs1011_1002_1003/modularplayer/vs10xx_8h.html#a32 http://www.vlsi.fi/player_vs1011_1002_1003/modularplayer/vs10xx_8h.html#a38 player_vs1011_1002_1003/modularplayer/vs10xx_8h.html#a38 http://www.vlsi.fi/player_vs1011_1002_1003/modularplayer/vs10xx_8c.html#a5
The MAXIMUM voltage for VS1003 AVDD is 2.85 volts. Other VS10xx ICs don't have this restriction. CLOCKF register value has changed in VS1003. It now controls the clock multiplier, allowable range and base crystal frequency. VS1003 -> VS1033
VS1053 adds stereo line-in and AAC+ and Ogg Vorbis codecs. The ADCs are high quality. You need to add 10nF capacitors near the pins as well as series resistos to cust the capacitive load for the other device that drives the inputs. Also please add RC filter to the output of the DACs when connecting them to external power amplifier. The DAC type has been changed for improved distortion but with a cost of some additional high frequency noise. This may cause noise in low quality power amplifiers. Expert: Panu Shared SPI and control registersI thought XDCS was active low when writing data to the part and that XCS was active low when writing commands, but then 7.6.1 - 7.6.3 show using XCS being for SDI and SCI writes. Is this just because SM_SDINEW and SM_SDISHARED are both set? Yes. Your application diagram suggests that you can use NEW_MODE and there is no need to use SHARED_MODE. NEW_MODE is recommended. In new mode, XCS and XDCS are active-low SPI chip selects for both commands and data, just as you could expect. In shared mode, the function of both is bundled into XCS to save one I/O pin in a microcontroller. Expert: Henrik What if the part is used on a shared SPI bus - it will be in our application.You can use the chip in a shared SPI bus when it is in NEW_MODE. The "straightforward" way of doing things is to read a block of data to a buffer in a microcontroller and then send it to the VS1002. Expert: Henrik Can I connect VS10xx to the line input to my stereo system? Can I connect the audio output of the vs1001 (pins left and right) to the line input to my stereo system? The line input has 47 k-ohm impedance. I know that a 100 µF cap and maybe a 15 ohm resister should be in series with each output line. Question, is 15 ohms enough or do you need some kind of buffer/driver on the output? For proper line out connection see "ESD protection" application note. Expert: Pekka How do I extract song and artist information? VS1001 does not provide a means for extracting song and artist information from so-called ID3 tags from MP3 songs. It would be quite futile to even attempt adding such a feature to a decoder chip, since the traditional tags are at the end of a song, and would thus not be decoded before the whole song had been played! Expert: Henrik What changes have there been between VS10xxX and VS10xxYFor information of changes between device versions see the last pages of the appropriate datasheet. Expert: Pekka I am using a clock that is not 24.576 MHz and the system plays music at the wrong speed. Why? Check with the following symptoms and their solution: Expert: Henrik I want to overclock my chip. Is it safe? This depends on what you consider safe. Overclocking is usually safe in that sense that running a chip with a voltage that is inside Absolute Maximum Ratings doesn't break anything even if run at a very high clock speed. However, this is not guaranteed by VLSI Solution. Expert: Henrik So what exactly do I have to do to play a song?
Expert: Henrik DREQ sometimes freezes to always 1 or always 0. Why?The reasons for this are the same as for other lockups, see "What is wrong when VS1001 occasionally locks up so that even software reset doesn't work?" Expert: Henrik How do I find out if the chip locked up after a software reset?Read back the contents of the MODE register after 250µs. If Bit 2 is still set, the chip didn't respond to the software reset. Try a hardware reset (remember that this will cause a slight clicking noise). Expert: Henrik How to use the BSYNC signal? I'm having some problems playing MP3 files. The Sine Test is OK, but when trying to play MP3 files, I get "weird" noises and sometimes the chip just plain refuses to do anything. Expert: Henrik What does the op-amp at the output of the VS1001 Evaluation Board do? What exactly does the op-amp at the output do ? Apparently it saves the large output caps. It is some kind of virtual ground or like the ground buffer in the BGA chip ? Actually, it is both. It is a ground buffer that generates a virtual ground, i.e. it does exactly the same thing as the built-in ground buffer in the BGA chip. It is recommended to use this kind of design when the system is used to drive earphones or other devices that don't have a fixed ground. If there is a fixed ground (like a connection to an amplifier), capacitors must be used instead. Expert: Henrik Problems upgrading from VS1001 to VS1011See application notes from: http://www.vlsi.fi/en/support/applicationnotes.html Although we have tried to make migrating from VS1001k to VS1011 as easy as possible, some problems have occurred. If VS1001k datasheet rules are not violated and VS1001k recommendations have been followed, then migrating to VS1011 can be done with little or no changes to the circuit board.
Expert: Henrik How high voltage does VS1001 tolerate for short durations? I gave VS1001 a supply of 4.3 volts for a short duration of time on quite a few occasions (there was a problem with my hadwired board). The absolute positive AVDD and DVDD ratings for the chip are 3.6 volts, yet nothing whatsoever happened to it. Expert: Henrik What is wrong when VS1001 occasionally locks up so that even software reset doesn't work? If you get VS1001 in a mode where software reset bit SM_RESET simply doesn't work, you usually have managed to feed VS1001 a bitstream that is not a valid MP3 stream. This may also be caused because you may have forgotten to send bytes containing zeros before or after a reset. Expert: Henrik How much buffering does VS1001 offer? VS1001 implements two user-transparent buffers: an input bitstream buffer, and an audio output buffer. Expert: Henrik |