

This way, when you initialize your display for a width and height of 2 panels, the coordinates you send will be positioned correctly on your display.įor 16x32 panels you will need to connect two 16x32 panels together from bottom to top, and follow the pattern as stated above. Otherwise, your connections should go from panel 1 to 2, 2 to 3, and 3 to 4. If your display only has 1 panel in height you can simply align the panels right to left with the right-most panel connected to the click. To connect multiple panels together, always connect starting from the bottom right-most corner to the top-left most corner. Pretty simple! Lastly, connecting must be done correctly for the library to know what you mean when writing a pixel or drawing to "( 0, 0 )". Panel size can be either "BIG_PANEL" which means 32x32 panel, or "SMALL_PANEL" which means 16x32 panel. Width and height are not pixels, they are how many 32x32 or 16x32 panels in width and height that are connected. Initialization is very simple and only takes 3 arguments, width, height and panel size. Multiple PanelsĪ single panel is really cool and easy to run, but so is multiple panels! To run multiple panels, all that has to happen is proper initialization, and connecting multiple panels together in a correct order. After a pair of rows is finished ( row ? and row ? + 8 ), Latch pin is asserted, and row is incremented. Next, data from the frame buffer with a format of 0b00000RGB is placed onto Led_Matrix_Data and our clock is then toggled which shifts this data onto the display( if 565 bitmap is being used, format will be parsed and put together again into 0b00000RGB format). ( We will go into more on how multiple panels work later ).

If it is initialized with a width of 2 panels and a height of 1 panel, then shift reg = ( width * height ) * 64 for 32x32 panels and shift reg = ( width * height ) * 32 for 16x32 panels, because a single shift register for a panel is 64 or 32 bytes for one entire panel. The inner loop is set to increment until it reaches shift_reg, which is dependent on how many panels the library is initialized with. Before loading Led_Matrix_Data with R1, R2, G1, G2, B1 and B2 data, Latch pin must be set to 0 or deasserted. Our loop is set to loop 8 times, completely taking care of all 16 possible rows of data. Led_Matrix_Data |= ( FB & 1 ) << 2 įirst, we must reset the row to 0. Here is a peak at refresh() used in our library.
#Led matrix panel update
Shifting data onto R1, B1 and G1, will update row 0 data, and R2, B2, and G2 will update row 8. While your row selection is set to row 0, row 8 will also be updated. Row selection registers are used to make re-writes appear more fluent. Top row color shift registers are labeled R1, G1 and B1, while bottom row color registers are labeled R2, G2 and B2. There are 2 for each color, 3 for row selection( A, B, C ), clock pin ( CLK ), latch pin ( STB ), and a OE / enable pin. There are 9 shift registers for driving LED colors and row selections effectively, along with 3 pins to latch, clock and enable leds. Panels are connected to the click with 16 wires. To better explain how each wire works, here is a picture of the connection. The Click is designed to take the load off of the host MCU and make driving a matrices with ease. Whether it be a single pixel with a color, text displayed at any point on the screen, or an RGB 565 formatted bitmap, it is all made simple with our library. Today, let's talk about LED Matrices with MikroElektronikas' MatrixRGB Click.
