Running Risc OS on the Beagleboard XM and making the most of the board's wealth of GPIO lines
The Beagleboard and Beagle XM offer large numbers
of general purpose input/output lines (GPIO) that are ideal for computer control purposes.
Risc OS users can access these with a few lines of code written in Arm Basic V, with no obscure drivers required.
As the GPIO lines are memory mapped, bits can be read or set directly in the Arm processor's registers, making the whole operation quick, simple and transparent.
The picture at left shows 22 pins of the Aux GPIO socket controlled by Risc OS Basic V.
In this case the lines have simply been programmed to 'chase' LEDs back and forth for a fun Knightrider-style display and to demonstrate some I/O activity, but they could almost as easily be driving stepper motors and relays while monitoring sensors and feedback devices.
The diagram above shows how I wired 22, 3mm red LEDs to the Aux port lines. Optional current limiting resistors are included, but I didn't find they were necessary with my board. You may even find that, at 3v, your LEDs hardly light up at all with resistors present. The alternating red/blue colours of the wires has no special significance - I just thought they'd make it easier to trace the connections.
The I/O lines operate at 3v, so a level-shifting chip (such as the MAX3002) is normally required to drive conventional 5v logic, but such chips are cheap and readily available.
In this case however, it was found that low-power LEDs are happy to be driven directly by the 3 volt lines and the XM seems happy to source the current.
As the board was powered by a generous 2A power supply, no special interfacing was needed - the lines deliver just sufficient current at 3v to light the LEDs. Watch the light-chaser prog running in the YouTube video on the right.
(Non-Flash browsers will find it here.)