Joystiq has your stash of criminally complete GTA IV news!

Make a talking MSP430 microcontroller - part 2


Overview

Read the previous article in this series for the fundamentals of microcontroller audio. Learn about basic MSP430 connections and programming in the MSP430 primer. This week we'll use the tiny, inexpensive MSP430 microcontroller to play audio from a SD card.



Playing an audio file
In the previous project, I used the MSP430 pulse-width modulator (PWM) to generate simple tones. The PWM duty cycle changed the frequency, and thus tone, of the generated signal. The signal is cleaned by a simple audio filter, and amplified by powered PC speakers. Hear it in this video clip from the previous article:




Each value generates a different frequency. If we change the values about 8000 times a second (8KHz) we can reproduce telephone quality audio.

8 bit audio (each sample requires one byte) at 8KHz requires 8000 bytes of data per second. 16 bit audio, the quality associated with CD players and PCs, requires twice as much data per sample (16 bits or 2 bytes) -- 16 kilobytes/second.

With 2K of internal flash, the MSP430 can store about one-quarter second of audio. External memory is needed to store any meaningful amount of audio. There's no better source of cheap storage than flash memory chips. A raw flash memory chip would be a special order item, but you probably already have some flash memory -- SD cards! These cards are ubiquitous in digital cameras and low-end MP3 players.
next page

Related Headlines

Add your comments

Please keep your comments relevant to this blog entry. Email addresses are never displayed, but they are required to confirm your comments.

When you enter your name and email address, you'll be sent a link to confirm your comment, and a password. To leave another comment, just use that password.

To create a live link, simply type the URL (including http://) or email address and we will make it a live link for you. You can put up to 3 URLs in your comments. Line breaks and paragraphs are automatically converted — no need to use <p> or <br> tags.

New Users

Current Users

About DIY Life

Do Life! DIY Life highlights the best in "do-it-yourself" projects.

Here you'll find all types of projects, from hobbies and crafts to home improvement and tech.

Featured Projects


Powered by Blogsmith

DIY Life Exclusives

scentuallife kiddie crafts avant-yard

Sponsored Links

Featured Galleries

An easy way to insulate and skirt an elevated structure
USB analog gauge overview
USB analog gauge circuit
Making and using a facial mask
Hot Sprinklers
Homemade lava lamp for kids
Create a Celtic pendant for St. Patrick's Day
Easy no-sew jeans messenger bag
Bathroom tile makeover - fish
Hinamatsuri doll examples
Poisonous Plants 101
Playground 4x4s
Upholstered nightstand makeover
iPod+Nike DIY duct tape pocket
cootie catcher
10 ways (OK, maybe a couple more) to increase your vehicle's fuel economy
Nike+iPod hacks and mods
Tile Floors
Valentine's Day Scentual Oils
Building the JDM2 PIC programmer
Hanging sheet rock overhead

 

Weblogs, Inc. Network