I love the idea of the GPS Logger 2.4 kit. However, along with logging, I would like to be able to have more outputs on this thing, so, for example, I can connect it to a computer to see myself on a map, or a digital camera to record position information on the EXIF data. I figured if I have extra outputs it can go about its business of logging away into the SD card—in other words, during a road trip, I want this thing on 100% of the time so I have a record of where I went, but if I get lost and need to see a map or want to take a picture to document something, I don’t want to buy a second GPS unit.
So there are two ways I thought of doing this. One is to buy the programmer, and change the firmware so that as the messages are logged they are also relayed to some unused serial port(s) on the microcontroller. So the question is:
Does this board expose any of the serial ports on the microcontroller, or does this solution require me to solder tiny wires to tiny pins?
The other option I thought of is to simply splice off the transmit lines of the GPS module itself, and run those to either another microcontroller or straight to a level converter (for TTL/RS232 depending on what I need that output for). So the question is:
If I just splice out from the transmit line, can I have several outputs in parallel as long as the impedances are high enough that the voltage doesn’t drop too much on any single line?
Yes, to your question 1, the board exposes a serial port, you just need to solder a header on, the output levels are TTL. Check out the Spark Fun LPC Boot Loader, for example.
That’s the hardware side done. For the software side, I recommend (naturally!) my own firmware for the 2.4 (see gpslogger.blogspot.com) which supports a serial output mode, to deliver raw, nmea, kml or csv data at a configurable baud rate. I’ve used this successfully for real-time positioning with Microsoft Autoroute and Google Maps/Earth. It doesn’t currently do both serial or file output concurrently, but would be trivial to do so.
Sounds fantastic, thanks for the reply. I will order one now!
I am going to order the programmer from Sparkfun, too—this plugs directly into the board (I don’t need to get the programmer connector header myself), right?
I’ve used AVR studio and AVR-GCC to program using the JTAG ICE MKII (this was before I found Sparkfun). From looking briefly at your docs, it seems your firmware is also in C (though it looks as though you are a Linux guy). Can you recommend a compiler/dev env that I could use with this microcontroller?
pelesl:
…I am going to order the programmer from Sparkfun, too—this plugs directly into the board (I don’t need to get the programmer connector header myself), right?..
Firstly, you need to mount a 6-pin female breakaway header onto the board (as by default, it isn’t provided) to access the serial port. Either buy this from Spark Fun or your local electronics store (as I did).
Secondly, you need a serial interface: just buy the Spark Fun LPC Boot Loader interface. As you can see in the pictures, it has male breakaway header on it, and RS232c on the other side.
Thirdly, if you just want to download new firmware, all you need is the Philips Flash Utility to run from Windows PC.
Fourthly, if you do want to develop, then yes, you need a development environment: I’m not qualified to give a comprehensive answer, but CrossWorks CrossStudio works for me (it helps that I used several years ago for commercial work), but I use it superficially and do all of my development work under FreeBSD - so yes, I’m a UNIX guy :-).
(Aside: for embedded development (which I spent many years of doing commercially) I found the most effective approach is to do the hard work of making a hardware abstraction layer work on the microcontroller, then build an emulator for that HAL on your development host (Windows, UNIX), and from thence onwards, you can do 99% of your work on the development host [faster code/compile/test cycle times], the last 1% consists of loading your image into the microcontroller and running the self-tests.)
Finally, yes the EM-406 is double-sided-taped to the LPC, but you could probably pry it apart easily (I haven’t tried). I don’t think that’s a big issue.
Fourthly, if you do want to develop, then yes, you need a development environment: I’m not qualified to give a comprehensive answer, but CrossWorks CrossStudio works for me (it helps that I used several years ago for commercial work), but I use it superficially and do all of my development work under FreeBSD - so yes, I’m a UNIX guy :-).
I got my hopes up thinking Crossworks was free, but it’s not. My first exposure to microcontrollers was the Atmel AVR and I guess I got too used to having AVR studio for free. I guess it’s about time I relearn about makefiles and such—can you tell me which tools you use in UNIX?
mg: (Aside: for embedded development (which I spent many years of doing commercially) I found the most effective approach is to do the hard work of making a hardware abstraction layer work on the microcontroller, then build an emulator for that HAL on your development host (Windows, UNIX), and from thence onwards, you can do 99% of your work on the development host [faster code/compile/test cycle times], the last 1% consists of loading your image into the microcontroller and running the self-tests.)…
Here’s where the truth comes out: what’s a hardware abstraction layer? What kind of tools are there for doing the emulation? The simple examples in AVR studio show things like code which changes a pin value and then you can go in some window and look to make sure the pin value is in fact changed, but if you’re working with something like the GPS Logger, which has a component sending data serially to the controller—do these emulation tools allow you to generate fake streams to send into the emulated ports?
Yep, you need to buy a license for Crossworks (although you can trial it for 30 days if you just want to do a quick once off change). The personal license, which I use, is affordable (IMHO), but restrict your end-use of the binaries. I’ll probably migrate everything to UNIX at some stage, just haven’t needed to for now. Under UNIX, I use standard make/gcc43/splint plus all your usual build glue - perl, sh, sed, etc :-).
Getting off topic … you can emulate in all sorts of ways (e.g. since access to the micro is with mem read/writes, you could run another thread/process and monitor those mem locations and respond with the desired values). In my case with a HAL, different source code links in for real or emulated cases, e.g.