/Launchpad_Rev1p5

Software UART example for MSP430 using mps430-gcc on Linux

Primary LanguageApacheConfGNU General Public License v3.0GPL-3.0

Software UART example for MSP430 using mps430-gcc on Linux  
sw@kaltpost.de
http://gpio.kaltpost.de/

The original code is taken form Nicholas J. Conn example:

http://www.msp430launchpad.com/2010/08/half-duplex-software-uart-on-launchpad.html

Origial Description from Nicholas:

Half Duplex Software UART on the LaunchPad

Description: This code provides a simple Bi-Directional Half Duplex Software UART. The timing is dependant on SMCLK, which is set to 1MHz. The transmit function is based off of the example code provided by TI with the LaunchPad.  This code was originally created for "NJC's MSP430 LaunchPad Blog".

Includes also improvements from Joby Taffey and fixes from Colin Funnell as posted here:

http://blog.hodgepig.org/tag/msp430/


Introduction
------------

This example shows how to use software UART on the TI Launchpad with a MSP430G2231 MCU (which does NOT have a hardware UART). With the code from Nicholas J. Conn, Joby Taffey and Colin Funnell I was able to create a half-way-decent software UART. Thanks Nicholas, Joby and Colin! So basically my job only was puzzeling things togehter and wrap them in a msp460-gcc project.

I am not going into detail about how it works, since Nicholas already did a great job doing that :-):

http://www.msp430launchpad.com/2010/08/half-duplex-software-uart-on-launchpad.html


Compilation
------------

Note: This project is written for msp430-gcc on Linux (I used v4.5.3 which is available as package on ubuntu). For flashing the "mspdebug" tool was used (also from the Ubuntu package).

To compile the source just issue a:

make

This builds the firmware in the "bin" subdirectory in various formats.


Doxygen Docs
------------

If you installed doxygen on your system, you could generate the HTML-based documentation by calling:

make gen-docs

This will create the documentation under "doc/gen/html".


Flashing
------------

To flash the firmware to your Launchpad you could use the "flash-target" make target:

make flash-target


Usage
------------

Connecting your Launchpad should give you a new serial device "/dev/ttyACM0". Connect to this port at 9600 bauds - e.g. by using screen:

screen /dev/ttyACM0 9600

Every character you type will be echoed then, surrounded by square brackets.