Skip to content

Commit

Permalink
Merge pull request #119 from vortigont/i2s_8mhz
Browse files Browse the repository at this point in the history
set 8MHz as default for HUB75 I2S clock rate
  • Loading branch information
vortigont committed Jul 29, 2024
2 parents b94268a + 194e765 commit dd7dcfb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion profiles/hu-wf2/display.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"hub75":{"width":64,"height":32,"R1":2,"G1":6,"B1":10,"R2":3,"G2":7,"B2":11,"A":39,"B":38,"C":37,"D":36,"E":21,"CLK":34,"OE":35,"LAT":33,"clkphase":false,"driver":0,"clkrate":20000000,"colordpth":5,"minrr":60,"latblank":2},"dtype":1}
{"hub75":{"width":64,"height":32,"R1":2,"G1":6,"B1":10,"R2":3,"G2":7,"B2":11,"A":39,"B":38,"C":37,"D":36,"E":21,"CLK":34,"OE":35,"LAT":33,"clkphase":false,"driver":0,"clkrate":15000000,"colordpth":5,"minrr":60,"latblank":2},"dtype":1}
2 changes: 1 addition & 1 deletion resources/html/js/ui_lamp.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
{
"id":"clkrate",
"html":"select",
"value":15000000,
"value":8000000,
"label":"Частота Clk",
"section":"options",
"block":[
Expand Down
7 changes: 4 additions & 3 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ An object file for LED output devices, backends and buffers
#include "ESP32-HUB75-MatrixPanel-I2S-DMA.h"
#include "log.h"

#define FASTLED_VOLTAGE 5
#define FASTLED_MIN_CURRENT 1000
#define FASTLED_VOLTAGE 5
#define FASTLED_MIN_CURRENT 1000
#define DEFAULT_I2S_CLOCK_RATE 8000000

bool LEDDisplay::start(){
if (_dengine) return true; // Overlay engine already running
Expand Down Expand Up @@ -153,7 +154,7 @@ bool LEDDisplay::_start_hub75(const JsonDocument& doc){
_pins, // pin mapping
static_cast<HUB75_I2S_CFG::shift_driver>( o[T_shift_drv] ), // driver chip
false, // double buff (we do not need it)
static_cast<HUB75_I2S_CFG::clk_speed>( o[T_clk_rate] ),
static_cast<HUB75_I2S_CFG::clk_speed>( o[T_clk_rate] | DEFAULT_I2S_CLOCK_RATE ),
o[T_lat_blank],
o[T_clk_phase],
o[T_min_refresh],
Expand Down

0 comments on commit dd7dcfb

Please sign in to comment.