spelling mistakes/readme corrections
This commit is contained in:
parent
c425b9caa7
commit
445c0424f4
3 changed files with 15 additions and 29 deletions
33
FM6126A.md
33
FM6126A.md
|
@ -1,46 +1,29 @@
|
||||||
## The mystery of control registers for FM6126A chips
|
## The mystery of control registers for FM6126A chips
|
||||||
|
|
||||||
|
|
||||||
|
The only available Datasheet for this chips is in Chinese and does not shed a light on what those two control regs are.
|
||||||
|
|
||||||
Datasheet for this chis chip is in chineese and does not shed a light on what those two control regs are.
|
An excellent insight could be found here https://github.com/hzeller/rpi-rgb-led-matrix/issues/746#issuecomment-453860510
|
||||||
|
|
||||||
An excellent insight could be found here
|
|
||||||
|
|
||||||
https://github.com/hzeller/rpi-rgb-led-matrix/issues/746#issuecomment-453860510
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
So there are two regs in this chip - **REG1** and **REG2**,
|
||||||
So there are two regs - **REG1** and **REG1**,
|
|
||||||
|
|
||||||
one could be written with 12 clock pusles (and usually called reg12, dunno why :))
|
one could be written with 12 clock pusles (and usually called reg12, dunno why :))
|
||||||
|
the other one could be written with 13 clock pulses (and usually called reg13, dunno why :))
|
||||||
the other one could be written with 13 clock pusles (and usually called reg13, dunno why :))
|
|
||||||
|
|
||||||
|
|
||||||
|
I've done some measurmens on power consumption while toggling bits of **REG1** and it looks that it could provide a fine grained brighness control over the entire matrix with no need for bitbanging over RGB or EO pins.
|
||||||
So I've done some measurmens on power consumption while toggling bits of **REG1** and it looks that it could provide a fine grained brighness control over matrix.
|
|
||||||
|
|
||||||
There are 6 bits (6 to 11) giving an increased brighness (compared to all-zeroes) and 4 bits (2-5) giving decreased brighness!!!
|
There are 6 bits (6 to 11) giving an increased brighness (compared to all-zeroes) and 4 bits (2-5) giving decreased brighness!!!
|
||||||
|
Still unclear if FM6112A brightness control is internally PWMed or current limited, might require some poking with oscilloscope.
|
||||||
|
|
||||||
|
So it seems that the most bright (and hungry for power) value is bool REG1[16] = {0,0,0,0,0, 1,1,1,1,1,1, 0,0,0,0,0}; and not {0,1,1,1,1, 1,1,1,1,1,1, 1,1,1,1,1} as it is usually used.
|
||||||
|
|
||||||
So it seems that the most bright (and hungry for power) value is
|
|
||||||
|
|
||||||
bool REG1[16] = {0,0,0,0,0, 1,1,1,1,1,1, 0,0,0,0,0}; and not {0,1,1,1,1, 1,1,1,1,1,1, 1,1,1,1,1} as it is usually used.
|
|
||||||
|
|
||||||
I'm not sure about bit 1 - it is either not used or I was unable to measure it's influence to brightness/power.
|
I'm not sure about bit 1 - it is either not used or I was unable to measure it's influence to brightness/power.
|
||||||
|
|
||||||
|
Giving at least 10 bits of hardware brightness control opens pretty nice options for offloading and simplifiyng matrix output. Should dig into this more deeper.
|
||||||
|
|
||||||
Giving at least 10 bits of hardware brightness control opens pretty nice options for offloading. Should dig into this more deeper.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Here are some of the measurments I've took for 2 64x64 panels filled with white color - reg value and corresponding current drain in amps.
|
Here are some of the measurments I've took for 2 64x64 panels filled with white color - reg value and corresponding current drain in amps.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|REG1 |bit value|Current, amps |
|
|REG1 |bit value|Current, amps |
|
||||||
|--|--|--|
|
|--|--|--|
|
||||||
|REG1| 0111111 00000| >5 amps|
|
|REG1| 0111111 00000| >5 amps|
|
||||||
|
|
|
@ -29,7 +29,7 @@ By default the pin mapping is as follows (defaults defined in ESP32-HUB75-Matrix
|
||||||
| R1 G1 | R1 -> IO25 G1 -> IO26
|
| R1 G1 | R1 -> IO25 G1 -> IO26
|
||||||
| B1 GND | B1 -> IO27
|
| B1 GND | B1 -> IO27
|
||||||
| R2 G2 | R2 -> IO14 G2 -> IO12
|
| R2 G2 | R2 -> IO14 G2 -> IO12
|
||||||
| B2 GND | B2 -> IO13
|
| B2 E | B2 -> IO13 E -> N/A (required for 1/32 scan panels, like 64x64. Any available pin would do, i.e. IO32 )
|
||||||
| A B | A -> IO23 B -> IO19
|
| A B | A -> IO23 B -> IO19
|
||||||
| C D | C -> IO 5 D -> IO17
|
| C D | C -> IO 5 D -> IO17
|
||||||
| CLK LAT | CLK -> IO16 LAT -> IO 4
|
| CLK LAT | CLK -> IO16 LAT -> IO 4
|
||||||
|
@ -52,7 +52,7 @@ However, if you want to change this, simply provide the wanted pin mapping as pa
|
||||||
#define B_PIN 22
|
#define B_PIN 22
|
||||||
#define C_PIN 5
|
#define C_PIN 5
|
||||||
#define D_PIN 17
|
#define D_PIN 17
|
||||||
#define E_PIN -1
|
#define E_PIN -1 // required for 1/32 scan panels, like 64x64. Any available pin would do, i.e. IO32
|
||||||
|
|
||||||
#define LAT_PIN 4
|
#define LAT_PIN 4
|
||||||
#define OE_PIN 15
|
#define OE_PIN 15
|
||||||
|
@ -113,6 +113,8 @@ By default you should not need to change / set the brightness setting as the def
|
||||||
|
|
||||||
The value to pass 'setPanelBrightness' must be a value less than MATRIX_WIDTH. For example for a single 64x32 LED Matrix Module, a value less than 64. However, if you set the brightness too high, you may experience ghosting.
|
The value to pass 'setPanelBrightness' must be a value less than MATRIX_WIDTH. For example for a single 64x32 LED Matrix Module, a value less than 64. However, if you set the brightness too high, you may experience ghosting.
|
||||||
|
|
||||||
|
Also you may use method `setPanelBrightness8(x)`, where x is a uint8_t value between 0-255. Library will recalculate required brightness level depending on matrix width (mostly useful with FastLED-based sketches).
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -122,6 +124,9 @@ void setup() {
|
||||||
matrix.setPanelBrightness(16); // Set the brightness. 32 or lower ideal for a single 64x32 LED Matrix Panel.
|
matrix.setPanelBrightness(16); // Set the brightness. 32 or lower ideal for a single 64x32 LED Matrix Panel.
|
||||||
matrix.clearScreen(); // You must clear the screen after changing brightness level for it to take effect.
|
matrix.clearScreen(); // You must clear the screen after changing brightness level for it to take effect.
|
||||||
|
|
||||||
|
// or another way
|
||||||
|
matrix.setPanelBrightness(192); // Set the brightness to about 3/4 (192/256) of maximum.
|
||||||
|
matrix.clearScreen(); // You must clear the screen after changing brightness level for it to take effect.
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -71,7 +71,6 @@ void setup()
|
||||||
listPatterns();
|
listPatterns();
|
||||||
|
|
||||||
|
|
||||||
//patterns.setPattern(0); // // simple noise
|
|
||||||
patterns.moveRandom(1); // start from a random pattern
|
patterns.moveRandom(1); // start from a random pattern
|
||||||
|
|
||||||
Serial.print("Starting with pattern: ");
|
Serial.print("Starting with pattern: ");
|
||||||
|
@ -92,7 +91,6 @@ void loop()
|
||||||
//patterns.move(1);
|
//patterns.move(1);
|
||||||
patterns.start();
|
patterns.start();
|
||||||
|
|
||||||
|
|
||||||
Serial.print("Changing pattern to: ");
|
Serial.print("Changing pattern to: ");
|
||||||
Serial.println(patterns.getCurrentPatternName());
|
Serial.println(patterns.getCurrentPatternName());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue