You are viewing an older revision! See the latest version
RS Audio Codec

This page provides information and some examples for the use of the RS Audio Codec sub board, based on TI's TLV320 chip. This chip provides a high quality audio link out and in to the mbed with IO including: an amplified stereo headphone out, an stereo line out, a stereo line in and an pre-amped mono microphone input. Such a capable chip opens up a lot of options for high quality audio on mbed.
One can get this board from RS: AudioCODEC for mbed
The easiest way to get something working is to load a test wave file (such as this one or this one) onto a flash drive, plug it into the Lab Board and load up this program:
Import programWavPlayer_test
The easiest way to get something working is to load a test wave file (such as this one or this one) onto a flash drive, plug it into the Lab Board and load up this program:
Import programWavPlayer_test
A test program for the WavPlayer class, works on the RS Animatronic Lab Board
or just this one:
Import programTLV320_Write_test
A test program for the TLV320, Generates some sine waves.
Both programs use the TLV320 library and the I2S library:
Import libraryI2S
A well tested I2S library where the send and recieve parts are seperate instances.
Import libraryTLV320
A fairly well tested TLV320 library for I2C configuration and control of the TI TLV320 part
A WAV library was written to make the process of playing wave files easier:
Import library
Public Member Functions |
|
| WavPlayer () | |
|
Create a
WavPlayer
instance.
|
|
| WavPlayer (FILE **fpp) | |
|
Create a
WavPlayer
instance.
|
|
| void | open (FILE **fpp) |
|
Set the file to read out of.
|
|
| int | getConfig () |
|
Extract the header infomation, automatically called by open.
|
|
| float | play () |
|
Play the entire file.
|
|
| float | play (float time) |
|
Play the file for a certain number of seconds.
|
|
| float | play (float start, float timefor) |
|
Play the file for a certain number of seconds, from a certain start point.
|
|
