Closed tahafathi2013 closed 2 months ago
Hi, you have a 16scan panel, it is not need a E pin.
If you have a problem with the library with your panel, please show your test code with all connections defined.
im use this code :
`/*-------------------------------------------------------------------------------------- Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board
Pattern test for 32x16 1/2 1/4 RGB panels ------------------------------------------------------------------------------------- */
//Number of panels in x and y axis
// Output buffering - false
// ==== DMD_RGB pins ==== // mux pins - A, B, C... all mux pins must be selected from same port!
// 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
// 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[] = { PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1
// 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_DIRECT - 32x16 1/2 Binary mux // example: // #define RGB80x40plainS20 5,80,40,20,0 // 5 mux pins(A B C D E), 80x40, scan 1/20, pattern 0 // // pattern_ID is unique number for pattern design // pattern ID between 0 and 31 and after 255 are reserved for library use // and from 32 to 127 - for user panels, added by author // for new panels added yourself use pattern_ID between 128 and 255 // DMD_RGB <RGB64x32plainS16 , 4> 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(30); } } // clear the screen dmd.fillScreen(bg); } `
im connected led panel to stm32 pins:
and connected this pins :
uint8_t custom_rgbpins[] = { PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1
my panel dont have sclk pin to connect PB7 but im connect this pin to PA15
Don.t confuse the CLK and the SCLK pins. The library SCLK pin is the same as LAT pin on the panel. You should connect PA15 to CLK and PB7 to LAT.
pin connection : P5 - STM32 R1 - A0 G1 - A1 B1 - A2
A - B6 B - B5 C - B4 D - B3
CLK - A15 LAT - B7 OE - B0
MY CODE :
/*-------------------------------------------------------------------------------------- Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board
Pattern test for 32x16 1/2 1/4 RGB panels ------------------------------------------------------------------------------------- */
//Number of panels in x and y axis
// Output buffering - false
// ==== DMD_RGB pins ==== // mux pins - A, B, C... all mux pins must be selected from same port!
// 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
// 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[] = { PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1
// 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_DIRECT - 32x16 1/2 Binary mux
DMD_RGB <RGB64x32plainS16, 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(30); } } // clear the screen dmd.fillScreen(bg); }
BUT NOT WORKIN . . . .
https://github.com/board707/DMD_STM32/assets/19773695/6589fc9d-25f0-476e-8e4b-c2d605282fae
Sorry, l am not home now.
Ok No problem. When you at home chek this problem and help me to fix it.please
Do you use a st-link to upload the code to the stm32?
No im using serial programmer
how fix it problem??
/*-------------------------------------------------------------------------------------- Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board ------------------------------------------------------------------------------------- */
// Fonts includes
//Number of panels in x and y axis
// 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
// ==== DMD_RGB pins ==== // mux pins - A, B, C... all mux pins must be selected from same port!
// CLK, R0, G0, B0, R1, G1, B1
// put all mux pins at list uint8_t mux_list[] = { DMD_PIN_A, DMD_PIN_B, DMD_PIN_C, DMD_PIN_D };
// pin OE must be one of PB0 PB1 PA6 PA7
// 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[] = { DMD_CLK, DMD_PIN_R1, DMD_PIN_G1, DMD_PIN_B1, DMD_PIN_R0, DMD_PIN_G0, DMD_PIN_B0 }; // CLK, R0, G0, B0, R1, G1, B1
// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH>
// We use 64x32 matrix with 16 scans and 4bit color:
DMD_RGB<RGB64x32plainS16, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
// other options are:
//
// --- Define fonts ---- // DMD.h old style font DMD_Standard_Font UkrRusArial_F(UkrRusArial_14); /// GFX font with sepatate parts for Latin and Cyrillic chars DMD_GFX_Font GlametrixL((uint8_t)&GlametrixLight12pt7b, (uint8_t)&GlametrixLight12pt8b_rus, 0x80, 13);
uint16_t bg = 0; // background - black uint16_t fg = 50; // foreground
/-------------------------------------------------------------------------------------- setup Called by the Arduino architecture before the main loop begins --------------------------------------------------------------------------------------/
void setup(void) { // initialize DMD objects dmd.init(); fg = dmd.Color888(0, 0, 255); dmd.setBrightness(200); }
/-------------------------------------------------------------------------------------- loop Arduino architecture main loop --------------------------------------------------------------------------------------/
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(30); } } // clear the screen dmd.fillScreen(bg);
}
I remove DMD_PIN_E
Try to use pb8 to pin D and pb10 as pin C. Also you have an incorrect order of RGB pins: pins R0G0B0 should be first and then R1 G1 B1
I try it but not working yet. When my hand near wire of clk pin
https://github.com/board707/DMD_STM32/assets/19773695/fb0f8e36-ec3b-4ae3-92df-6cf85afbe95a
/*-------------------------------------------------------------------------------------- Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board ------------------------------------------------------------------------------------- */
// Fonts includes
//Number of panels in x and y axis
// 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
// ==== DMD_RGB pins ==== // mux pins - A, B, C... all mux pins must be selected from same port!
// CLK, R0, G0, B0, R1, G1, B1
// put all mux pins at list uint8_t mux_list[] = { DMD_PIN_A, DMD_PIN_B, DMD_PIN_C, DMD_PIN_D };
// pin OE must be one of PB0 PB1 PA6 PA7
// 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[] = { DMD_CLK, DMD_PIN_R0, DMD_PIN_G0, DMD_PIN_B0, DMD_PIN_R1, DMD_PIN_G1, DMD_PIN_B1 }; // CLK, R0, G0, B0, R1, G1, B1
// Fire up the DMD object as dmd<MATRIX_TYPE, COLOR_DEPTH>
// We use 64x32 matrix with 16 scans and 4bit color:
DMD_RGB<RGB64x32plainS16, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);
// other options are:
//
// --- Define fonts ---- // DMD.h old style font DMD_Standard_Font UkrRusArial_F(UkrRusArial_14); /// GFX font with sepatate parts for Latin and Cyrillic chars DMD_GFX_Font GlametrixL((uint8_t)&GlametrixLight12pt7b, (uint8_t)&GlametrixLight12pt8b_rus, 0x80, 13);
uint16_t bg = 0; // background - black uint16_t fg = 50; // foreground
/-------------------------------------------------------------------------------------- setup Called by the Arduino architecture before the main loop begins --------------------------------------------------------------------------------------/
void setup(void) { // initialize DMD objects dmd.init(); fg = dmd.Color888(0, 255, 0); dmd.setBrightness(200); }
/-------------------------------------------------------------------------------------- loop Arduino architecture main loop --------------------------------------------------------------------------------------/
void loop(void) { fg = dmd.Color888(0, 0, 255); // 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(30); } } // clear the screen dmd.fillScreen(bg);
fg = dmd.Color888(0, 255, 0); // 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(30); } } // clear the screen dmd.fillScreen(bg);
fg = dmd.Color888(255, 0, 0); // 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(30); } } // clear the screen dmd.fillScreen(bg);
}
Sorry, I don't have any additional ideas.
DMD_RGB<RGB64x32plainS16, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER); IN this line code need to change RGB64x32plainS16, COLOR_4BITS????
why when CLK pin touched by my finger turned on half?
why when CLK pin touched by my finger its working ?
The matrix code uses a high frequency pulses (dozen megahertz) and it is very sensitive to unreliable connections. Do not use separate wires, use dedicated 16pin connector.
Choose wich cpu spee? Im use 16 pin connector or wires but dont work it. My panel dont have pin E but im remove pin E from code. What is configure without pin E?? Please get me example without pin E to test screen
Pin E is not used for matrices with 16 scans or lower, so this setting doesn't matter for your configuration. Honestly, I don't see any problems with your pins setup. I don't have an idea why it not works.
ok your examples why not working adafruit gfx 1.11 ?? what your panel models tested by your examples stm32 f103c8t6c???
The library works with Adafruit Gfx v 1.7 , the link is in the Readme. But your question surprised me, if you would to use incorrect adafrit gfx version, the code doesn't compile. The library tested with dozens of different panels. Your panel looks compatible, your code is correct , and your connections is right. It should work. Sorry for inconvenience, but I don't know how to help you.
It may be because of uploading the code through serial? It means that it has not been transmitted through the correct serial? Could it be because of the (https://github.com/rogerclarkmelbourne/Arduino_STM32)?
I change pin numbers to this but not working this time use st link programmer . but not working again.
/*-------------------------------------------------------------------------------------- Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board
Pattern test for 32x16 1/2 1/4 RGB panels ------------------------------------------------------------------------------------- */
//Number of panels in x and y axis
// Output buffering - false
// ==== DMD_RGB pins ==== // mux pins - A, B, C... all mux pins must be selected from same port!
//#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 };
// pin OE must be one of PB0 PB1 PA6 PA7
// 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[] = { PA15, PA0,PA1,PA2,PA3,PA4,PA5 }; // CLK, R0, G0, B0, R1, G1, B1
// 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_DIRECT - 32x16 1/2 Binary mux
DMD_RGB <RGB64x32plainS16, 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(30); } } // clear the screen dmd.fillScreen(bg); }
When programmed with stlink
When press reset key moving leds.
https://github.com/board707/DMD_STM32/assets/19773695/bee7594e-a650-46df-a0c3-855354a1219b
/*-------------------------------------------------------------------------------------- Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board
Pattern test for 32x16 1/2 1/4 RGB panels ------------------------------------------------------------------------------------- */
//Number of panels in x and y axis
// Output buffering - false
// ==== DMD_RGB pins ==== // mux pins - A, B, C... all mux pins must be selected from same port!
// 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
// 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
// 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_DIRECT - 32x16 1/2 Binary mux
//
DMD_RGB <RGB64x32plainS16, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER); //DMD_RGB <RGB80x40plainS20, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER); //DMD_RGB <RGB128x64plainS32, 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) { enableDebugPorts(); 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(30); } } // clear the screen dmd.fillScreen(bg); }
Hi, Try this Code. Working without problem with me.
Thank you so much @board707
/*-------------------------------------------------------------------------------------- Demo for RGB panels
DMD_STM32a example code for STM32F103xxx board
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 1 #define DISPLAYS_DOWN 1
// Output buffering - false #define ENABLE_DUAL_BUFFER false
// ==== 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
// 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_DIRECT - 32x16 1/2 Binary mux // - 80x40 matrix with 20scans
DMD_RGB <RGB64x32plainS16, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER); //DMD_RGB <RGB80x40plainS20, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER); //DMD_RGB <RGB128x64plainS32, 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) { enableDebugPorts(); 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(30); } } // clear the screen dmd.fillScreen(bg); }
what use board?? im using bluepill it work on bluepill?
Yes, Iam using also P5 panel like yours and bluepill. Be careful about pin number
I using your code but not working . Can you upload image from your wire connections an your panel details. My panel not have E pin.
Picture won't help since I'm using a FLAT cable. Pin numbers are as seen in the sample code I sent. PinE is not required on this panel.
i when use fg = dmd.Color888(255, 255, 255); not change the color.
Picture won't help since I'm using a FLAT cable. Pin numbers are as seen in the sample code I sent. PinE is not required on this panel.
my wire connections same as sample code.but not working
This code fills the panel with blue dots.
I change the colors
fg = dmd.Color888(255, 255, 255) But not working.
send a picture of your connections
I will check for you
Are you install and configure stm boards from https://github.com/rogerclarkmelbourne/Arduino_STM32 ??? Change any thing on your board like resistors?
I burn bootloader by cub programmer. And upload the code by stlink.
in my code CLK PIN = PA6 you are usingPA15, please change it
I change it but not working yet.
Sorry ,I don't have any advice
Sorry ,I don't have any advice
Is it possible that the micro or the micro flash memory is damaged?
This my config for bluepill
I have sometimes error when upload project
im use p5 rgb module. But i have not pin E on my module. Module have R1 - G1 B1 - GND R2 - G2 B2 - GND A - B C - D CLK - LAT OE - GND