MSP430 LaunchPad: my 9600 Baud Serial Connection

I wanted to create a 9600 asynchronous serial connection with my TI LaunchPad.
I started my development from the source code of the example program that I found in it (temp. sensor with serial connection and leds modulation) but I wanted three more things: a faster link (9600 which is four times greater), a mspgcc4 compatibility (the free-software compiler that I’m using) and a CPU working at 16 MHz (instead of 1 MHz of the example).

The task is not very difficult and I carried it in a completely free environment (Ubuntu + MSPGCC + mspDebug).
Continue reading