
OLIMEX© 2015
MOD-IO2 user's manual
2.4 Firmware description and basic usage under Linux
There is firmware loaded on the PIC of the board that allows easier use of MOD-IO2 via I2C
protocol. The firmware of MOD-IO2 has gone through several iterations. The latest firmware
revision is revision 3.02.
To use the firmware with not-Linux enabled host boards please refer to the README.txt in the
archive that contains the firmware sources.
Firmware revisions 1, 2, and 3 are compatible. These firmware revisions define different MOD-IO2
board addresses and different command set. Firmware revisions 3, 3.1, and 3.02 (3.xx) are
compatible.
Please note that the custom firmware does NOT support all of the hardware capabilities of MOD-
IO2. In some cases you might need to to adapt the firmware to use the hardware of MOD-IO2 to its
full potential!
2.4.1 Custom software tool for controlling MOD-IO2 under Linux
To make the things even simpler we have written a software tool for controlling MOD-IO2 under
Linux. You might find it here:
https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/UEXT
%20MODULES/MOD-IO2/linux-access-tool
This software tool requires a Linux-enabled board. The tool works with MOD-IO2 units loaded
with firmware revision 3 or newer. For full compatibility with the custom software tool, your MOD-
IO2 board needs to use firmware revision 3.02 or newer. To use the tool simply place file
“modio2tool” on your board. Navigate to the folder where you placed it and type "./modio2tool -h"
to get help on all of the available commands.
Most of the commands require the hardware I2C number as defined in your Linux distribution with
parameter -B X, where X is the number of the I2C interface. Note that by default the software is set
for use with hardware I2C interface #2 and board ID 0x21 – if your setup has different you would
need to specify every time by using -B X (X is the hardware I2C number) and -A 0xXX(XX is the
I2C address of the module).
Some examples for the usage of modio2tool and MOD-IO2 in Linux:
- Bringing up the help menu:
./modio2tool -h
,where
./modio2tool – executes the binary
-h
– parameter used to request the help information
Expected result: the format of commands would be shown and a list of commands would be printed.
Page 8 of 28