AaronInSpace 4 Posted October 17, 2011 Share Posted October 17, 2011 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: #include void main(void) { // Stop watchdog WDTCTL = WDTPW + WDTHOLD; 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. bluehash 1 Quote Link to post Share on other sites
gwdeveloper 275 Posted October 17, 2011 Share Posted October 17, 2011 Sounds like a good idea. Did you try putting the cpu in LPM4 to shut it down? AaronInSpace 1 Quote Link to post Share on other sites
AaronInSpace 4 Posted October 17, 2011 Author Share Posted October 17, 2011 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). Quote Link to post Share on other sites
gwdeveloper 275 Posted October 17, 2011 Share Posted October 17, 2011 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. AaronInSpace 1 Quote Link to post Share on other sites
bluehash 1,581 Posted October 17, 2011 Share Posted October 17, 2011 Hmm.. won't disconnecting the two middle jumpers work out of the box? Just connect your zbee to the pc side of the debugger. I like this hack, but looks like we are limited to 9600 AaronInSpace 1 Quote Link to post Share on other sites
Mac 67 Posted October 17, 2011 Share Posted October 17, 2011 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 AaronInSpace 1 Quote Link to post Share on other sites
AaronInSpace 4 Posted October 17, 2011 Author Share Posted October 17, 2011 Well it sounds like you are all saying this should work. I wonder why it won't work for me and my XBee WiFi...maybe a level shifting problem? I just probed my TXD line on the XBee and it is 2.7V or so. Perhaps it doesn't like the 5.5V line levels. Quote Link to post Share on other sites
RobG 1,892 Posted October 17, 2011 Share Posted October 17, 2011 Similarly to what Mac suggested, for about $5 (eBay,) you can get small USB to UART, PL-2303 or CP2102 based modules like the one below. Quote Link to post Share on other sites
rockets4kids 204 Posted October 17, 2011 Share Posted October 17, 2011 PL-2303 dongles can be had super-cheap, but the drivers give lots of people troubles. Dongles with the FTDI chip can save much hair-pulling. AaronInSpace 1 Quote Link to post Share on other sites
gordon 229 Posted October 17, 2011 Share Posted October 17, 2011 Absolutely agree. FTDI does cost more, but the peace of mind that it just works, and will work when you need it most, priceless. That can be somewhat less told about Prolific and much less about CP2102 (speaking of Linux and FreeBSD experience). AaronInSpace 1 Quote Link to post Share on other sites
MattTheGeek 99 Posted November 2, 2011 Share Posted November 2, 2011 I've used a launchpad before to do level shifting and inversion. It works, But watch the baud rate. Quote Link to post Share on other sites
SirZusa 34 Posted November 2, 2011 Share Posted November 2, 2011 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 =/ Quote Link to post Share on other sites
gordon 229 Posted November 2, 2011 Share Posted November 2, 2011 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... . Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.