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
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#060 – PSoC 4 Mini-Billboard
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 13 replies
  • Subscribers 28 subscribers
  • Views 2657 views
  • Users 0 members are here
Related

PSoC 4 Pioneer Kit Community Project#060 – PSoC 4 Mini-Billboard

cy.wbz
cy.wbz over 12 years ago

Hello!

 

Today’s example was talked about in the Processing post we released earlier this week. We are going to use Processing to generate an image on a 16x32 RGB LED matrix board. We use a Processing GUI to load the desired image onto the PSoC 4 device to display on the LED Matrix board.

 


image

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Processing Example
  • Zip File of Images
    • Project Schematic
    • Component Configurations

 

Components Used:

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • UART
  • LED Matrix Datapath Component (custom)
  • Control Register
  • Annotated Component for the Pioneer Board (custom)
  • Pin Helper Component (custom)
  • CyClock
  • CyPin
  • ISR

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

In this example we provide a new custom component to drive and control the LED Matrix. This component was implemented on the UDBs of the PSoC 4 to handle the timing-sensitive sensitive and tedious portions of the designs. You will see the ‘LED Matrix’ component in the example. This component .h and .c files are included in the project. This component supports the following APIs to write to the PSoC 4:

 

void DrawPixel(uint8 x, uint8 y, RGB c, color *matrix)

void ClearPixel(uint8 x, uint8 y, color *matrix)

void ClearScreen(color *matrix)

 

In this example we are receiving data over the PSoC 5LP USB-UART bridge from the PC Processing application. We then take that data and display it out on the LED Matrix Panel. This project supports a 5-bit color image at a refresh rate of 360 Hz.

 

Here is a rough flow of the project when in operation:

  • The Component clocks out 32 RGB values to the 2 planes of the panel.
  • It then latches the data, enables the LED driver, and triggers a ‘done’ signal.
  • An ISR fires on the ‘done’ signal, and this increments the row, writes new RGB data to the Component (FIFOs) from a buffer, and handles the Binary Code Modulation (BCM) for color control
  • In main code, the buffer for the image to be drawn on the panel is modified (when necessary). This is done when the UART sends new data to be drawn. Previous 3 steps go on endlessly.

 

The other half of this example uses the Processing IDE to generate an application that transmits the ICON image down to the Pioneer board. The code for the Processing example is provided below.

 

image

 

You will need to ensure that the Processing application is selecting the correct COM port created by your computer for the Pioneer USB-UART capabilities. Also you will need to enter in the correct image in your script.

 

You will see in the images for the kit example that we have put some paper over the LED Matrix. This is due to the brightness of the LEDs. When you are working on the example it’s easier to save your eyes to put a little diffuser over the LEDs when testing.

 

Hardware Connections:

 

In this example we use an Arduino Breadboard shield to perform all of the wiring between the LED Matrix board and the Pioneer kit. In this example we use an RGB LED Matrix Panel from Adafruit to generate all of our images. The panel is a 16x32 RGB LED panel that uses a serial addressing scheme to light up the LEDs.

 


image

 

Adafruit supplies a tutorial page on the LED matrix panel. We suggest you reviewing this page to see how the panel works and how to interface the panel to the PSoC.

The Adafruit web site has a tutorial on connecting and wiring up the panel to an Arduino kit. You can follow the same instructions to connect the panel to the Pioneer board.

 

image

 

The above header can be summarized in the following table:


Pin name

Description

R1, G1, B1

R, G, B value for a pixel in plane 1

R2, G2, B2

R, G, B value for a pixel in plane 1

A, B, C

3-bit row address

OE

Output Enable (active low)

LAT

Latch (active low)

CLK

Clock

GND (4 pins)

Ground

 

The panel can be thought of as 2 ‘planes’, each with 8 rows. The RGB color in the 8 rows of plane 1 are controlled using (R1, G1, B1) and likewise for plane 2. The 8 rows are addressed using the (A, B, C) lines. Columns are accessed by clocking out values (serial interface of sorts); i.e. after one clock you are at column 1, after 31 clocks, you are at column 31.

 

image

 

We also connect the UART pins between the PSoC 4 and the PSoC 5LP device to enable the USB-UART bridge capabilities. Connect two wires between the Pioneer Arduino headers and the PSoC 5LP headers.

 

PSoC 4 P4[1] -> P5LP P12[6]

PSoC 4 P4[0] -> P5LP P12[7]

 

Test Your Project:

 

