RGB Color Matrix Display

AMEX Research Corporation Technology RGB Color Matrix Display Data Sheet Document Date: 25th February 2012 Document Revision: 1.1 © 2012 AMEX Resea...
Author: Justin Benson
2 downloads 0 Views 3MB Size
AMEX Research Corporation Technology

RGB Color Matrix Display Data Sheet

Document Date: 25th February 2012 Document Revision: 1.1

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 1 of 15

AMEX Research Corporation Technologies

RGBM-1608

RGB Color Matrix Display 16 x 8 pixels 1. General description The RGBM 1608 is a RGB LED Matrix (16*8 RGB Leds) with a backpack that has been designed to take SPI serial input and display any graphics you pass it. All the refreshing and communication control is taken care of by the backpack. The RGBM-1608 is composed of 128 RGB pixels organized as 16 columns by 8 rows with a backpack that has been designed to take SPI serial input and display any graphics you pass it. All 128 pixels are made up of three basic RGB colors. All the refreshing and communication control is taken care of by the RGB Matrix Backpack Controller. Each color intensity can be independently controlled. The display can be connected to any digital systems such as microcontrollers, processors etc. by means of simple serial interface (SPI). The protocol layer is based on a simple command – data structure. The RGBM-1608 offers 2 modes of color depth: 4 and 24 bits. There are separate commands to control each color mode (also gamma correction can be on or off).

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 2 of 15

AMEX Research Corporation Technologies

RGBM-1608

Features: -

low cost, easy to use color matrix display 24 or 4 bit color depth Matrix resolution 16 x 8 pixels simple serial interface with CS (chip select) signal no external components needed simple communication protocol

Applications: -

LED small billboards outdoor displays decorating LED lighting bar graphs multiplay status indicators education

2. Device Pin-out (bottom view)

1 2 3 4 5 6 7 8

J2

J1 1 2 3 4 5 6 7 8 9 10 11 1 2

Figure 1. Device pin-out

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 3 of 15

AMEX Research Corporation Technologies

Connector J1 pins

RGBM-1608

Connector J2 pins

1

(VCC)

power supply +5V

1 (VCC)

power supply +5V

2

(VCC)

power supply +5V

2 (VCC)

power supply +5V

3

(GND)

power ground

3 (VCC)

power supply +5V

4

(GND)

power ground

4 (VCC)

power supply +5V

5

(CS)

chip select

5 (VCC)

power supply +5V

6

(NC)

not used

6 (GND)

power ground

7

(SDI)

serial data input

7 (GND)

power ground

8

(NC)

not used

8 (GND)

power ground

9

(NC)

not used

10 (NC)

not used

11 (SCLK)

serial data clock

12 (RST)

reset input (active low)

- CS: (active low); data is shifted in when CS is low and latched on rising edge. - SCLK: data is shifted in on rising edge. - RST: (active low). Low level on RST clears display memory and turns off all the pixels. All signals (SCLK, CS, SDI) are ignored when RST is held low. Note: All the VCC pins (on both J1 and J2 connectors) should be connected together. Also all GND pins should be connected together. WARNING: NC pins should be left unconnected and must not be used. They are used for factory purposes. Using these pins can cause permanent damage to the device. 3. Powering the RGBM-1608 The RGBM-1608 is powered from single +5V voltage source with +/- 5% tolerance. The maximum current consumption is about 700 mA when all pixels colors (R, G and B) are set to FFh value (maximum intensity, while color). A small electrolytic 47..100uF capacitor may be required on VCC and GND pins. It must be connected directly to VCC and GND pins on J2 connector. Power supply connections should be as short as possible; the current drawn by RGBM-1608 changes as the displayed pattern changes and it can cause large ripple voltages on power rail when the power supply output impedance is too high or power wires are too long. WARNING: The RGBM-1608 is not protected against reverse power supply polarity and it can cause © 2012 AMEX Research Corporation Technology

www.amex.pl

Page 4 of 15

AMEX Research Corporation Technologies

RGBM-1608

permanent damage to the device. 4. Electrical characteristics Symbol VIL VIH IIN VCC ICC Ta

Parameter Input low voltage Input high voltage Input current (note 1) Power supply voltage Power supply current Working temperature

Min 0 0.6 VCC 4.75 -20

Max 0.4 VCC + 0.5 240 5.25 700 +50

Units V V μA V mA ºC

5. Serial interface The RGBM-1608 utilizes serial synchronous interface to load display pattern data. The interface includes three signals: CS (chip select), SCLK (serial data clock), SDI (serial data input). Data is shifted in on rising edge of SCLK and latched on rising edge of CS. The RGBM-1608 does not include serial data output. After sending the last byte CS must be pulled high. The communication always starts with pulling CS low and then sending the first byte which is command byte (CMD). After sending the CMD byte, data bytes are sent. Data bytes may represent coordinates of the pixel being displayed, pixel colors etc. There is only one command containing no data bytes (CLEAR_DISPLAY). All bytes are sent with most significant bit first (MSB). Next command can be send after a certain delay t_idle. This time is needed by the internal logic to decode command byte and process its data. If t_idle parameter is not met the command byte will not be recognized and data will be corrupted.

