I'm doing a research for RGB LED chips that MCU can control with one pin. I found this LED chip and it seems controlling LEDs is not as I've tought. I understand hardware part, software side is a problem.
In chip's datasheet, on page 6, you can find chapter four
Data Transfer Format.
My questions are: Why
D2 has only
second 24 bit,
third 24 bit while
D3 has only
third 24 bit and why
D4 has no bits? What should I do when I'm done with "updating LEDs"?
I thought controlling LEDs can be done like this:
- Lets say I have five LEDs to control. Every LED has Red, Green and Blue and every color is 8-bit. Five times three is 15 bytes array.
- First three bytes in array are for last LED chip. While sending the data, highest bit(bit 7) will go first.
- After first three bytes, MCU will stop for X microseconds. After delay, new three bytes will push old three bytes to second LED chip.
- After MCU is done with sending data, it will leave data pin low.