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
Avnet Boards General String in HDMI ZedBoard
  • 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 367 subscribers
  • Views 279 views
  • Users 0 members are here
Related

String in HDMI ZedBoard

lukwolf
lukwolf over 11 years ago

Hi, I tried the example Zedboard "ZedBoard_HDMI_Display_Tutorial" and it works, showing the color bars on my TV. Is there any way to modify the code to write characters? For example: Display the string "Hello world" etc. ..

  • Sign in to reply
  • Cancel
  • zedhed
    0 zedhed over 11 years ago

    Hi lukwolf,

    I don't think that is a simple task but it is definelty possible.

    If you are developing using the Standalone application for this reference design as a starting point, there is no exising character drawing API that I am aware of.  However, I can think of two ways that you could implement this support on your own.  You could use a sprite map similar to what was done in the old PC gaming days and simply write image information to the display containing pixel data to form a letter.  You can get pretty fancy with this method by using graphic design software to create the sprite map.  Alternatively, you could write a library of routines to draw characters on the display by plotting pixels and then write some higher level functions to call the letter plot functions.

    Take a look at this function from zed_hdmi_display.c where the colorbars are painted inside of the frambuffer space:

    int zed_hdmi_display_cbars( zed_hdmi_display_t *pDemo, Xuint32 offset )
    {
       Xuint32 frame, row, col;
       Xuint32 cbar, pixel;
       volatile Xuint32 *pStorageMem = (Xuint32 *)pDemo->uBaseAddr_MEM_HdmiDisplay;
       for ( frame = 0; frame < pDemo->uNumFrames_HdmiDisplay; frame++ )
       {
          for ( row = 0; row < pDemo->hdmio_height; row++ )
          {
             for ( col = 0; col < pDemo->hdmio_width; col++ )
             {
                cbar = (col * 8) / pDemo->hdmio_width; // color bar = 0..7
                cbar = (cbar + offset) % 8;
                switch ( cbar )
                {
                case 0: pixel = 0x00000000; break; // Black
                case 1: pixel = 0x00FF0000; break; // Red
                case 2: pixel = 0x0000FF00; break; // Green
                case 3: pixel = 0x000000FF; break; // Blue
                case 4: pixel = 0x0000FFFF; break; // Cyan
                case 5: pixel = 0x00FF00FF; break; // Purple
                case 6: pixel = 0x00FFFF00; break; // Yellow
                case 7: pixel = 0x00FFFFFF; break; // White
                }
                *pStorageMem++ = pixel;
             }
          }
       }

       // Wait for DMA to synchronize.
       Xil_DCacheFlush();

       return 0;
    }

    You could do something similar but instead paint pixels to form letters.  One thing I have done in the past is take a graphics image from Protoshop and convert to 24-bit RGB format then write that data into the framebuffer space.  The image should then display on the HDMI display.

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • lukwolf
    0 lukwolf over 11 years ago

    Thank you very much for your reply Kevin. I had thought to do something like that but excessively complicate the application I want to develop. I will try to use Petalinux or some variant of Linux to give me support with HDMI and other peripherals.

    Regards,

    -- LuK

    • 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