From DEW - Daniel's Electronic Wiki
Jump to: navigation, search

MSP430 Hardware UART - library

Here you can find library for simple two way RS232.
Communication is done by USCI (hardware of MSP430)
Library includes 'printf()' function which can be very useful.
Procedures are written for MSP430G2553



To use this library you need only to attach 'hw_uart.h' file in your project.
In this file you need to set TIME430_CLOCK_MHZ this is value of MCU clock.
Optionaly you can change communication baudrate by setting HW_UART_BAUDRATE (default is 500000)
With this library is provided very simple 'RS232_helloworld' project with echo mode.


  • uartInit() - function that initializes USCI
  • cls() - function that clears output, puts cursor to position 0,0 and disables cursor
  • void my_printf(char *format, ...) - this is function used to print different formats like:

      char, string, signed and unsigned integer and long, 8 and 16 bit heXadecimal, float


For this library I have used some functions and solutions found in Internet.
Unfortunately I do not remember any source of it. So if you thing that I have used
some part of your design please let me know and I will put here adequate information.

Source code

Source code for 'Hardware UART library' you can download from my SVN (login,pass: svn_read):

BASH code
svn --username svn_read --password svn_read co


XX.XX.2015 - __________

Nothing reported yet.


10.01.2015 - Version 1.0 (SVN rev. 1)

First version relased

You must be logged in to add comments