P6 rgb 32x32 matrix

Hello,

i have this 32x32 rgb p6 display without the "D" pin with 1/8 scan rate. Did someone get it to work with Arduino mega? Adafruit library is not working correctly. I searched through forum but found no solution. The nearest i came to display it correctly is with 16x32 example from adafruit but the text is duplicated on both half. There is picture in attachment.

Thanks for help :slight_smile:


There have been several questions about this on the forum recently. Post a link to the information about the display.

Led p6 module

Yes i know i searched thru forum and tried everything but didnt find out the right solution :frowning:

I was testing display and i think it works like this. Pixels are addressed from 1-64 from which first 32 are in the first row and other 32 are in the 9th row. So we can get it lit with 16 row's of data?

This is how you post a link:

Link

Please read the forum sticky post before you post again. There are lots of other tips in it.

Did you see this thread?

PaulRB:
Did you see this thread?

Yes i tried everything i found on the forum :slight_smile:

Ok, post the code you are trying to use.

If it's too big to post between code tags, remove everything you can from the code, just leave the minimum to show what goes wrong when you run it.

So i have tried Adafruit original library, edited Adafruit library from that link (both 32x16 and 32x32 examples). The nearest i have come to get it work is with original Adafruit library for 32x16 but pixels are duplicated on both half. Other thing i tried to get to know how the display works is from this link 32x16 RGB LED display scan question .

I found out that display is divided in 4 parts of 8x32 pixels (from top to bottom). A B C bits are controlling which row in those 4 parts (row 1-8) is lit. That means that in the same time 4 rows together can be lit (2 in the upper half and 2 in the lower half or in each of those 4 parts one line). I dont know the calculations but does this mean that display has 1/8 scan? or 1/4?.

So i took code from upper link and changed my way just to get idea how display works.

temp = 0x0000000000000001;
row1 =  0xFFFF000000000000;

}

void loop() {
for(row=0; row<8; row++){
   for (i = 0; i < 64; i++)  {
      digitalWrite(B1P, !!(row1 & (temp << (63-i))));
      digitalWrite(R1P, 0);
      digitalWrite(G1P, 0);
      digitalWrite(ClkP, HIGH);
      digitalWrite(ClkP, LOW);
      }  
   digitalWrite(OEP, HIGH);
   digitalWrite(LP, HIGH);  
   digitalWrite(AP, !!(row & B00000001));
   digitalWrite(BP, !!(row & B00000010));
   digitalWrite(CP, !!(row & B00000100));
   digitalWrite(OEP, LOW);
   digitalWrite(LP, LOW);  
   }
}

I got idea how this thing work but dont know how to change color intensity? Sending 0xFFFF000000000000 to R1 pin does only bring up first 16 x 8 led's in full red color.

I would love to get it work with Adafruit library but really dont know where to start :slight_smile:

With this type of display, changing the colour intensity and mixing anything more than the standard 7 colours has to be done by software PWM-ing. This is really on the limit of what can be done with a 16MHz Arduino.

PaulRB:
With this type of display, changing the colour intensity and mixing anything more than the standard 7 colours has to be done by software PWM-ing. This is really on the limit of what can be done with a 16MHz Arduino.

Could you point me in the right direction for standard 7 colour mixing? :slight_smile:

To get the standard 7 colours (or black) you would simply send the same pattern to some combination of the R, G & B pins:

R only: Red
G only: Green
B only: Blue
R & G pins: Yellow
R & B pins: Magenta (purple)
G & B pins: Cyan (turquoise)
R & G & B pins: White

PaulRB:
To get the standard 7 colours (or black) you would simply send the same pattern to some combination of the R, G & B pins:

R only: Red
G only: Green
B only: Blue
R & G pins: Yellow
R & B pins: Magenta (purple)
G & B pins: Cyan (turquoise)
R & G & B pins: White

Aaaa sorry i misunderstood your anwser about color mixing. I was asking about color brightness. But i see now that you need PWM as you wrote for setting color brightness. Will try to edit rgbmatrix library because i can see that only rows are shifted different way than on the original module.

So now i modified library from this link but can get lit only 2 rows. First row on upper half and first row on lower half.

        //Constructor 

        RGBmatrixPanel::RGBmatrixPanel(
           uint8_t a, uint8_t b, uint8_t c,
           uint8_t sclk, uint8_t latch, uint8_t oe, boolean dbuf, uint8_t pwidth) :
   Adafruit_GFX(32 * pwidth, 32)
        {
 init(16, a, b, c, sclk, latch, oe, dbuf, pwidth);
        }   


 // Custom shifting in drawPixel()
 shift = 0;
 if (x>15) shift+=16;

 if (y==1 || y==17 ) shift += 32 * 3 * nPanels * nMultiplexRows; // row 1
 if (y==2 || y==18) shift += 64 * 3 * nPanels * nMultiplexRows; // row 2
 if (y==3 || y==19) shift += 96 * 3 * nPanels * nMultiplexRows; // row 3
 if (y==4 || y==20) shift += 128 * 3 * nPanels * nMultiplexRows; // row 4
 if (y==5 || y==21) shift += 160 * 3 * nPanels * nMultiplexRows; // row 5
 if (y==6 || y==22) shift += 192 * 3 * nPanels * nMultiplexRows; // row 6
 if (y==7 || y==23) shift += 224 * 3 * nPanels * nMultiplexRows; // row 7
 if (y==8 || y==24) shift += 256* 3 * nPanels * nMultiplexRows; // row 8
 if (y==9 || y==25) shift += 288* 3 * nPanels * nMultiplexRows; // row 9 
 if (y==10 || y==26) shift += 320* 3 * nPanels * nMultiplexRows; // row 10 
 if (y==11 || y==27) shift += 352* 3 * nPanels * nMultiplexRows; // row 11
 if (y==12 || y==28) shift += 384* 3 * nPanels * nMultiplexRows; // row 12 
 if (y==13 || y==29) shift += 416* 3 * nPanels * nMultiplexRows; // row 13 
 if (y==14 || y==30) shift += 448* 3 * nPanels * nMultiplexRows; // row 14 
 if (y==15 || y==31) shift += 480* 3 * nPanels * nMultiplexRows; // row 15 
 if (y==16 || y==32) shift += 512* 3 * nPanels * nMultiplexRows; // row 16
 
        

       //Displaying content

      matrix.print("1236567890"); 
      matrix.print("0987654");

Seems like the colors are ok because the middle 8 rows and bottom rows are hidden
but the numbers seems to be there