Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
Having discussed my serial communication issues on AVRFreaks I’ve decided that I need a new design for the servo controller.
My current design is very successful in doing what I set out to do, which was to give priority to the PWM generation aspect of the code.
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
I posted a question about my serial communications issues over on AVRFreaks and so far the answers have been pointing in the direction of including some form of formalised flow control. This makes sense. I’ve yet to decide if hardware flow control in a RTS/CTS form or software flow control such as Xon/Xoff would be best…
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
I’ve just spent a while tracking down a but which ended up being in my PC based control software rather than in the serial servo controller firmware.
The symptoms of the problem were that my servo controller would suddenly to process random, poorly formed commands.
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
I was looking for information to help me decide which servos to buy for the legs; wondering about torque and cost and whatever when I followed a link to the Lynxmotion site and came across the documentation for their SSC 32 servo controller.
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
Some of the new commands that I have planned for the servo controller will require that I load and save persistent settings from the ATMega’s eeprom. Having spent a little time looking at the example code in the datasheets it seems that you have to disable interrupts to safely read and write the eeprom.
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
This is the source code for the latest version of the 64 channel servo controller as detailed here.
This is an ATMega168 version of the controller that was originally developed for the ATtiny2313 but which was ported to the ATMega when I ran out of memory on the ATtiny.
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
The new 64 channel ATMega168 serial servo controller accepts the following commands. All successful commands are echoed back. Parameters are validated and errors are indicated with an error response of [0xFF] [badParamIndex] [Command echo] where badParamIndex is a 1 based index of the parameters in the command and indicates which parameter failed validation.
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
Due to work pressure and then holidays and then more work pressure I had to take a break from the servo controller for a couple of weeks. Most of the code changes that I had previously been discussing have been implemented and I’m now in the process of testing an ATMega168 version of the 64 channel servo controller complete with new style commands!
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
The new functionality in my servo control takes more memory to implement due to the more complex state that we need to maintain for each servo. The simple controller could support up to 64 PWM channels on the ATTiny2313, the more advanced controller can, at the present stage of the design, support around 15.
Previously published
This article was previously published on lhexapod.com as part of my journey of discovery into robotics and embedded assembly programming. A full index of these articles can be found here.
So far the servo controller development has been reasonably straight forward; once various design issues were considered and once I’d got my head around building the hardware and learning AVR assembly language. However I expect that my assembly code has many novice mistakes and that it’s probably not especially idiomatic.