Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
You may want to take a look at AVRx, a Real Time Multitasking Kernel for AVR micros, by Larry Barello.Here is the link:http://www.barello.net/avrx/index.htm
do { endTime = millisecondClockValue + CYCLE_TIME; heartbeatExecute (); edgeTest (); rangeFinderGet (); nearIrDetect (); fsmExecute (); do {} while (millisecondClockValue < endTime);} while (TRUE);
The problem is one of timing. Many sensors require very precise timing, and being interrupted in the middle of measuring stuff can throw it off enough to be useless.
A fast processor running many different processes will eventually run slow. How would you interface say a sharp ir distance finder with the limited ports?If you interface it through a usb to serial to mcu (for pin control) then you are also losing time through communications protocols.
Quote from: paulstreats on December 02, 2007, 06:42:47 PMA fast processor running many different processes will eventually run slow. How would you interface say a sharp ir distance finder with the limited ports?If you interface it through a usb to serial to mcu (for pin control) then you are also losing time through communications protocols.A properly done complex system is a combination of high level processors for doing the complex stuff, and low level processors for interfacing to hardware.I'll use BrainBot as an example, since I built it and am familiar with these aspects of it. For high level work we've got a PC, which is connected to the robot over a wifi link. Onboard the robot is a gumstix, which acts as an interface between the wifi connection and the Bioloid bus. The bus is the interesting part of the equation - it allows you to hang a large number of smart devices (sensors and actuators) together, and provides a pretty decent communications protocol to go along with it. On the tracked version of BrainBot, we've got around 14 servo devices on the bus, along with a six-axis IMU, a couple pressure sensor interface boards (for the gripper touch sensors), and a motor drive board.I could plug in half a dozen Sharp GP2D12 analog IR rangefinders into the motor drive board without changing a single thing about the hardware and software on the embedded side, and that information would become available on the PC with a tiny change to what it asks for. Having a small amount of latency is not a bad thing - the sensors themselves have a large amount of latency, only updating their state every 40 ms or so.Anyways, it is doable, but it takes a lot of planning and development work to get there...- Jon