Friday, October 06, 2006

Update for October 05, 2006

Well on the physical front things aren’t so good. I have had chronic back issues (muscle spasms) ever since 7th grade (maybe even before) where I am somewhat debilitated and unable to stand. Yesterday I woke and was not able to stand up without a lot of pain. It’s hard to concentrate when you have a constant pain in your lower back so I stayed home from work.

On the robotic front I made huge strides. The spasms are weird in that the come and go in spurts (Ibuprofen helps to relax the muscles). When I felt a relaxation I went into my computer room to work on playing with AVRLib. Specifically, I wired up serial communication to a serial LCD and servo control.

Serial LCD:
This was cake to wire as the MAVRIC has screw headers from the Maxim 232 chip. The serial LCD from http://www.crystalfontz.com/ can take level shifted 232 or TTL 232. So I enabled the onboard RS232 pullups (via the dip switches) and gave it a try. It worked, but needed some tweaking to allow the LCD to init before sending any text. It would be nice to have a bigger LCD (4 line, 20 chars but anything is better than nothing).

Servos:
Now this was a PITA. Long story short, I already knew to change timer.h to timer128.h to accommodate the Mega128 device. However, I also had to modify the makefile to do the same thing. I had a 3 hour debug session wherein I dragged out my O-scope to watch the pin transition. After I got one working, adding more was cake. The AVRLib allows you to control up to 8 (any port, any pin) servos simultaneously by using the 16-bit timer/counter. Seemed a bit jerky, but that’s probably due to my adding printf statement to show the position of the servo before updating it to the next value.

I also made a mounting board for the LCD, MAVRIC, and servos. What I’ve learned thus far is I need to add two toggle switches. One for the power to the MAVRIC as there is no reset switch and 1 for the servo power. Come to think of it adding 1 more for the drive motors would be a good idea too.



You can see the MAVRIC, serial LCD, two micro servos,
my wire wrapping connections for the servos, oneof
the RC battery packs, and the Ecro ICE Cube JTAG unit.


Onward,
Jay