Figure 2. Serial communication timing diagram © 2012 AMEX Research Corporation Technology

www.amex.pl

Page 5 of 15

AMEX Research Corporation Technologies

RGBM-1608

Time

Description

Min

Max

Unit

Trst

Reset pulse duration (note 1)

1

10

ms

Tclk

SCLK period

2850

ns

ts1

CS low to SCLK

30

ns

ts2

data bit setup time

30

ns

th

bit hold time

20

t_dcmd

delay time after sending command byte

0

ns

t_dd

delay time after sending next byte

0

ns

t_end

SCLK to CS high

40

ns

t_idle

idle time before sending next command

1

ms

Rise/Fall time

rise and fall time

1200

ns

Note 1: Reset pulse duration must not be longer than 10 ms. Longer pulses will stop display matrix refreshing and will overheat internal LED diodes in the device. 6. Graphic data memory The RGBM-1608 stores graphic data in 384 byte memory (16 x 8 x 3). Each pixel occupies 3 bytes; one byte is reserved for red (R byte), one for green (G byte) and one byte for blue color (B byte) respectively. By setting different values of each R, G, B bytes one can obtain over 16 milions of colors. There is no direct access to graphic memory however; all the pixels colors can be controlled by appropriate commands including setting single pixel color and displaying many pixels in a defined region. The pixels coordinates expand from 0 to 15 (for X coordinates) and 0 to 7 (for Y coordinates).

Figure 3. Pixels coordinates on the display matrix © 2012 AMEX Research Corporation Technology

www.amex.pl

Page 6 of 15

AMEX Research Corporation Technologies

6.1

RGBM-1608

Color depth

The color of each pixel can be obtained by using one of the three available color depth modes. The first mode uses three bytes to set pixel color. These include one byte for red (R), one byte for green (G) and one byte for blue (3) forming 24 bit color. Thus, it is possible to display over 16 millions of colors. However, using 24 bit color resolution requires to send 3 bytes for each pixel which may unsuitable in some cases. When 24 bit color depth is not needed the RGBM-1608 offers 4 bit color depth which requires only one byte to set each pixel color. By using 4 bit color depth 16 colors can be displayed. Lower resolution requires only one byte per pixel color thus, improving data speed transfer to the RGBM-1608. Table 1. 4-bit color codes Color

Color name Black (note 2) Navy Green Teal Maroon Purple Olive Silver Gray Blue Lime Aqua Red Fuchsia Yellow White

4-bit color byte value (decimal) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Note 2: The black color means the pixel (or pixels) turned off. In case of the RGBM-1608 it will be seen from short distance as a “gray spot” on the display (the color of an internal LED diode lens). To improve visual effect it is recommended to use a color filter placed close to the surface of the RGBM-1608 matrix. 7. Commands The graphic pattern displayed on the RGBM-1608 is controlled by several commands. All commands start with sending CMD byte (the code of the command) and data bytes. The CLEAR_DISPLAY command contains no data bytes. Command byte and data bytes are shown in a hexadecimal format. If unknown command or invalid data bytes are received the command is not performed and all the data is rejected. It does not affect current graphic pattern displayed. © 2012 AMEX Research Corporation Technology

www.amex.pl

Page 7 of 15

AMEX Research Corporation Technologies

RGBM-1608

7.1 CLEAR_DISPLAY Description: clears the display (all pixels are turned off) CMD: data bytes:

01 none

7.2 PUT_SINGLE_PIXEL Description: Displays a single pixel. CMD: data bytes: X: Y: R, G, B:

02 X, Y, R, G, B pixel coordinate X (0..15) pixel coordinate Y (0..7) 3 bytes of RGB pixel color (0..255)

7.3 PUT_SINGLE_PIXEL4 Description: Displays a single pixel with 4-bit color depth (see table 1). CMD: data bytes: X: Y: Color:

42 X, Y, Color pixel coordinate X (0..15) pixel coordinate Y (0..7) 4-bit pixel color (0..15)

7.4 CLEAR_PIXEL Description: clears single pixel CMD: data bytes: X: Y:

F2 X, Y pixel coordinate X (0..15) pixel coordinate Y (0..7)

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 8 of 15

AMEX Research Corporation Technologies

RGBM-1608

7.5 PUT_MULTIPLE_PIXELS Description: Displays a number of pixels in the defined rectangular region (see SET_DRAWING_REGION command for more details) CMD: data bytes:

04 n, R1, G1, B1.....Rn, Gn, Bn

n R1, G1, B1.....Rn, Gn, Bn:

number of pixels to display (1…128) RGB colors of n pixels to display.

nL and nH bytes form a 9 bit number. It may be in range of 1..384. Each pixel color is represented by three bytes (R – red, G – green, B – blue). The RGB bytes values may be in range of 0..255. The following examples show how to set pixels to the same color but the user may set different color for each pixel. Example 1: display five pixels of light green color command + data bytes: 04, 00, FF, 00, 00, FF, 00, 00, FF, 00, 00, FF, 00, 00, FF, 00 Example 2: display six pixels of light white color command + data bytes: 04, 06, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF Example 3: display 3 pixels of dark blue command + data bytes: 04, 03, 00, 00, 80, 00, 00, 80, 00, 00, 80

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 9 of 15

AMEX Research Corporation Technologies

RGBM-1608

7.6 PUT_MULTIPLE_PIXELS4 Description: Displays a number of pixels in the defined rectangular region (see SET_DRAWING_REGION command for more detail). This command is similar to PUT_MULTIPLE_PIXELS but it uses 4-bit pixels color depth. CMD: data bytes:

44 n, c1, c2….cn

n c1, c2…cn:

number of pixels to display (1…128) data bytes of n pixel 4-bit colors

The pixel color bytes values can be in the range of 0..15 (see table 1) Example: display 3 pixels of white color command + data bytes: 44, 03, 0F, 0F, 0F 7.7 SET_DRAWING_REGION Description: Sets a rectangular region where graphic data is loaded with the use of PUT_PIXELS command. With the use of SET_DRAWING_REGION and PUT_PIXELS command it is possible to display many pixels of graphic pattern without sending X and Y coordinates for each pixel. When sending pixels data with PUT_PIXELS command the current X, Y coordinates are automatically updated (increased) after each pixel RGB data bytes are sent. When a pixel is turned on the current X coordinate is Increased by 1. When it reaches X2 value it is set back to X1. At the same time current Y coordinate in increased by 1. When it reaches Y2 value it is set back to Y1. It drastically reduces time needed to send all RGB data of the pattern to display on the matrix. CMD: data bytes:

03 X1, Y1, X2, Y2

X1, Y1: left-top coordinates of rectangular drawing region X2, Y2: right-bottom coordinates of rectangular drawing region valid values: X1, X2: 0..15 Y1, Y2: 0..7 © 2012 AMEX Research Corporation Technology

www.amex.pl

Page 10 of 15

AMEX Research Corporation Technologies

RGBM-1608

Example 3: Set drawing region (8, 4) (12, 6) and display 15 pixels of violet color (blue and red colors set to the same values; green color set to 0) Step 1: Set drawing region command + data bytes: 03, 08, 04, 0C, 06

Figure 4. Drawing region (8, 4) (12, 6) (shown in red borders) Arrows show automatic coordinates update direction. Step 2: Send 15 pixels RGB data (color = violet) 04, 0F, 00, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF, FF, 00, FF

Figure 5. Graphic pattern after performing Step 1 and Step 2 © 2012 AMEX Research Corporation Technology

www.amex.pl

Page 11 of 15

AMEX Research Corporation Technologies

RGBM-1608

Note: The number of pixels send with PUT_PIXELS command does not have to be exactly the same as the number of pixels that fit in the drawing region defined with the SET_DRAWING_REGION command. In the first example above the drawing region of (8, 4) (12, 6) contains 15 pixels. One can display less pixels than 15 (the only requirement is that the number of pixels cannot be zero). When more than 15 pixels are to be displayed in the (8, 4) (12, 6) drawing region (for example, 17 pixels) the 16'th and 17'th pixels will be displayed at (8, 4) and (9, 4) coordinates as the internal X, Y coordinates counter is set back to (8, 4) after 15'th pixel has been displayed. 7.8 DRAW_RECTANGLE Description: Draws a rectangle with a specified border and fill color CMD: data bytes: X1, Y1: X2, Y2: Rb, Gb, Bb: Rf, Gf, Bf:

05 X1, Y1, X2, Y2, Rb, Gb, Bb, Rf, Gf, Bf left-top coordinates of the rectangle right-bottom coordinates of the rectangle 3 bytes of RGB border color 3 bytes of RGB fill color

Note: X2 must be greater than X1 and Y2 must be greater than Y1. The rectangle will not be displayed if these values are incorrect. 7.9 DRAW_RECTANGLE4 Description: Draws a rectangle with a specified border and fill color using 4-bit color depth. CMD: data bytes: X1, Y1: X2, Y2: BC: FC:

45 X1, Y1, X2, Y2, BC, FC left-top coordinates of the rectangle right-bottom coordinates of the rectangle 4-bit border color (0..15) 4-bit fill color (0..15)

Note: X2 must be greater than X1 and Y2 must be greater than Y1. The rectangle will not be displayed if these values are incorrect.

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 12 of 15

AMEX Research Corporation Technologies

RGBM-1608

7.10 GAMMA_ON_OFF Description: Turn on/turns off gamma correction. Gamma correction is turned on after power up or reset. CMD: data bytes:

06 GM

GM = 1 GM = 0

turn on gamma correction turn off gamma correction

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 13 of 15

AMEX Research Corporation Technologies

RGBM-1608

8. Package Dimensions

All dimensions shown in millimeters. bottom view

front view

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 14 of 15

AMEX Research Corporation Technologies

RGBM-1608

rear view

top view

Contacts: AMEX Research Corporation Technologies Modlinska Str. 1 PL 15-692 Bialystok, POLAND Email and Tech support: [email protected] Web: http://www.amex.pl

© 2012 AMEX Research Corporation Technology

www.amex.pl

Page 15 of 15