element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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 & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
ZedBoard Hardware Design Interfacing Arduino Uno's Serial port to ZYNQ PS via PMOD JE1 (routed to UART0)
  • 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 1 reply
  • Subscribers 353 subscribers
  • Views 735 views
  • Users 0 members are here
Related

Interfacing Arduino Uno's Serial port to ZYNQ PS via PMOD JE1 (routed to UART0)

Former Member
Former Member over 11 years ago

Hi All,

I have interfaced my arduino uno serially with zedboard using PMOD Connector JE1( which is Further Routed to UART0).

My Arduino is sending data (in the form of distance) of Ultrasonic and IR distance Sensors. I further want these integer values as an input to kalmanfilter and obstacle detection algorithm implemented on ZYNQ PS .

As an output from recieved buffer of Zynq PS UART, I am getting these values as characters (8bit) but I want these values to be integers (16bit) so that i can use them in my algorithm

My Questions are:

Is communicating data from arduino's UART TX and RX pins to that of UART in ZYNQ PS (Via PMOD Connector)  an effective way of communicating the two boards?

IS there any builtin Xilinx library function to convert characters or strings to integers?

Or how would I get these recieved results via UART0 (Which are sent from arduino via Seril.print command) in integers instead of characters?

Here is what I am doing till now on Zynq PS

while(1)
{

twhile (RcvCount < (sizeof(str) - 1)) {
tt/*
tt * Recieve the data on UART0 Zynq PS
tt */
ttRcvCount += XUartPs_Recv(&Uart_Ps,
ttttt   &str[RcvCount], 1);

t}

//The Code mentioned below is just to check whether the communication btw arduino and zedboard is working or not. My real objective is to get this recieved data in integers, save them in an array and use them as input in  obstacle detection algorithm

   RcvCount =0;

twhile (RcvCount < (sizeof(str) - 1)) {
ttt/*
ttt * Transmit the data on UART1 of Zynq PS
ttt */
tttRcvCount += XUartPs_Send(&Uart_Ps1,
tttttt   &str[RcvCount], 1);

tt}

tRcvCount=0;

}

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    Hi Abdullah,

      If your 8-bit characters are representative of your integer values from 0-255, then you can simply cast them as integers and use them directly.  If you mean the values are sent as strings (i.e.  "155"), then I'm not aware of any built-in function that will perform the conversion for you, but it would only take a small C function to parse the string and then convert each ASCII character to its decimal (or whatever base you're using) equivalent, then multiple by the base power as determined by the position of the character within the string.  Add the values together and you've got your integer.

    Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
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 © 2026 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