Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LED Matrix Panel YS-P2-320x160-40S-V2 with FM6363C chip #137

Open
tieutuanbao opened this issue Oct 24, 2024 · 7 comments
Open

LED Matrix Panel YS-P2-320x160-40S-V2 with FM6363C chip #137

tieutuanbao opened this issue Oct 24, 2024 · 7 comments

Comments

@tieutuanbao
Copy link

tieutuanbao commented Oct 24, 2024

Panel description

Dimensions (in pixels) : 160x80

Scan factor: 1/40

Chips on rear side: FM6363C, 74HC245KA

https://vi.aliexpress.com/item/1005005326933468.html?gatewayAdapt=glo2vnm

Panel photos

image
image
image

My Issue

I don't know how to config for this panel. My code following.

My test code

/*--------------------------------------------------------------------------------------
 Demo for RGB panels

 DMD_STM32a example code for STM32 and RP2040 boards

 Draw bitmap example.
 ------------------------------------------------------------------------------------- */
#include "DMD_RGB.h"
#include "DMD_RGB_FM6353.h"
#include "bitmaps.h"

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

// Enable of output buffering
// if true, changes only outputs to matrix after
// swapBuffers(true) command
// If dual buffer not enabled, all output draw at matrix directly
// and swapBuffers(true) cimmand do nothing
#define ENABLE_DUAL_BUFFER true
/* =================== *
*     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 PB8
#define DMD_PIN_B PB9
#define DMD_PIN_C PB10
#define DMD_PIN_D PB11
#define DMD_PIN_E PB12
// 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 PA7
#define DMD_PIN_SCLK PB14

// 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[] = {PB13, PB0,PB1,PB3,PB5,PB6,PB7 }; // 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>
// We use 64x32 matrix with 16 scans and 4bit color:
//DMD_RGB <5,160,80,40,0,COLOR_4BITS_Packed> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
DMD_RGB_FM6363 <5,160,80,40,0, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
// other options are:
// <RGB32x16plainS8> -  32x16 matrix with 8scans
// <RGB80x40plainS20> - 80x40 matrix with 20scans
// <RGB64x64plainS32> - 64x64 matrix with 32scans
// Color depth - <COLOR_4BITS_Packed>(STM32 only) or <COLOR_4BITS> 

#define BRIGHTNESS_DEFAULT 50  // (brightness 0-255, recomended 30-100)

// bitmap images to show
const uint16_t* bitmaps[] = {evening_64_32, vyshivka_64_32};
uint8_t ptr = 0;
/*--------------------------------------------------------------------------------------
  setup
  Called by the Arduino architecture before the main loop begins
--------------------------------------------------------------------------------------*/

void setup(void)
{
// initialize DMD objects
	dmd.init(); 
 
}

/*--------------------------------------------------------------------------------------
  loop
  Arduino architecture main loop
--------------------------------------------------------------------------------------*/

void loop(void)
{
  if (ptr == (sizeof(bitmaps)/ sizeof(bitmaps[0]))) ptr =0;
  
  // initial brightness
  uint8_t b=BRIGHTNESS_DEFAULT;      
  dmd.setBrightness(b);
  
  // draw image starting from 0,0, width 64 height 32
  dmd.drawRGBBitmap(dmd.width() - 64, 0, bitmaps[ptr], 64, 32);
  
  // show the image during 15sec
  delay(15000);
  
  // fading to dark
  while (b) {
    dmd.setBrightness(b);
    delay(100);
    b--;
  }

  // blank screen 2sec
  dmd.clearScreen(true);
  delay(2000);

  // increment image pointer
  ptr++;
}

Below that example code, i don't change anything.

Specifications

  • Library version: V1.1.5
  • Platform: STM32
  • MCU board: STM32F407VET6 black board
  • Connections: [B0, B1, B3, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, A7]; // R0, G0, B0, R1, G1, B1, A, B, C, D, E, CLK, SCLK, OE
@board707
Copy link
Owner

Hi
Please provide more info about your setup and connections.

  1. The panel should use a third type of chip - it would be better if you could provide its ID for me.
  2. What the exact library version you use? "dev-V2" is not a version, the version number looks like 0.9.5 or 1.1.4
  3. Please show your test code

@tieutuanbao
Copy link
Author

Hi Please provide more info about your setup and connections.

  1. The panel should use a third type of chip - it would be better if you could provide its ID for me.
  2. What the exact library version you use? "dev-V2" is not a version, the version number looks like 0.9.5 or 1.1.4
  3. Please show your test code
  1. Sorry, i don't know what is a third type of chip.
    2 & 3. I updated.

@board707
Copy link
Owner

Thank you
Note that in COLOR_4BITS mode the R G B & CLK pins must be either PA0- PA6 or PB0-PB6 without gaps in numbers.
In contrast, your pin set does not contain pins PB2 and PB4, and the CLK is selected in the upper half of the port.

To use these pins, you need to change the color mode to COLOR_4BITS_Packed.
Than run the test dmd_rgb_pattern_test.ino

@tieutuanbao
Copy link
Author

Thanks!! I tried, but same result.

DMD_RGB_FM6363 <5,160,80,40,0, COLOR_4BITS_Packed> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

@board707
Copy link
Owner

Please explain what the result you got?

@tieutuanbao
Copy link
Author

Sorry, nothing happened on my panel.

@board707
Copy link
Owner

Hi
Honesty speaking, I don't have much ideas about the issue. I didn't found any serious errors in your code.
Your board and selected pins are not tested before, but I see nothing wrong in them.

Could you test working with panel, using the pins from the examples?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants