From: Dave H. <dhy...@gm...> - 2008-01-24 02:06:41
|
Hi Shawn, > This is in addition to my previous question concerning desiring two > expansion ports on a single XM4-BT. The problem is we have an inertial > measurement unit called the 3DM-GX1 which has a refresh rate of about 100 hz > and communicates serially through rs-232. > > 1) Assuming we levelshifted the serial connections on the robostix to > correspond with rs-232 levels, would the robostix be sufficient to parse the > information quick enough perform so calculations and drive 4 PWM channels? I suspect so. It depends on whether you need to do floating point calcs and stuff. I've used the robostix serial ports at 1 megabit/sec. > 2) We wanted the XM4-BT to ease some of the processing on the robostix. This > leads to the question if the robostix is directly attached to the > motherboard (through 60-pin connector) can the motherboard directly read the > rs-232 signals coming from the 3DM-GX1 or would these signals need to go > through the ATmega on the robostix board? The robostix actually exposes 4 serial ports, two from the gumstix (FFUART and STUART), and two from the ATMega128 on the robostix (UART-0 and UART-1). The two gumstix serial ports are logic-level ports, so you may need voltage converters to use them. So you can still use the robostix and connect your 3DM-GX1 to the gumstix through the STUART port. > 3) If the robostix is connected to the XM4-BT can the XM4-BT drives the > components (PWM etc) of the robostix board? Not directly. The gumstix can talk to the robostix over SPI or I2C, and the robostix actually drives the signals. Note that the i2c bus is a little slow, only 100 kHz, (although it's possible to bump it to 400 kHz). If the commands are packaged properly, you should have no issues. The servos only update their position once every 20 msec, which means you can transfer 2000 bits of information per servo update period. I wrote a sample program called i2c-io which has a program on the gumstix talking to a program on the robostix over i2c. The gumstix can manipulate all of the registers on the robostix. There is also a script called servo in the robostix/gumstix/i2c-io directory which shows this API in use, allowing servos connected to the gumstix to be manipulated from the gumstix command line. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |