VS1000 Source Code Examples

These are small source code examples that demonstrate certain functions that are possible with VS1000 chips. They are for the most part not complete, self-contained stand-alone programs. Most of them can be used for experimentation with the VS1000 Developer Board and can be compiled with vskit 1.33 or vskit 1.34. Many will also compile and work with VSIDE.


UART Control

VS1000 is intended to be the master controller on the system, but sometimes you would like to use it as a component in a bigger system. This package shows how to make VS1000 player controllable through UART. The example also shows how to make the directory structure visible, allows listing of directory contents and allows current play directory to be changed through simple UART commands.

Updated: 2010-05-27
Download:  uartcontrol030.zip (preliminary version, a short uartcontrol.txt included)

Battery Level Monitor

VS1000 does not have an AD that could measure the battery level. The batterymonitor document shows how to use a comparator, one GPIO and the programmable AVDD regulator to measure the battery level or any other external voltage.

Updated: 2008-09-19
Download: batterymonitor.pdf

Display.c

Updated version of the VS1000 Developer Board's display.c example, which is included in vskit compiler package. Now shows short file name if long name is not available.

Updated: 2008-05-19
Download: display.c

Wavplay.c

A new player routine that supports 8-bit and 16-bit WAV files in addition to calling the old player routine to play Ogg Vorbis files.

Updated: 2007-11-21
Download: wavplay.c

Nandprog.c

Updated version of the nandprog.c utility found also in the VSKIT package. Supports the latest Nand Flash devices used on our boards (29F2G08AAC and others).

Updated: 2007-11-07
Download: nandprog.c

Eeprommer.c

Reads, writes and erases SPI flash eeproms using VS1000B developer board. Run it by using vskit133 ("build eeprommer").

Updated: 2008-01-31
Download: eeprommer.c

Spiflasher.c

Used to write boot software to SPI flash using the "NO_FLASH" ramdisk.
Drop the VS1000_B.RUN file and your eeprom image file to the ramdisk and detach from USB. SPI flash is written and a quint beep is played from headphones to signal programming ok.

Updated: 2008-01-31
Download: spiflasher.c - Source Code
Download: VS1000_B.RUN - Compiled, ramdisk-runnable image

Skip Directory 0.1

A software that skips to next directory when "Feature" and "Next/FF" is pushed simultaneously. Handy especially in applications with no display and large memory.

Updated: 2007-09-27
Download: skipdir.c
 

Opening named files

A small example project that demonstrates reading the buttons and playing a different file for each button. The files are located based on their names. Compiles with vskit133 build script. Remove console output lines if you don't have an RS-232 debug connection.

Updated: 2007-10-23
Download: filename.c

Reading a text file

A small example project that demonstrates reading the contents of a text file and printing it to the debug console character by character. Compiles with vksit133 build script. RS-232 debug connection required.

Updated: 2007-10-23
Download: readfile.c

Timer Interrupt

A small example project that demonstrates how to hook the Timer 1 Interrupt, set timer interval and install a C-language handler routine to the interrupt. Compiles with vksit133, own build script included. RS-232 debug connection required.

Updated: 2007-10-25
Download: timerexample.zip, includes documentation (readme.txt).

Simple I2C Communication

A small example project that demonstrates reading and writing to an I2C compatible chip (in this case a real-time clock). The code declares code size optimized routines for communicating with a single I2C chip using the Bit Router Engine capability of VS1000's I/O controller. Compiles with vskit133 build script. Remove console output lines if you don't have an RS-232 debug connection.

Updated: 2008-01-15
Download: pi2c.c