# GPS Data logger using MSP430

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.

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:

http://blog.hodgepig.org/2010/09/10/575/

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.

• 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. – markrages Nov 26 '10 at 22:40
• @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 – Toby Jaffey Nov 26 '10 at 23:02
• @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. – Kortuk Nov 26 '10 at 23:26
• 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. – 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.

• which one would you recommend that works with the Launchpad kit? – Dave Mar 23 '11 at 15:15