Implementation of pulse-width modulation on MSP430