Thread: Sound!
View Single Post
  #7   Spotlight this post!  
Unread 19-08-2009, 13:29
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Sound!

I have done this before as a project on another microcontroller (an HCS12 to be exact). I hooked up a speaker and amplifier to a PWM output and modulated the PWM period to generate different tones (granted, the square PWM wave sounds a little strange, but with a simple RC filter you can get a roughly sinusoidal, single pitch sound).

I suspect that if you were to look at some of Kevin Watson's code on how to use PWM ports 13-16 with custom frequencies, you could probably do something very similar.