From: Dave H. <dhy...@gm...> - 2007-06-16 05:50:54
|
Hi, > I've done some research on GPIO and so far it looks like its either a PC > peripheral (some websites show it as an ISA card) or its the serial > port/parallel port configured to work in GPIO mode. On gumstix, how do I > software activate and physically wire a GPIO to control an external > device? The link you gave me is useful once i've actually located the > GPIO connections. Is this a special expansion board for Gumstix or is it > a mode of the Gumstix serial port outputs? If it is a mode of the serial > port outputs, how many output pins can be accessed and how can they be > programmed? Almost every pin can be programmed to be a GPIO pin or perform a regular function. Chapter 4 of the PXA255 Developer's Manual shows the various functions each pin can have (for the connex): <http://pubs.gumstix.com/documents/PXA%20Documentation/PXA255/> For the verdex it's in Chapter 24 of the PXA270 Developer's Manual: <http://pubs.gumstix.com/documents/PXA%20Documentation/PXA270/> Most of the 60-pin daughtercards have various pins available which can be used as GPIO pins. For example, with the console-st has 20 pins on the back. One of those pins is LDD02, which corresponds to GPIO-60. You can also see the mapping on the "Charts" on this page: <http://docswiki.gumstix.com/Gumstix_motherboard_I/O> You can manually manipulate the GPIO pin by using: modprobe proc_gpio echO "GPIO out set" > /proc/gpio/GPIO60 echo "GPIO out clear" > /proc/gpio/GPIO60 set corresponds to the pin being at 3.3v and clear corresponds to the pin being at 0v. WARNING: DO NOT connect a GPIO pin directly to a device like a relay. You will most likely damage your gumstix. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |