board707 / DMD_STM32

STM32Duino library for RGB, Monochrome and Two-color led matrix panels
GNU General Public License v3.0
72 stars 22 forks source link

New panel support #119

Closed DoomHammer closed 3 months ago

DoomHammer commented 3 months ago

Panel description

I got those outdoor P5 panels by mistake and I'm trying to figure out the correct pattern for them. Does it look similar to anything that's been already defined in the code?

Dimensions (in pixels) : 64x32

Scan factor: 1/8

Chips on rear side: ?, ?, ?

Panel photos

not yet

Sample videos

https://github.com/user-attachments/assets/1295ce46-5ea6-48cd-b4ec-f0771b7ea049

Specifications

board707 commented 3 months ago

Hi Please show the code used to make this video

DoomHammer commented 3 months ago
/*--------------------------------------------------------------------------------------
 Demo for RGB panels

 DMD_STM32a example code for STM32 and RP2040 boards

 Pattern test for 32x16 1/2 1/4 RGB panels
 ------------------------------------------------------------------------------------- */
 #include "DMD_RGB.h"

//Number of panels in x and y axis
#define DISPLAYS_ACROSS 3
#define DISPLAYS_DOWN 1

// Output buffering - false
#define ENABLE_DUAL_BUFFER false

/* =================== *
*     STM32F4 pins     *
*  =================== */
#if (defined(__STM32F1__) || defined(__STM32F4__))
// ==== DMD_RGB pins ====
// mux pins - A, B, C... all mux pins must be selected from same port!
#define DMD_PIN_A PB6
#define DMD_PIN_B PB5
#define DMD_PIN_C PB4
#define DMD_PIN_D PB3
#define DMD_PIN_E PB8
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C , DMD_PIN_D , DMD_PIN_E };

// pin OE must be one of PB0 PB1 PA6 PA7
#define DMD_PIN_nOE PB0
#define DMD_PIN_SCLK PB7

// Pins for R0, G0, B0, R1, G1, B1 channels and for clock.
// By default the library uses RGB color order.
// If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins.
// All this pins also must be selected from same port!
uint8_t custom_rgbpins[] = {PA6, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1

/* =================== *
*     RP2040 pins     *
*  =================== */
#elif (defined(ARDUINO_ARCH_RP2040))
// ==== DMD_RGB pins ====
// mux pins - A, B, C... mux pins must be consecutive in ascending order
#define DMD_PIN_A 6
#define DMD_PIN_B 7
#define DMD_PIN_C 8
#define DMD_PIN_D 9
#define DMD_PIN_E 10
// put all mux pins at list
uint8_t mux_list[] = { DMD_PIN_A , DMD_PIN_B , DMD_PIN_C , DMD_PIN_D , DMD_PIN_E };

// pin OE must be one of PB0 PB1 PA6 PA7
#define DMD_PIN_nOE 15
#define DMD_PIN_SCLK 12

// Pins for R0, G0, B0, R1, G1, B1 channels and for clock.
// By default the library uses RGB color order.2
// If you need to change this - reorder the R0, G0, B0, R1, G1, B1 pins.
// All this pins also must be consecutive in ascending order
uint8_t custom_rgbpins[] = { 11, 0,1,2,3,4,5 }; // CLK, R0, G0, B0, R1, G1, B1
#endif

// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH>

// For pattern testing use one of matrix below:
// RGB32x16plainS4         - 32x16 1/4 Binary mux
// RGB32x16plainS4_DIRECT  - 32x16 1/4 Direct mux
// RGB32x16plainS2         - 32x16 1/2 Binary mux
// RGB32x16plainS2_DIRECT  - 32x16 1/2 Direct mux

#define RGB64x32_S8_P5_Outdoor         3,64,32,8,0
#define DISPLAY_TYPE RGB64x32_S8_P5_Outdoor

DMD_RGB <DISPLAY_TYPE, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

uint16_t bg = 0;  // background - black
uint16_t fg = 0;  // foreground

void setup(void)
{
    dmd.init();
    fg = dmd.Color888(0, 0, 255);
    dmd.setBrightness(50);
}

void loop(void) {
    // fill the matrix with points row by row
    for (int i = 0; i < dmd.height(); i++) {
        for (int j = 0; j < dmd.width(); j++) {
            dmd.drawPixel(j,i, fg);
            delay(300);
        }
    }
    // clear the screen
    dmd.fillScreen(bg);
}
board707 commented 3 months ago

Thank you. We need to test the panel with another patterns. Sorry, I am not in home now. Could you pause this for one week?

DoomHammer commented 3 months ago

I was hoping to get them working before the weekend, but in that case, I'll just replace them with some spares and get back to it when you're available :)

