[Voyage-linux] GPIO on WRAP
William M. Brack
Mon Jun 5 18:14:26 HKT 2006
Attached are the two very simple programs than I'm
using. The first (setup_gpio.c) fixes up the WRAP
registers to change the LPC over to straight GPIO. I'm
using 6 bits for my interface - 3 bits for each PC,
1 bit to simulate the POWER-ON switch, one to simulate
the RESET, and 1 bit to sense whether the power (+5V)
is on. There are lots of comments to show what I think
I'm doing :-), and a couple of references to the
applicable pages of the CPU datasheet.
The second program (gp_ctl.c) is the actual "control
program". It's a really dumb piece of code to poke at
the GPIO register for activating the outputs, and to
peek at it to sense the inputs. I'm not very proud of
that code, but it works :-).
I'll try to put together a Wiki page with a photo and
a copy of the schematic for the board, but it will be a
week or two before I can spend the time on that.
Solomon Asare wrote:
> Hi William,
> I am very interested in your approach, especially the
> code. I am looking to having an i/o interface to my
> WRAP for external monitoring and control, and will
> appreciate any help in that direction.
> --- "William M. Brack" <wbrack at mmm.com.hk> wrote:
>> I wanted to use a WRAP board to remotely control a
>> couple of
>> PC's (where "control" means "reset" and/or "power
>> on/off"), so
>> I constructed a a small board with opto-isolators
>> which fits
>> inside the WRAP case and connects to the LPIO
>> connector on the
>> WRAP, with a wire to connect internally to the
>> 'reset' and
>> 'power' pins inside the PC. I then did some simple
>> which sets up the connector (i.e. changes the
>> control register
>> bits) for this use, and directly sets the
>> appropriate bits in
>> the GPIO register (i.e. no driver or interrupt
>> handling required)
>> to (remotely) accomplish it's functions. It's all
>> installed and
>> working, allowing me to "control" a system in San
>> Francisco from
>> here in Hong Kong :-). If anyone is interested, I'd
>> be happy to
>> share the circuit details, and perhaps take a photo
>> of the board.
>> Solomon Asare wrote:
>> > Hi All,
>> > has anyone done any work on gpio that he will want
>> > share?
>> > Thanks.
>> > solo.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2008 bytes
Desc: not available
Url : http://list.voyage.hk/pipermail/voyage-linux/attachments/20060605/0772f492/gpio.bin
More information about the Voyage-linux