2

Servo controller board. Complete?

Posted by Chris on Friday, August 07, 2009 in , , , ,
After a few problems at the RobotBrighton Demo (the least of which was not being able to get the board to work properly!) things were looking bleak for the multiple USB servo controller.

It didn't matter what sequence of bytes the online editor spat out, they could never be sent (and read back) from eeprom consistently.
Sometimes bytes were missing, sometimes byte values were changed for others, and sometimes, the bytes read back looked nothing like those that were supposedly written to the device!

It turns out that the problem was a timing issue, between the MCU and the eeprom.
You see, the processor is running at 20Mhz, whereas the eeprom can only manage a measly 400khz (yes, khz) at best. This obviously leads to timing issues, particularly when writing to eeprom.

Finding the exact cause of the problem was a nightmare, particularly with a demo that was running late (and looking quite likely to not happen at all). Luckily, the problem was easily resolved by added a 5ms delay after writing each 4-byte chunk to memory. So now the board works just fine.

Which is just as well, otherwise it would mean that this last week would have been wasted, as most of it has been spent perfecting the Flash-based servo editor interface



This spanky editor allows you to control up to twelve separate servos using a simple click-n-drag interface. It uses a double-linked list to keep track of each of the graph points, allowing them to be dragged around and their position within the horizontal timeline to be altered quickly and easily. As each point of the graph is dropped into its new location, the graph is redrawn quickly without the need for popping and pushing array elements around the place. Linked lists are perfect for when you need an array of items that could regularly change place within a list.

2 Comments


have you use ATmega16 mikrokontroller by ATMEL?


The controller is a PIC18F2455 with built-in USB support. We work (almost) exclusively with PIC mcus because of the tool-chains we have here.

Post a Comment

whos.amung.us

Copyright © 2009 .Nerd Club All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive Supported by Blogger Templates.