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 2661 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
Parents
  • 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
Reply
  • 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
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