Connect your hardware and program the Pioneer kit with the target firmware. Start up the Processing script and load in your image. Download that image to the Pioneer board for display on the LED Matrix board. The following image is a set of the logs images and their output on the LED Matrix.

 


image

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
RGB_LED_Matrix.COMMENTED2.zip
5756.Project Images.zip
ProcessingExamples RGB LED Matrix.zip
  • Sign in to reply
  • Cancel
  • cy.wbz
    cy.wbz over 12 years ago

    Hello!

     

    I've also posted a couple of videos of the LED Matrix in action. These posts include the Drawing and Image examples. I've posted the Processing application examples. Remember the Processing example will draw and do different actions, but the Pioneer code is the same.

     

    Big thanks go to Antonio for developing all of these examples. I hope this helps you in your design!

     

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

     

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

    Thanks,

    Matt

    Attachments:
    DrawingPad1.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DAB
    DAB over 12 years ago

    Hi Matt,

     

    Good clear example.

    It makes a very simple Marquee display and I like the clean interface with Processing.

     

    Thanks

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to DAB

    DAB,

     

    This is another example implemented with the PSoC Universanl Digital Blocks (UDBs). It uses between 50%-75% of the UDBs, mainly to shift out the data to the panel.

     

    Here are some examples of other devices controlling the same type of RGB matrix:

    FPGA: http://www.youtube.com/watch?v=okJF6BS5-Es

    Arduino: http://www.youtube.com/watch?v=bn_bToE005Y

    Propellor: http://www.youtube.com/watch?v=sZywiOOGPkM

     

    I haven't actually compared the implementations, but I believe that the PSoC implementation is both efficient (w.r.t. resources) and fast (refresh rate) as compared to these implementations.

     

    If any of you have actually played around with these kinds of designs, and have questions or ideas to share, please chime in!

     

    Thanks,

    Antonio

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to Former Member

    Hello Antonio.

    Thanks for give us this excellent project. i will buy the led matrix to play with this.

    Beautiful design. Antonio if i working with a commercial-sized(big matrix ) display what parameters should I consider in the design?.

     

    Best regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • cy.wbz
    cy.wbz over 12 years ago in reply to jesusantoniocar

    Jesus,

     

    I cannot confirm nor deny we have been demoed a 4 foot by 2 foot sign with about 1000 RGB LEDs all addressed from the single psoc4 powered by a pc battery. Or that we are all hoping that the example may or may not be our final project of the series ;)

     

    -Matt Buza

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to cy.wbz

    Hello Matt.

    Thanks for your reply.

    I really liked this project and obviously its potential commercial applications. I'll have to investigate a little more about this topic to build a first prototype.

     

     

    thanks

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to jesusantoniocar

    J. Antonio,

    It is encouraging to hear that you liked this project.

     

    What Matt was hinting at is that we have a larger RGB LED Matrix display 'Example Project' that we MAY release later in this series.

     

    As for your questions on parameters to consider for a large display:

    - What you want to display (text, icons, logos, images)

    - What's the viewing distance

    - What colors you need

     

    If you understand what I am getting at: What are your requirements? These affect decisions like - number of LEDs, their pixel pitch, the brightness/power supplied to the board, whether it is a scrolling display, etc.

    There is more information you can find on the web - for example, see this website: http://www.watchfiredigitaloutdoor.com/common-questions

     

    Logique?

    Antonio

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to Former Member

    Hello Antonio.

    Thanks for your reply.

    I looks fabulous that you  are planning a project with a greater screen size,  ideally apply psoc 4 in my case to small businesses that need or are interested in advertising with this technology. I wiil be tune with your post project and of course i will read the information that you suggest me.

     

    best regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to jesusantoniocar

    We saved the 'larger' LED billboard application for the 100th project - I believe you saw it today.

    I hope you keep learning and enjoying PSoC!

    All the best, and thank you all for your support!

    Antonio

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • sebi1991
    sebi1991 over 11 years ago

         Hello Matt. It is work very well, congratulation. I want some advises, please help me if you can, how to write some text on the matrix panel(i try with printf but doesn't work) and how to do some animation ,it is possible to do this without processing application ?

         I tried to import libraries from adafruit learning system(RGBMatrixPanel library and Adafruit_GFX library)  but i don't have succes(it is possible to use c++ code on psoc microcontroller? (I have same model of psoc ,cy8ckit-042) .

          Thank you very much.

     

    Best regards,

    Sebastian Rosca

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