GPIO problem

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Dear All,

I'm trying to use a GIPO module in my application, but I can't figure
out how to use it
and the GPIO specification (DS466) and software API definition document
are not helping

I need 32 lines for input and 32  different lines for output. I decided
to use a GPIO
core, 32 bits wide, configured as single channel. The idea is to read
data from the
GPIO_in pins and write data to GPIO_d_out pins. I have parameterized
the core as follows:

So, my first question is: Is there something wrong with this
configuration? Can I us it?

Next, I try to write to the core. I used the following instructions:
    XGpio gpio_io;
    XGpio_Initialize(&gpio_io, XPAR_GPIO_IOPORT_DEVICE_ID);

Noting happens. Do I have to set the direction with
XGpio_SetDataDirection? Do I have
to use other functions?

Tanks to all

JosE9% Mariano

Re: GPIO problem
If you actually check the example program in the installed EDK folder,
you find an example that uses the GPIO components.

You have to set the data direction using the XGpio_mSetDataDirection
function and use XGpio_mSetDataReg function to set the GPIO component.

jmariano wrote:
Quoted text here. Click to load it

Re: GPIO problem
Hi Paul,

Tanks for your help. I'm sorry for the late replay.  I wanted to try
what you suggested
before answering, but din't had much time.

The example programs ware very useful, and I manage to solve my
problem. What I have
misunderstood is that you can not configure a GPIO module as input and
simultaneously, unless you use the GPIO_IO pins.

tanks again,

JosE9% Mariano

Site Timeline