Comments: RGB Panel Hookup Guide

Pages

Comments 3 comments

  • —————————— Tech Support Tips/Troubleshooting/Common Issues ——————————

    Wrong Pin Definition

    If you are using the example code with Adafruit, make sure that you wire and define the pins correctly. This is a common issue. Otherwise, the code will not control the RGB LEDs correctly. Make sure to change the CLK and LAT pin definitions.

    1.) When using the 16x32 panel with the ATmega328P, you would change:

    #define CLK 8  // MUST be on PORTB! (Use pin 11 on Mega)
    #define LAT A3
    #define OE  9
    #define A   A0
    #define B   A1
    #define C   A2
    

    to:

    #define CLK 11  // MUST be on PORTB! (Use pin 11 on Mega) <---CHANGE!
    #define LAT 10  // <---CHANGE!
    #define OE  9
    #define A   A0
    #define B   A1
    #define C   A2
    

    2.) When using the 32x32 panel with the ATmega328P, you would change:

    // If your 32x32 matrix has the SINGLE HEADER input,
    // use this pinout:
    #define CLK 8  // MUST be on PORTB! (Use pin 11 on Mega)
    #define OE  9
    #define LAT 10
    #define A   A0
    #define B   A1
    #define C   A2
    #define D   A3
    

    to:

    // If your 32x32 matrix has the SINGLE HEADER input,
    // use this pinout:
    #define CLK 11  // MUST be on PORTB! (Use pin 11 on Mega) <---CHANGE!
    #define OE  9
    #define LAT 10
    #define A   A0
    #define B   A1
    #define C   A2
    #define D   A3
    

    Otherwise, you will probably see this:

    If you jiggle the wires, you might see this:

    Wrong Pin Connections?

    Make sure you wire to the Arduino to the LED matrix correctly. You can blow out the LED drivers on the RGB matrix if the wiring is incorrect. There was one case where customer had flipped the ground and blue pins, resulting in blowing out the chip. Adafruit has a tutorial also, connectors are the same but they show one image of the cable connector and the connector on the LED matrix. This probably confused the customer and had the connections flipped.

    Hardware Hookup w/ the Arduino Mega

    Most of the wire connections are the same as stated in the table for the hardware hookup https://learn.sparkfun.com/tutorials/rgb-panel-hookup-guide/hardware-hookup with the exception for pins R0, G0, B0, R1, G1, and B1 . The reason is due to the way those pins are defined in the library [explained on line 50 of the RGBmatrixPanel.cpp file https://github.com/adafruit/RGB-matrix-Panel/blob/master/RGBmatrixPanel.cpp ]. Make sure that you are connecting to the correct pins:

    Panel Pin Label <=> Panel Connector Pin # <=> Arduino Uno Pin <=> Arduino Mega Pin  
    R0              <=>           1           <=>         2       <=>          24
    G0              <=>           2           <=>         3       <=>          25
    B0              <=>           3           <=>         4       <=>          26
    ...
    R1              <=>           5           <=>         5       <=>          27
    G1              <=>           6           <=>         6       <=>          28
    B1              <=>           7           <=>         7       <=>          29
    .
    .
    .
    

    If you do not connect to the pins correctly for the Arduino Mega, the LED Panel will not light up correctly. You might see LEDs turning on randomly.

    Loose Connections

    When testing the RGB LED panel with the RGB Panel example code, everything was fine except when I unplugged and plugged in a wire from the RGB LED matrix to one of the Arduino I/O pins. I saw some flickering also on the pixels when the pin was not completely in the Arduino Uno’s female header pins. I doubt the code would damage the RGB LED matrix panel but if customers see this, make sure that their connection is solid. If the connection and wires are good, the panel is blown out from the wrong connection.

    Uploading

    When uploading you might see the LED matrix display show the LEDs scroll random colors like below. This is normal. :

    Only Seeing Mostly Red?

    You might not be powering the LED matrix properly. Check your power supply. If the LED display is not being powered sufficiently, it will pull some power from the microcontroller to partially light up the LEDs.

    Additional Project Examples

    Hover Pong with ZX Sensors [ https://github.com/ShawnHymel/HoverPong/tree/master/HoverPong ]

  • Why does the clock have to be on PORTB?

  • Is there a page for the code for the etch-a-sketch? I see that there is sample code for the Serial Paint, but I can’t seem to find anything about the 2 knob etch-a-sketch? Would appreciate some help, thanks!


If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!