2dom/PxMatrix

Chain 2 outdoor panels (P4 - 64x32 - 1/8)

Closed this issue · 2 comments

for my next project I want to change two P4 indoor panels to outdoor panels (greater brightness).

On the current setting the two P4 indoor panels (1/16, 64x32 leds) works as expected.

OK-1

I modified the code for the P4 outdoor panel (1/8, 64x32 leds) and conneced one panel in the same way. Everything looked good. Maybe a little bit ghosting on the running text, but it could be related to PIN D and E. They are not grounded on my pcb.

outdoor_OK-1

After that, I tryed to connect two outdoor panels and the problems got started. I get a lot of ghosting (4 leds in a row) and a strange offset behaviour.

bild1-1

Bild2-1

Does an

ybody seen this before ...?

Thanks

Hello again,

pattern test looks like this:

Video

IMG_3811-8.mp4

Same result for "display.setPanelsWidth(2);" and "display.setPanelsWidth(1);".

Code pattern_test:

`#include <PxMatrix.h>

#define P_LAT 22
#define P_A 19
#define P_B 23
#define P_C 18
#define P_D 21 // 5
#define P_E 4 // 15
#define P_OE 2 // 16
hw_timer_t * timer = NULL;
portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED;

// Pins for LED MATRIX

PxMATRIX display(128,32,P_LAT, P_OE,P_A,P_B,P_C);
//PxMATRIX display(64,32,P_LAT, P_OE,P_A,P_B,P_C,P_D);
//PxMATRIX display(64,64,P_LAT, P_OE,P_A,P_B,P_C,P_D,P_E);

void IRAM_ATTR display_updater(){
// Increment the counter and set the time of ISR
portENTER_CRITICAL_ISR(&timerMux);
//isplay.display(70);
display.displayTestPattern(70);
portEXIT_CRITICAL_ISR(&timerMux);
}

uint16_t myCYAN = display.color565(0, 255, 255);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
display.begin(8);

display.setPanelsWidth(2);

display.flushDisplay();
display.setTextColor(myCYAN);
display.setCursor(2,0);
display.print("Pixel");
Serial.println("hello");

timer = timerBegin(0, 80, true);
timerAttachInterrupt(timer, &display_updater, true);
timerAlarmWrite(timer, 4000, true);
timerAlarmEnable(timer);

delay(1000);
}

void loop() {

delay(100);

}`

Hello again,

I solved the problem. Looks like the default SPI frequency of 20 MHz is to fast for this panel type. I tried different frequency between 10-20 MHz. All of them work fine. So I set SPI to 19.999.999 Hz.

Have to be define before "include <PxMatrix.h>

Header

`#include <Arduino.h>

#define PxMATRIX_MAX_WIDTH 128
#define PxMATRIX_MAX_HEIGHT 32
#define PxMATRIX_SPI_FREQUENCY 19999999 // DEFAULT: 20000000 = 20 MHz

#define matrix_width 128
#define matrix_height 32

#define P_LAT 22
#define P_A 19
#define P_B 23
#define P_C 18
#define P_D 21 // 5
#define P_E 4 // 15
#define P_OE 2 // 16
hw_timer_t * timer = NULL;
portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED;
// This defines the 'on' time of the display is us. The larger this number,
// the brighter the display. If too large the ESP will crash
uint8_t display_draw_time=30; //30-70 is usually fine

#include <PxMatrix.h>

PxMATRIX display(matrix_width,matrix_height,P_LAT, P_OE,P_A,P_B,P_C);`

Setup:

display.begin(8); display.setMuxDelay(1,1,1,1,1); display.setPanelsWidth(2);

bild3
bild4