Getting back in the saddle with my PIC and related toys

I'd read several articles that referenced data logging for model rocketry which I found really cool and interesting. I thought: Hey - I've got some accelerometers, PIC micros and other assorted uC detritus - I can do this!

I went to my electronics bench noted the dust on everything - I need to spend more time here!. I grabbed one of my PIC development boards and a 2D accelerometer (DE-ACCM2G).

I've never used the DE-ACCM2G before so I grabbed the manual and realized it was easy to wire up - software would be where the effort was.

About this point I realized that I didn't have any way of displaying, or communicating, the values. No problem - I was in the "Mystery Box" challenge a couple of years ago at DEFCON and we got to keep the hardware (Thanks LoST!!!). I dug out the 2x16 LCD, hacked off one end of the cable, attached pins, added a bit of heat shrink tubing and had my display.

Now I needed to output anything to the display. I had all sorts of trouble getting the PICaxe to send "Hello World" to the display - it was always dropping characters etc. Here's the code that didn't work:

high 7
pause 100
serout 7,T2400_4,("Hello World")

do
toggle 0
pause 1000
loop

After spending way too much time trying to figure out if I had initialized the display correctly (shouldn't have needed anything more than a delay) I figured I'd try using the hardware serial port - Worked like a charm on the first try. Here's the code for that:

high portc 6
pause 100
HSERSETUP B2400_4, %00

do
toggle 0
hserout 0,("Hello World")

pause 1000
loop

Next task is to sample the accelerometer and print the X & Y values on the display. I guess when I use the 3D accelerometer I'll need a bigger display;)