Skip to main content
 

MSP430 audio sampling

Echo audio input Ian Lesnet

Echo audio input

The watchdog timer is used as a timer with an alarm. When the alarm sounds (8000 times per second), the ADC is started. The ADC measurement isn't immediately available, we have to wait a few cycles for everything to be ready. We don't need to worry about this period, because the ADC on the MSP430 will trigger it's own alarm (interrupt), just like the WDT alarm that got the process started. When the ADC alarm sounds, the chip will execute a single line of code that moves the recorded value into the pulse-width modulator duty cycle register. As you might recall from last time, this is how we output sound on the MSP430.

Advertisement

Follow Us