About Buy News Guide Ideas
The phatIO project has finished, and I'm no longer selling ready made boards - but you're welcome to look around - send any questions to the email below

#phatIO Guide

These pages are not complete and being updated regulararly. email or ask on the forum if you have questions that aren’t covered here.

Both the hardware and firmware for phatIO is Open Source.

phatIO is a computer IO (Input/Output) device which allows any computer that can write to files on a USB thumbdrive to interact with the real world.

This guide describes phatIO functionality and how to use it. New users should read this page and then the following.

phatIOs connections

On one side of phatIO is a USB Mini-B Connector to connect to a host computer, on the other a 28 pin socket.

The phatIO device
The phatIO device

phatIO exposes 5V, 3.3V and GND (0V) for powering external circuits and 20 general purpose 5 Volt IO pins numbered 0 through 19. More details can be read on the hardware page. A sticker is supplied to label the IO pins when used in prototyping or on a Breadboard.

Each pin can be used for digital input and output, 12 of the pins can be also be used for reading an analog input and 5 for PWM output.

There’s a detailed section about the different types of IO that can be done.

phatIO’s filesystem

Once connected to your computer phatIO should appear as a filesystem (the exact name and location will depend on your computer). The phatIO filesystem has the following contents:

the phatIO system: phatIO’s behaviour depends on the contents and structure of this directory, don’t move, create, or delete files in here except as described in this guide
Contains a file for each of the phatIO IO pins (0 through 19). This value of each of the mode files will determine the mode of each pin. More details in the Basic IO
Contains a file for each of the phatIO IO pins. The value of this file depends on the mode: if the pins mode file contents is “OUT” then saving a value of “1” to the pin file will turn on the corresponding pin (connecting it to 5V), saving a value of 0 will turn it off. More details in the Basic IO
the phatIO status file, can be read to view any errors
Directory containing the boot file. When phatIO starts it looks to see if an updated version of the operating software is located in this directory, if so it will load it and restart. More details in Updating phatIO
the LIO run fil: This contains configuration to extend phatIO, described below and explained in LIO section
Contains device files defined in run.lio. Devices allow more complex devices - displays interfaced with TWI or SPI can be controlled by writing the data to display to their device file (see example). Devices files are described in the devices section. There are several examples in the Ideas section that use devices
Contains informational files - mostly static text files.

###Caching One issue with acting as a filesystem is that operating systems will often cache its content to improve performance. This means that once it’s read a phatIO file it doesn’t expect the contents to change on the device. This has most effect on reading the values of the “pins/*” files when the pin is acting as an input (both digital and analog). Often the OS will cache the contents of the file so phatIO won’t be queried again.

Systems like linux can be told to destroy the cache and reread the contents of the file, but phatIO also provides a condition mechanism that allows something to be done when the analog/digital inputs change. An output pin could be set high to light an LED if the analog input on a pin goes above a specific value, or if a switch is pressed phatIO could simulate someone pressing a sequence of keys on a keyboard. Conditions are described in the guide.

##Extension As well as mapping single IO pins to files, phatIO provides a mechanism to add Unix like Device files. This allows a more complex or multipin device (a display, or chip for example) to be accessed through a file.

For example, a 4 digit 7-segment display, could be controlled by writing the number to display in text (“1234”, “8000” etc.) to its device file, with the phatIO device converting the text and controlling the display. The capabilities are limited at the present - this area is in active development.

Any heavy lifting should be done on your host computer with phatIO being used for interfacing. More details are described in the LIO section. There are also several examples showing devices files being used in the Ideas section.

As well as its own 20 IO pins, phatIO has been designed to be physically extended, in particular the bottom 14 pins are intended to be used for connecting extension boards, with both SPI and TWI (I2C) buses available. See the hardware section for more details.

@Contact  |   Legal & Privacy  |    RSS  |   Development Twitter  |   Official Twitter
© phatIO 2012, All Rights Reserved.