board707 commented 3 months ago

Hi, I just returned. What are the chips there on rear side of the panel?

DoomHammer commented 3 months ago

PXL_20240806_184705962 PXL_20240806_184741687

board707 commented 3 months ago

Thanks, but on both photos are chips with same labels.. The panel has a three types a chips as minimum, please find and read another types.

DoomHammer commented 3 months ago

PXL_20240813_161244954 PXL_20240813_161248373 PXL_20240813_161254729 PXL_20240813_161301306 MP PXL_20240813_161304014 PXL_20240813_161307597 PXL_20240813_161311405 PXL_20240813_161317085 PXL_20240813_161321667

board707 commented 3 months ago

Hi Thanks for the photos> but... I apologize, but all these photos are of little help. Most of the photos show chips of the same type. On some chips, the letters are illegible. On any hub75 panel, you should find three types of chips - a driver, a multiplexer and a buffer. In all your photos, only the driver is visible - SM16208. However, to properly configure the library, I also need to know the type of multiplexer. Since the chips on your matrix are covered with a layer of varnish, it is difficult to read their designations in the photo. It would be better for you to take a magnifying glass or a microscope and find the three types of chips on your panel.

DoomHammer commented 3 months ago

Any clues where to find the others?

board707 commented 3 months ago

At least one another type are chips labeled U1-U2 on panel PCB.

DoomHammer commented 3 months ago

I got U1 and U2 but they're illegible even under microscope :(

board707 commented 3 months ago

Thank you So lets try to test the panel without knowing the drivers...

Could you change the definition of the DMD class to options below: Variant A

define RGB64x32_s8_pt1 3,64,32,8,1

DMD_RGB <RGB64x32_s8_pt1, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

Variant B

define RGB64x32_s8_pt1 3,64,32,8,1

DMD_RGB_SHIFTREG_ABC <RGB64x32_s8_pt1, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

and run the test for each?

DoomHammer commented 3 months ago

Variant A:

https://github.com/user-attachments/assets/d5421f15-b1e7-42d2-98fd-b5d46fab6f77

Variant B:

https://github.com/user-attachments/assets/1f97a259-bfc9-46d1-b670-2585cc16c30f

board707 commented 3 months ago

Thank you I can't download your videos on phone, so i will examine them later.

board707 commented 3 months ago

Please test the settings below:

#define RGB64x32_s8_DH 3,64,32,102,4,LPS
DMD_RGB <RGB64x32_s8_DH, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
DoomHammer commented 3 months ago

Which version shouldb I try? I'm getting

src/main.cpp:74:38: error: 'LPS' was not declared in this scope
board707 commented 3 months ago

Sorry, please replace "LPS" in that line to PATTERN_LPS:

#define RGB64x32_s8_DH 3,64,32,102,4,PATTERN_LPS
DMD_RGB <RGB64x32_s8_DH, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
DoomHammer commented 3 months ago

This still doesn't look good as the scan is set to 102. I assume 4 should come before 102 but then what?

board707 commented 3 months ago

oops...

#define RGB64x32_s8_DH 3,64,32,8,102,4,PATTERN_LPS

DoomHammer commented 3 months ago

Looks like this might be it!

DoomHammer commented 3 months ago

Yes, it is. Thank you!