I'd like to make a GPS logger. I've got a GPS from Microsoft Streets and Trips. I read that it communicates at 4800 baud over RS232 at 3.3 or 5v. I've got an MSP430G2231 from the launchpad kit and I'm a bit fuzzy on how to talk RS232 to this thing. I also want to write to an SD card, preferably to a file so I can pull the data off with a computer. The raw NMEA strings are fine, I can parse those on the computer. The more detail the better. Thanks.


The MSP430G2231 doesn't have a hardware UART. The best option is to use a timer to clock your bits in and out.

Here's a good example of how to do this: http://www.msp430launchpad.com/2010/08/half-duplex-software-uart-on-launchpad.html

Wire your GPS to TX, RX and GND on your Launchpad board.

Writing to an SD card is more tricky. SD cards talk a protocol on top of SPI. I've written a Bus-Pirate-like SPI explorer for the MSP430 which should get you some of the way there:


On top of the SPI code you'll also need an SD card driver and a filesystem driver (likely FAT if you want Windows compatability). You could simplify things by writing raw data to the SD card - though this will make it harder to read at the Windows end. Linux could read it with dd.

| improve this answer | |
  • \$\begingroup\$ The MSP430G2231 has only 128 bytes RAM. All the SD+FAT libraries I've seen need at least 512 bytes. So you'll want a better processor. \$\endgroup\$ – markrages Nov 26 '10 at 22:40
  • \$\begingroup\$ @markrages That'll be because SD cards have a flash page size of 512 bytes. But, I'm sure it would be possible with some thought \$\endgroup\$ – Toby Jaffey Nov 26 '10 at 23:02
  • 2
    \$\begingroup\$ @Markrages, I think it can be done with 128, it is just a much larger development time on the poor engineers. If only a couple devices will be sold, you are better off getting better hardware, but if it is going to be 1 million devices, the engineering is cheaper. I think you both know that, but no harm in writing down for others. \$\endgroup\$ – Kortuk Nov 26 '10 at 23:26
  • \$\begingroup\$ This sounds like a good solution. I think as long as I don't use fat and use dd to get the data off we can keep the program size down. I was hoping to write to a file, but it's not critical. \$\endgroup\$ – Matt Williamson Nov 27 '10 at 22:33

I'd choose a different chip, with a UART. A software UART can be implemented on that chip, of course.

| improve this answer | |
  • \$\begingroup\$ which one would you recommend that works with the Launchpad kit? \$\endgroup\$ – Dave Mar 23 '11 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.