« Return to Thread: GPIO on consoleLCD-VX

Re: GPIO on consoleLCD-VX

by Edward Y :: Rate this Message:

Reply to Author | View in Thread

Hi Dave,


I can light a LED which is connected to GPIO13 (X_MOST) and the GND right above it.

The LED blinks when I do echo "GPIO out set" > /proc/gpio/GPIO13.

Is blinking the right behavior for my LED?

I'm would like to attach a buzzer and a LED so that they function as status indicators for my gumstix.

Do you have any suggestion?


Thanks
Edward



Dave Hylands wrote:
Hi,

>     I got the LCD gum pack a while back and have been happily
> playing about with it and picking up bits of info from this list. I
> am however at a loss trying to work out how you interface to the
> GPIO on the console LCD-vx.
>
> I'm not sure what I want to do but it's a learning experience so
> if I could even connect a LED to the system and light it that
> would be a start. Ideally I'd like to connect a temperature sensor
> but perhaps I should forget the A/D stuff until I can light a led
> and maybe "read" a switch state.
>
> This is a seriously basic question. I'm sorry I know this but I've
> been searching and can't find any info. Maybe what I expected
> is in error. I had expected as the consoleLCD-vx expansion has
> GPIO listed in it's features I'd assumed that there'd be solder
> points.

So, pretty much every pin can be configured for some purpose or GPIO.
So you need to find some pin whose functionality you're not using, and
use it as a GPIO pin.

Some likely candidates on the consoleLCD-vx are the audio (or AC97
pins), and possibly the NSSP (SPI) pins.
The AC97 pins are X_BIT_CLK, SDATA_IN, CLK32, SDATA_OUT, NACRESET,
SYNC. The NSSP (SPI) pins are: X_MOSI, X_MISO, NSSPFRAME, and NSSPCLK.

GPIO28 - X_BIT_CLK
GPIO29 - SDATA_IN
GPIO09 - CLK32
GPIO30 - SDATA_OUT
GPIO113 - NACRESET
GPIO31 - SYNC
GPIO13 - X_MOSI
GPIO11 - X_MISO
GPIO14 - NSSPFRAME
GPIO19 - NSSPCLK

I grabbed those from the consoleLCD-vx schematics. You can also find
them on the motherboard I/O page.

If you do:

modprobe proc_gpio
echo "GPIO out set" > /proc/gpio/GPIO31 will drive the SYNC line at 3.3v
echo "GPIO out clear" > /proc/gpio/GPIO31 will drive the SYNC line to ground.

So if you had an LED & current limiting resistor connected, one way
would light it, and one way would extinguish it (which way does what
depends on the exact wiring).

Similarly, for input, you'd connect a pullup resistor between say
CLK32 and 3.3v, and then connect a switch between CLK32 and ground.
With the switch open:
echo "GPIO in" > /proc/gpio/GPIO9 will configure CLK32 as a GPIO pin.
cat /proc/gpio/GPIO9 will then show you whether the pin is set (3.3v)
or clear (0v).

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users

 « Return to Thread: GPIO on consoleLCD-VX