Jump to content

LaunchPad as UART level shifter

Recommended Posts

Has anyone ever used their LaunchPad as a tool to quickly hook up some external UART module (such as the XBee WiFi) to a PC? I tried just plugging the data out from the XBee to the TXD of the LaunchPad with a MSP430G2553 chip and the following code to disable the MSP430 and allow me to just pass-through:


void main(void)
// Stop watchdog

P1DIR = 0;
P2DIR = 0;
while (1);	


Didn't seem to work though. Any advice or remarks?


EDIT: Aw, what the heck. Let's tell you what I'm up to and see if I'm on the right track. So I got an XBee WiFi module but didn't buy their whole development kit (overpriced and way more gear than I need). So I want to hook up the XBee through a UART to my PC. I thought the LaunchPad must be doing some level-shifting to TTL levels from 3.3V and so that I should hook the XBee up through the LaunchPad's TXD/RXD pins.

Link to post
Share on other sites

I don't think the MSP430 would be causing any problems at the moment, do you? If its not in peripheral mode, and the lines are set as inputs they would be free to do as they like. I tried putting it in LPM4 anyways as you suggested but no change.


On a side note, I just probed the lines and realized TXD and RXD come in 5.5V from the PC....That's odd ain't it? They are reading 5.5V all the time. I thought the MSP430 did 3.3V UART as I am fairly certain the XBee attempts to do since it's powered at around that.


Here's a quote from its manual:

Through its serial ports, the module can communicate with any logic and voltage compatible UART or SPI; or through a level translator to any serial device (for example: through a RS-232 or USB interface board).
Link to post
Share on other sites

This turned out to be a good idea. I don't have one of the Xbee units, but I tested it with a bluetooth module I have been tinkering with. Turns out to be a good way to make a bluetooth serial port. It didn't seem to make a difference whether the cpu was off or not. I could connect it to the ezFet TXD/RXD with no issues. It also worked connecting directly to P1.1 & P1.2.

Link to post
Share on other sites

You might also consider using a clone Nokia CA-42 usb-to-serial adapter cable ($2.68, including shipping, from China) which uses the Prolific PL-2303 USB IC (3.3-5.0v serial I/O levels).




I cut off the connector on the cell phone end of the adapter and install a 3.5mm stereo plug with Tx, Rx, and ground connections. Then I install a 3.5mm stereo jack on my project boards. This provides simple and inexpensive USB connectivity for everything from the smallest 6-pin PIC10F200 projects on up to my MSP430 Iambic Keyer project (with no USB software overhead).


Regards, Mike

Link to post
Share on other sites
  • 3 weeks later...

maximum baud rate supported by the launchpad is 9600.


i am using a ca-42 - cable like above - works just fine for me with win 7 64bit ;)


there are often problems with "prolific"-chips from chinese resellers - they are marked as prolific - BUT THE CHIPS OFTEN ARENT REAL PROLIFIC CHIPS !!!


i can get up to 128.000 baud with my ca42 ;)


i dont understand why no one sells a usb-to-uart chip in DIL-package ... for hobbiests like us it would be very nice - we just need 6 pins - power, gnd, d+, d-, tx, rx ... but i only find oversized smd-packages =/

Link to post
Share on other sites

Because you can't beat this plugged in to a breadboard (via the long double male headers) or plugged in to a board via the normal female header connectors.


There's a lot more to FTDI than just being an USB-UART bridge. It is a generic GPIO engine, which, apart from being an USB-UART bridge, can be bit-banged into a whole lot of everything with relative ease, using the FTDI-supplied libraries or libftdi. Also, 128k... peanuts? :).


Try this (further down this) with an PL2303 :).


I too used to think all of them are created equal. Then I bought an FTDI... :).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...