Sorry, you need to enable JavaScript to visit this website.

Push button value

Unsolved
4 posts / 0 new
Deepshika's picture
Deepshika
Junior(0)
Push button value

On running the following code,

#include "xparameters.h"
#include "xgpio.h"

int main(void)
{
XGpio push;
int i,psb_check;
xil_printf("Start");
XGpio_Initialize(&push,XPAR_PUSH_DEVICE_ID);
XGpio_SetDataDirection(&push,1,0xffffffff);
while(1)
{
psb_check=XGpio_DiscreteRead(&push,1);
xil_printf("Status=%x",psb_check);
for(i=0;i<9999999;i++);
}
}

the output constantly shows the value of push button as 31.

What is the reason for this?

JFoster's picture
JFoster
Moderator(48)
Hello Deepshika,

Hello Deepshika,

Could you tell me what Development Board you are using?

Thanks,

Josh

Deepshika's picture
Deepshika
Junior(0)
Hi,

Hi,
I'm using the Zynq Evaluation and development board.

JFoster's picture
JFoster
Moderator(48)
Hello Deepshika,

Hello Deepshika,

Which Development platform are you using. There are many Zynq Evaluation and development platforms available, could you please specify? If you could provide a link to your board that would suffice.

Thanks,

Josh