Skip to content

Serial Communication

thejbw edited this page Jul 18, 2012 · 10 revisions

Overview

This guide will help you get started with serial communication on your Launchpad under Energia.
It is important to note that there are several revisions of the Launchpad in the wild. Only the latest version (1.5) ships with a hardware UART (serial port). If you have a revision 1.5 board in hand, it is usually a good idea to enable the hardware UART, as it will improve performance versus a software UART. The hardware UART also allows the Arduino serial library to be used normally (meaning less work to port your code to the 430)!

Hardware Configuration

If your Launchpad is version 1.4 or earlier, there is no hardware UART and thus, no hardware configuration is necessary, but you must use the SoftwareSerial library included in Energia to communicate over the serial port. Unfortunately, software serial communication will use more CPU cycles than the hardware option. With that in mind, if you are coming from the Arduino world, it might be worth the cost to obtain a 1.5 or later Launchpad.
If your Launchpad is version 1.5 it will be labeled "MSP-EXP430G2" with the text "Rev 1.5" in smaller type immediately below, as pictured. In order to enable the Hardware UART on the launchpad, you must manually change the jumper positions to match those pictured below.

The Launchpad 1.5 ships with the jumpers in their default position (software UART only) to mimic the behavior of earlier revisions of the Launchpad. By rotating the jumpers, you can use the Arduino Serial Library normally, although the on board Launchpad USB to serial bridge is limited to 9600 baud, as opposed to the higher baud rates available on recent Arduino boards like as the Uno.

Software Configuration

For hardware UART users, the configuration is extremely simple -- it behaves exactly the same as on the Arduino platform.

Clone this wiki locally