From: Dave H. <dhy...@gm...> - 2006-06-15 23:32:34
|
Hi Nadir, On 6/15/06, Nadir Bagaveyev <na...@sc...> wrote: > Hello Dave. > > for now I'm just trying to understand your I2C.c but here are general questions: > > 1. I've got i2c-Boot-m128-16MHz.hex on robostix, so I don't need anything else, just write .c code for gumstix to control servos and Atmel 0 and 1 right? I'm not sure what you're asking. The bootloader will work fine by itself. You can choose to use integrate with the i2c code that's already in the bootloader. Look at the robostix/i2c-io.c (which runs on the robostix) as opposed to the robostix/gumstix/i2c-io.c which runs on the gumstix. > 2. Are there any clues in I2C.c or anywhere else on how to do it? Well, you basically need to decide what messages you're going to pass down to the robostix. For i2c-io these are in robostix/Shared/i2c-io.h Then you need to write some code on the robostix side which processes each message. This would be like the ProcessCommand function found in robostix/i2c-io.c. The data for the received packet is found in the packet parameter. The return packet (if any) is also written into the packet parameter, and the number of bytes to return is returned from ProcessCommand. Most commands are Block commands, which means that there is a one byte length followed by the data. Similarly for the replies. Then I'd write a set of api functions (like robostix/gumstix/Sharedi2c-io-api.h/.c which are used on the gumstix side of things. > 3. How is your robot? Coming along slowly. I have a few pics over here: http://www.davehylands.com/Robotics/Orion/ -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |