DMD_STM32 - библиотека DMD матриц для СТМ32 и RP2040

Микросхемы sm5266ph, sm162065

Попробуйте строчку инициализации матрицы заменить на

#define RGB64x32_s8_Max		3,64,32,8,0	// 64x32 s8
DMD_RGB_SHIFTREG_ABC<RGB64x32_s8_Max, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

и посмотрите, появится ли хоть какое-то изображение.

И еще перечислите полностью, какие пины используете.

(уехал на дачу, прочитаю вечером)

Никаких изменений. Ни один светодиод не моргнул.
Пины задействовал такие

не знаю что в таком случае посоветовать. Пины Ваши вроде бы нормальные.
На всякий случай выложите скетч, которым тестировали.

Скетч из примеров брал dmd_rgb.ino

А прошиваете плату как - через USB бутлоадер или через Ст-линк?

Попробуйте заменить пины PB3 PB4 на какие-то другие на порту B - например PB10 PB11

St-link

тогда меняйте pb3 pb4 - они совместно с ст-линком не работают

И после этого попробуйте снова как стандартный пример, так и с исправлением выше - с классом

DMD_RGB_SHIFTREG_ABC

Исправил на РВ10 и 11 Со стандартным примером появился синий квадрат (на фото)

С классом ничего совсем не появляется

Еще раз - выложите пожалуйста код, который запускаете.
Не надо писать что это стандартный пример - просто выложите код именно так, как загружаете в плату

#include <DMD_Config.­h>
#include <DMD_Font.h>
#include <DMD_Monochr­ome_Parallel.h>
#include <DMD_MonoChr­ome_SPI.h>
#include <DMD_RGB.h>­
#include <DMD_STM32a.­h>
#include <SPI_DMA.h>­
#include <stm_int.h>­
 ­
/*-------------------­---------------------­---------------------­---------------------­----
 Demo for RGB panels­
 ­
 DMD_STM32a example c­ode for STM32F103xxx ­board
 --------------------­---------------------­---------------------­---------------------­-- */
#include "DMD_RGB.h"­
 ­
 // Fonts includes­
#include "st_fonts/Uk­rRusArial14.h"
#pragma GCC diagnosti­c ignored "-Wnarrowin­g"
#pragma GCC diagnosti­c ignored "-Woverflow­"
#include "gfx_fonts/G­lametrixLight12pt7b.h­"
#include "gfx_fonts/G­lametrixBold12pt7b.h"
#pragma GCC diagnosti­c warning "-Wnarrowin­g"
#pragma GCC diagnosti­c warning "-Woverflow­" 
 ­
//Number of panels in­ x and y axis
#define DISPLAYS_ACRO­SS 1
#define DISPLAYS_DOWN­ 1
 ­
// Enable of output b­uffering
// if true, changes o­nly outputs to matrix­ after
// swapBuffers(true) ­command
// If dual buffer not­ enabled, all output ­draw at matrix direct­ly
// and swapBuffers(tr­ue) cimmand do nothin­g
#define ENABLE_DUAL_B­UFFER false
 ­
// ==== DMD_RGB pins ­====
// mux pins - A, B, C­... all mux pins must­ be selected from sam­e port!
#define DMD_PIN_A PB6
#define DMD_PIN_B PB5
#define DMD_PIN_C PB1­1
#define DMD_PIN_D PB1­0
#define DMD_PIN_E PB8
// put all mux pins a­t list
uint8_t mux_list[] = ­{ DMD_PIN_A , DMD_PIN­_B , DMD_PIN_C };
 ­
// pin OE must be one­ of PB0 PB1 PA6 PA7
#define DMD_PIN_nOE P­B0
#define DMD_PIN_SCLK ­PB7
 ­
// Pins for R0, G0, B­0, R1, G1, B1 channel­s and for clock.
// By default the lib­rary uses RGB color o­rder.
// If you need to cha­nge this - reorder th­e R0, G0, B0, R1, G1,­ B1 pins.
// All this pins also­ must be selected fro­m same port!
uint8_t custom_rgbpin­s[] = { PA15, PA0,PA1­,PA2,PA3,PA4,PA5 }; /­/ CLK, R0, G0, B0, R1­, G1, B1
 ­
DMD_RGB <RGB64x32plai­nS16, COLOR_4BITS> dm­d(mux_list, DMD_PIN_n­OE, DMD_PIN_SCLK, cus­tom_rgbpins, DISPLAYS­_ACROSS, DISPLAYS_DOW­N, ENABLE_DUAL_BUFFER­);
// other options are:
// <RGB32x16plainS8> ­-  32x16 matrix with ­8scans
// <RGB80x40plainS20>­ - 80x40 matrix with ­20scans
// <RGB64x64plainS32>­ - 64x64 matrix with ­32scans
// Color depth - <COL­OR_4BITS> or <COLOR_1­BITS>
 ­
// --- Define fonts -­---
// DMD.h old style fo­nt
DMD_Standard_Font Ukr­RusArial_F(UkrRusAria­l_14);
// GFX font with sepa­tate parts for Latin ­and Cyrillic chars
DMD_GFX_Font Glametri­xL((uint8_t*)&Glametr­ixLight12pt7b, (uint8­_t*)&GlametrixLight12­pt8b_rus, 0x80, 13);
 ­
/*-------------------­---------------------­---------------------­---------------------­----
  UTF8 char recoding­
 ­
---------------------­---------------------­---------------------­---------------------­--*/
int utf8_rus(char* de­st, const unsigned ch­ar* src) {
 ­
    uint16_t i, j;­
    for (i = 0, j = 0­; src[i]; i++) {
        if ((src[i] =­= 0xD0) && src[i + 1]­) { dest[j++] = src[+­+i] - 0x10; }
        else if ((src­[i] == 0xD1) && src[i­ + 1]) { dest[j++] = ­src[++i] + 0x30; }
        else dest[j++­] = src[i];
    }­
    dest[j] = '\0';­
    return j;­
}­
 ­
/*-------------------­---------------------­---------------------­---------------------­----
  setup­
  Called by the Ardui­no architecture befor­e the main loop begin­s
---------------------­---------------------­---------------------­---------------------­--*/
 ­
void setup(void)­
{­
 ­
    // initialize DMD­ objects
    dmd.init(); ­
    ­
}­
 ­
/*-------------------­---------------------­---------------------­---------------------­----
  loop­
  Arduino architectur­e main loop
---------------------­---------------------­---------------------­---------------------­--*/
 ­
void loop(void)­
{­
 ­
    // create foregro­und colors
    uint16_t col[] = ­{
        dmd.Color888(­255,0, 0), // red
        dmd.Color888(­0, 255, 0), // green
        dmd.Color888(­0, 0, 255)  // blue
 ­
    };­
    uint16_t bg = 0; ­ // background - blac­k
    int col_cnt = 3; ­  // color count
 ­
    // text­
    char s[] = "Приве­т Ардуино!";
    // transcode mess­age to UTF for use wi­th GFX fonts
    char k[30];­
    ­
    utf8_rus(k, (cons­t unsigned char*)s);
    char* m = s;­
    // select standar­d font
    dmd.selectFont(&U­krRusArial_F);
    ­
    // set text foreg­round and background ­colors
    dmd.setTextColor(­col[0], bg);
 ­
    // shift steps in­ pixels for running t­ext (positive - shift­ right, negative - le­ft)
    int8_t step[] = {­ 1,-1,-2,2 };
    // running text s­hift interval
    uint16_t interval­ = 30;
 ­
    long prev_step = ­millis();
    uint8_t col_ptr =­ 0;
    uint8_t i = 0, b ­= 0;
    uint8_t test = 25­5;
    uint8_t test_cnt ­= 4;
    dmd.setBrightness­(200);
 ­
    // Cycle for test­s:
    // -- running tex­ts moving at x and y ­axis with single and ­double speed
    // -- vertical sc­rolling message
    while (1) {­
        if ((millis()­ - prev_step) > inter­val) {
            if (test ­>= test_cnt) {
                test ­= 0;
                // dr­aw message
                dmd.d­rawMarqueeX(m, -1 * (­dmd.stringWidth(m)), ­0);
                ­
                dmd.s­wapBuffers(true);
                ­
            }­
            switch (t­est) {
                // mo­ving text at x axis
            case 0:­
                if (d­md.stepMarquee(step[i­], 0) & 1) { // if te­xt is reached screen ­bounds
 ­
                    d­md.clearScreen(true);
                    /­/ set next text color
                    c­ol_ptr++;
                    i­f (col_ptr >= col_cnt­) col_ptr = 0;
                    d­md.setTextColor(col[c­ol_ptr], bg);
                    /­/ set new text speed
                    i­++;
                    /­/ if all moving finis­hed
                    i­f (i > 3) {
                     ­   // go to next stag­e
                     ­   i = 0;
                     ­   test++;
                     ­   dmd.drawMarqueeX(m­, 0, (dmd.height() > ­16)? 8 : 0);
                    }
                    e­lse {
                     ­   if (step[i] < 0) d­md.drawMarqueeX(m, dm­d.width() - 1, 0);
                     ­   else dmd.drawMarqu­eeX(m, -1 * dmd.strin­gWidth(m), 0);
                    }
                }­
                else ­{
 ­
                    i­f (step[i] != 1) dmd.­drawFilledBox(0, 0, 5­, dmd.height() - 1, G­RAPHICS_INVERSE);
                }­
                // ou­tput mem buffer to ma­trix
                dmd.s­wapBuffers(true);
                break­;
            case 1:­
                b++;­
                dmd.s­etBrightness(b);
                if (b­ > 250) {
                    t­est++;
                    b­ = 80;
                    i­ = 0;
                    d­md.setBrightness(b);
                    d­md.drawMarqueeX(m, 0,­ 0);
                }­
                dmd.s­wapBuffers(true);
                break­;
                // mo­ving text at y axis
            case 2:­
                if (d­md.stepMarquee(0, ste­p[i]) & 1) {  // if t­ext is reached screen­ bounds
 ­
                    /­/ clear the screen
                    d­md.clearScreen(true);
                    /­/ select new moving s­peed
                    i­++;
                    /­/ if all moving finis­hed
                    i­f (i > 3) {
                     ­   // go to next stag­e
                     ­   test++;
                     ­   // select GFX font­ for vertical scroll
                     ­   dmd.selectFont(&Gl­ametrixL);
                     ­   dmd.drawMarquee(k,­ strlen(k), dmd.width­() - 1,
                     ­      (dmd.height() >­ 16)? 8 : 0, 1);
 ­
                    }
                    e­lse {
                     ­   if (step[i] < 0) d­md.drawMarqueeX(m, 0,­ dmd.height());
                     ­   else dmd.drawMarqu­eeX(m, 0, 0);
                    }
                }­
                // ou­tput mem buffer to ma­trix
                dmd.s­wapBuffers(true);
                break­;
 ­
                // ve­rtical scrolling    
            case 3:­
 ­
                dmd.s­tepMarquee(-1, 0, 1);
                dmd.s­wapBuffers(true);
                break­;
 ­
            }­
 ­
            prev_step­ = millis();
 ­
        }­
    }­
}­
 ­

Строчек 1-8 в примере не было. Впрочем, это вряд ли имеет значение.

Попробуйте заменить тип матрицы на RGB64x32_S8_OKSingra . Хотя не думаю, что это поможет…

Да я менял. Тот же эффект -синий квадрат. Причем если загрузить другой пример, то тот же квадрат

Честно говоря, идей нет. Судя по моделям чипов, матрица совместима. Но почему не работает - не знаю.

Спасибо. Ещё покопаюсь, может что с контактами. Хотя несколько раз проверял

Подскажите, для платы stm32f401ccu6 пины подключения те же?

Зависит от режима цветности, есть особенности.

Подробнее на старом форуме тут, сообщение #459
https://arduino.ru/forum/proekty/dmdstm32-versiya-biblioteki-dmd-dlya-stm32duino?page=9#comment-665942

и #451
https://arduino.ru/forum/proekty/dmdstm32-versiya-biblioteki-dmd-dlya-stm32duino?page=9#comment-660125

@kasssimov

Вроде удалось исправить баг с функцией поворота setRotation(), о котором Вы писали в сообщении #213.
И еще несколько небольших исправлений.
Версия v1.0.5

Здравствуйте !
Уважаемый b707 а с матрицами на чипах 3256 и 5125 не сталкивались скан 1/10

Столкнулся с проблемой, мы тут вместе разгадывали матрицу quiangli 80*40 1/10
на чипах, sm5368 и DP3216 а теперь продавцы говорят таких больше не делают…
говорят теперь 3256 и 5125

Добрый день
Номера чипов мне ни о чем не говорят. Если у вас есть даташиты, выложите ссылки, пожалуйста.

Если панель у вас на руках - тогда все как обычно, сначала тесты, потом доработка кода.