Tag Archives: homework

Blinking lights MSP430 FG461x

Photo of two experimenter boards for the MSP43...

Image via Wikipedia

I have been working on MSP430 for sometime now. It is an TI (Texas Instruments ) chip. Very fun to play with. We are using a MSP430FG461x series experimental board. This little experimental board has all the bells and whistles one may need to create any application from a home automation controller to a simple step-motor driver. TI provides very good documentation for this grown up toy.

Our first lab homework for this baby was :

By using the MSP430 FG4618 Microcontroller, write a program that controls the LED #1, #2,#4.When we perpetually push the two buttons at the right bottom corner of the board, all ofthe LEDs turn on.When we push perpetually one of the buttons, only the LED #4 blinks, the others turn off.When we push no buttons, the LED #1 and #2 blinks complementarily and the LED#4 turnsoff.

My biggest problem with this exercise was to find what led was connected to what port. However in the end I figured it all out.

Below you will find the program :

 

 

Plotting and finding the magnitude of a wav file in MATLAB[edited]

Edited: Changed code to a more correct version!
The question was;

Load the file sound1.wav(Download from here => SoundWav (679) ) (You would use MATLAB command ‘wavread’ to loadthis file. Use MATLAB help to learn the usage of ‘wavread’). This file contains a portion of speech waveform. Take the first 512 point the signal, plot the waveformand its magnitude spectrum.