element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
ZUBoard EMIO Pin number start from which number on ZedBoard Zync 7020 ?
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 2 replies
  • Subscribers 328 subscribers
  • Views 425 views
  • Users 0 members are here
Related

EMIO Pin number start from which number on ZedBoard Zync 7020 ?

trickntreat
trickntreat over 1 year ago

Hey all 

I was working with EMIO and kept a pin to external . (A20) . I read that it was pin 54 in Zync boards. 

So to access first emio we set the pin 54 to high or low whatsoever you want . 

#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xgpiops.h"
#include "xparameters.h"

XGpioPs_Config *gpio_config;
XGpioPs gpio;

void init(){
	int status;
	gpio_config = XGpioPs_LookupConfig(XPAR_PS7_GPIO_0_DEVICE_ID);
	status = XGpioPs_CfgInitialize(&gpio, gpio_config, XPAR_PS7_GPIO_0_BASEADDR);
	if(status == XST_SUCCESS)
		xil_printf("Device Init Successful\n");
	else
		xil_printf("Device Init Failed\n");
}

int main()
{
	u32 sw= 0;
    init_platform();
    init();

    print("Starting GPIO EMIO Test\n\r");

    /////////Setting 51 as input
    XGpioPs_SetDirectionPin(&gpio, 51, 0);


    /////////Setting 51 and 54 as Output
    XGpioPs_SetDirectionPin(&gpio, 47, 1);
    XGpioPs_SetDirectionPin(&gpio, 54, 1);

    XGpioPs_SetOutputEnablePin(&gpio ,47 , 1);
    XGpioPs_SetOutputEnablePin(&gpio ,54 , 1);

    while(1){
    	sw = XGpioPs_ReadPin(&gpio,51);

    	XGpioPs_WritePin(&gpio, 47 , sw);
    	XGpioPs_WritePin(&gpio,54,sw);
    	xil_printf("Value read sw0 : %0d \n ",sw);
    	sleep(1);
    }

    cleanup_platform();
    return 0;
}

Btn is at mio pin 51 . 

Internal user led is at pin 47 . 

and A20 external pin connection has been put at 54 . 

But on scope it does not show the pin going high or low . 

Thanks . 

  • Sign in to reply
  • Cancel
Parents
  • viktornikolov
    0 viktornikolov over 1 year ago

    I don't see any obvious problem in the source code you shared (I compared it with this code of mine, which I know for sure works).

    I can only speculate there may be an issue in the HW design. I suggest you share screenshot of your Vivado Diagram.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • trickntreat
    0 trickntreat over 1 year ago in reply to viktornikolov

    image

    I have kept the EMIO width to 1 only . 

    image

    This is an auto generated constraints file when i sythesise the project and put the pin number in GUI . 

    Maybe i should try change the constraint file to match the Hw design external pin number ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • trickntreat
    0 trickntreat over 1 year ago in reply to viktornikolov

    image

    I have kept the EMIO width to 1 only . 

    image

    This is an auto generated constraints file when i sythesise the project and put the pin number in GUI . 

    Maybe i should try change the constraint file to match the Hw design external pin number ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube