© 2013-2014 Designer Systems Page 3 of 8
CNTRL20.06.13 Revision 1.01
HSB BRIGHTNESS value register
R8 D D D D D D D D
D..D = 0 to 255 (Brightness value)
Sunrise hour value register
R9 U U U D D D D D
D..D = 0 to 23 (Sunrise hour value)
U..U = unused on this implementation
Sunset hour value register
R10 U U U D D D D D
D..D = 0 to 23 (Sunrise hour value)
U..U = unused on this implementation
Current time hour value register
R11 U U U D D D D D
D..D = 0 to 23 (Current time hour value)
U..U = unused on this implementation
Current minute value register
R12 U U D D D D D D
D..D = 0 to 59 (Current time minute value)
U..U = unused on this implementation
RED brightness MSB register
R13 U U U U U U D D
D..D = 0x00 to 0x03 (MSB of brightness value)
U..U = unused on this implementation
RED brightness LSB register
R14 D D D D D D D D
D..D = 0x00 to 0xFF (LSB of brightness value)
GREEN brightness MSB register
R15 U U U U U U D D
D..D = 0x00 to 0x03 (MSB of brightness value)
U..U = unused on this implementation
GREEN brightness LSB register
R16 D D D D D D D D
D..D = 0x00 to 0xFF (LSB of brightness value)
BLUE brightness MSB register
R17 U U U U U U D D
D..D = 0x00 to 0x03 (MSB of brightness value)
U..U = unused on this implementation
BLUE brightness LSB register
R18 D D D D D D D D
D..D = 0x00 to 0xFF (LSB of brightness value)
WHITE brightness MSB register
R19 U U U U U U D D
D..D = 0x00 to 0x03 (MSB of brightness value)
U..U = unused on this implementation
WHITE brightness LSB register
R20 D D D D D D D D
D..D = 0x00 to 0xFF (LSB of brightness value)
The RGBW also auto increments the
register specified for every addition-
al write requested by the Master I2C
device, which allows more than one
register to be written in one transac-
tion.
This allows for example Register 1
to Register 5, RGB and WHITE
levels, to be written in one transac-
tion (see Figure 1.1 for I2C write
protocol).
To read individual data and status
registers a device write then read
must be undertaken by the I2C Mas-
ter.
The write consists of a Start condi-
tion, device ID (‘D’ bit clear), regis-
ter to start read and a Stop condition.
This is followed by a read, which
consists of a Start condition, device
ID (‘D‘ bit set), followed by data
from the register specified and ter-
minated with a Stop condition.
Status registers
There are 12 individual registers that
can be read within the RGBW as
follows:
7
6
5
4
3
2
1
0
RGBW Address
1. 1 1 1 0 0 X X 1
XX = Address select pins
Configuration register
R1 U U U U U U X W
W = 0 or 1 (0 = Normal mode, 1 = Aquarium mode)
X = 0 or 1 (0 = Moonlight OFF, 1 = Moonlight ON)
U..U = unused on this implementation
RED brightness MSB register
R2 U U U U U U D D
D..D = 0x00 to 0x03 (MSB of brightness value)
U..U = unused on this implementation
RED brightness LSB register
R3 D D D D D D D D
D..D = 0x00 to 0xFF (LSB of brightness value)
GREEN brightness MSB register
R4 U U U U U U D D
D..D = 0x00 to 0x03 (MSB of brightness value)
U..U = unused on this implementation
GREEN brightness LSB register
R5 D D D D D D D D
D..D = 0x00 to 0xFF (LSB of brightness value)
BLUE brightness MSB register
R6 U U U U U U D D
D..D = 0x00 to 0x03 (MSB of brightness value)
U..U = unused on this implementation
BLUE brightness LSB register
R7 D D D D D D D D
D..D = 0x00 to 0xFF (LSB of brightness value)
WHITE brightness MSB register
R8 U U U U U U D D
D..D = 0x00 to 0x03 (MSB of brightness value)
U..U = unused on this implementation
WHITE brightness LSB register
R9 D D D D D D D D
D..D = 0x00 to 0xFF (LSB of brightness value)
Current time hours value register
R10 U U U D D D D D
D..D = 0 to 23 (Current hour value)
U..U = unused on this implementation
Current time minutes value register
R11 U U D D D D D D
D..D = 0 to 59 (Current minutes value)
U..U = unused on this implementation
DS-RGBW.S Firmware
R12 M M M M L L L L
L..L = Firmware minor version 0-15
M..M = Firmware major version 0-15
R.G.B Colour registers…
The RGB colour registers allow a
standard RED, GREEN, BLUE
(sRGB) colour value to be displayed
on the connected LED’s. The colour
values set are internally converted to
the CIE1931 XYZ colour space for
better visual perception.
H.S.B Colour registers…
The HSB colour registers allow a
HUE, SATURATION, BRIGHT-
NESS [also known as VALUE] col-
our value to be displayed on the
connected LED’s. The colour values
set are internally converted to the
CIE1931 XYZ colour space for bet-
ter visual perception.
R.G.B.W Brightness registers…
The R.G.B.W brightness registers
allow individual control of the
brightness level on each of the four
LEDs. The output level is adjustable
from zero [0x0000], or OFF, to 1023
[0x03FF], or maximum brightness,
by converting the value into hexa-
decimal and writing the Most Sig-
nificant Byte [MSB] to the first reg-
ister and the Least Significant Byte
[LSB] to the second register. For
example if a brightness level of 589
was required the hexadecimal repre-
sentation of this would be 0x024D.
The 0x02 hex would be written to the
first register and the 0x4D hex to the
second.
These registers may also be read to
return the internally converted RGB
and HSB values.
Aquarium mode…
The RGBW.S provides an aquarium
mode of operation that can simulate
sunrise/sunset and moonlight illu-
mination. Aquarium mode is simply
enabled by writing the current time,
hour and minute, into the I2C clock
registers and then the sunrise hour,
sunset hour and configuration con-
trol into the relevant I2C registers.
Sunrise is initiated when the clock
and sunrise hour (06:00 default) are
the same and will continue over a
period of 30 minutes until full day-
light is reached (5600K).
Sunset is initiated when the clock
and the sunset hour (21:00 default)
are the same and will continue over
a period of 30 minutes until dark-
ness is reached.
If the moonlight flag is also set the
moon will rise as darkness falls and
remain constant during the night
until sunrise starts once more.
See the website at
www.designersystems.co.uk for
sample Raspberry-PI and Arduino
applications.