Controlling LEDs - understanding bit/byte/pixel
in
Programming Questions
•
2 years ago
Hi guys,
so I'm trying to control a LED indicator board via Processing. Opening a connection and sending text works perfectly. But the board is capable of displaying simple graphic data.
The data sheet (which can be found here: data sheet) explains on pages 13-14 how a message has to be constructed:
so I'm trying to control a LED indicator board via Processing. Opening a connection and sending text works perfectly. But the board is capable of displaying simple graphic data.
The data sheet (which can be found here: data sheet) explains on pages 13-14 how a message has to be constructed:
I got 3 questions of which I'm hoping someone can explain:Each Graphic Block built by 4 8x8 dots units
Sequence of data is shown below.
Graphic data mapping
Graphic Pixels: D0,D1,D2,...D255, four Pixel is represented by 1 Byte.
Byte 1 = D0..D3
Byte 2 = D4..D7
Byte 3 = D8..D11
...
Byte 63 = D252..256
Structure of each Data : Each Pixel composite by 2 bit. MSB is the most Left Bit
e.g. the first dot is RED ,the second dot is GREEN, the third dot is yellow and the forth dot is black.
Data = 10 01 11 00
| | | |
| | | -Black
| | ----- Yellow
| --------- GREEN
------------ RED
- As I understand the explanations, there is a "layout helper thing" called Graphic Block. One Graphic Block consists of 4 8x8 dots units. Inside one of the 4 8x8 units the graphic pixels are denoted left to right and row by row (see image). Four of these graphic pixels are represented by one byte. Every single pixel consists of 2 bit ("colour management"). Did I get the theoretical background right so far? And could someone explain to me, what exactly one LED is in this whole description? A "dot"?
- The data sheet obviously was made for two different products - single colour and multi-colour LED boards. Mine consists of red LEDs only. How is the data structure supposed to look like then? 10 10 10 10?
- I have no idea how to transfer all this theoretical background into code. Can you help me getting started please?
1