pheo 7 Posted June 7, 2011 Share Posted June 7, 2011 My first forum post, i'd like to help out anyone trying to use the USCI module for hardware UART. First, some background: I'm running the Launchpad with a msp430g2553. This chip is very full featured, comes in PDIP-20 compatible with the Launchpad, and if you're lucky, TI will send you a sample. See the datasheet: http://focus.ti.com/docs/prod/folders/print/msp430g2553.html I'm running uniarch msp430-gcc-4.5.2, which is the awesome alpha release. For a nice how-to-compile link, try: http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Devel:UniarchGit This worked well for me on Fedora, as does the new gcc. Check out the bleeding edge mspdebug from git for full debugger support as well: http://mspdebug.sourceforge.net With the right devel packages, this guy works like a charm with the g2553. Well, the g2553 has the TX/RX pins for the USCI module flipped from the Launchpad TX/RX headers! So how can that be fixed? I didn't have any tools or hardware to correct the problem. Just some wire and a soldering pencil. Why not just the hardware from the Launchpad? It has extra jumpers for the LED's and a strip of male pin headers. (i used the female headers). See the attached image. I plan on using HW UART to act a transceiver. For my next project, i'd like to be able to send/receive data to/from the Launchpad so that it can use it in a second stage of sending/receiving. Since i've gotten the code for the first stage working, i think the place i am at could serve as a big leg up to anyone working on a project that needs to be "remote controlled" in a complex way. Now for the code: The flow of the program is as follows 1. Setup the button on the launchpad. i do this, because otherwise the LP will start spewing characters over serial and this breaks my ttyACM0. Im not sure why, but the driver doesn't seem to like 2. After the button is pressed, setup the USCI module. I'm using 32.768 kHz ACLK as the clock source, UART mode, at 9600 baud 3. Spew out the alphabet in a loop. 3.1. During the main loop, the receive interrupt will write down what it got into a variable, conveniently named 'variable'. Hopefully this will help someone out. There's a lot more to be done. This is just a nice guidepost on the way. Cheers EDIT: Found a bug Makefile.txt main.c fj604, Rickta59, jsolarski and 1 other 4 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.