Key Features

Making due with limited pins on the LaunchPad
The MSP430G2553's limited pin count forced me to use Timer A1 for both IR capture (on P2.5/TA1CCR2) and right motor PWM. IR capture requires continuous mode to measure millisecond-long pulses, preventing the use of standard hardware PWM which needs up mode. I solved this by implementing software PWM using a "moving target" technique - a CCR0 interrupt periodically toggles the output and advances the period base while the timer runs continuously.
Goals and Motivation
I wanted to learn even more how to do bare metal programming on a simple microcontroller.
#ti
#msp430
#c