Interfacing Arduino UNO with SURE electronics LED Dot Matrix (based on the HT1632C controller)
Introduction / Objectives:
Sure electronics is a company that produces beautiful LED dot matrix at a convenient price, in this lesson we will explain which is the easier way how to control it from an Arduino board.
Part list:
1 Arduino UNO
1 3208 LED Matrix
5 Jumper wires
1 5V power supply
Instructions:
Overview
The LED dot matrix that we are going to use, is composed by four 8x8 LEDs monocolour matrix positioned close to form a 32x8 row.
Under the hood, we find the HT1632C IC that is capable to drive this huge quantity of LED. The HT1632C is both a controller and a LED driver, because have onboard RAM memory for the mapping LED display and because provide to give the enough power to the LEDs. The device allows you to vary the brightness of the LEDs integrating a 16 steps PWM control. The matrix provides to communicate with the host controller through a serial interface that behaves like a SPI-like protocol.
Under the hood, we find the HT1632C IC that is capable to drive this huge quantity of LED. The HT1632C is both a controller and a LED driver, because have onboard RAM memory for the mapping LED display and because provide to give the enough power to the LEDs. The device allows you to vary the brightness of the LEDs integrating a 16 steps PWM control. The matrix provides to communicate with the host controller through a serial interface that behaves like a SPI-like protocol.
So, on the Arduino side we have to provide the wiring with the LED dot matrix and to install the library that contains the dedicated communication protocol and the utilities for easy write on the matrix.
How to install the library
The library for arduino was written by Guarav Manek and you can find it in his github, download it then follow this instructions:
once you have downoladed the library, decompress the archive, and you will obtain a directory called "gauravmm-HT1632-for-Arduino-13dc18c", that contains some things, it's not ready to be recognized from Arduino IDE.
go in your sketchbook folder, and open the "libraries" directory, if you don't already have, create it;
follow this path to copy the library: "/gauravmm-HT1632-for-Arduino-13dc18c/Arduino" and copy the HT1632 directory to the "libraries" directory in your sketchbook;
now copy the "Samples"directory (/gauravmm-HT1632-for-Arduino-13dc18c/Arduino/Samples) inside the libray directory (/sketchbook/libraries/HT1632) and rename it to "examples";
Open the IDE and you'll find the example under this path: Files > Examples > HT1632 > sketch_HT1632_sample_code.
Now your Arduino environment is capable to read the library, and you can use it in your sketches.
Wiring the LED matrix
The socket placed behind the LED matrix allow you to plug the 16 pin IDC cable. To work with Arduino UNO you need to connect only five pins, these are:
- Pin 11 to GND
- Pin 12 to VCC
- Pin 3 ( CS1) to Arduino Digital pin 9
- Pin 5 (WR) to Arduino Digital pin 10
- Pin 7 (DATA) to Arduino Digital pin 11

Power up and run the first example
On your arduino upload this code:
#include <font_5x4.h> #include <HT1632.h> #include <images.h> int i = 0; int wd; void setup () { // Setup and begin the matrix // HT1632.begin(CS1,WR,DATA) HT1632.begin( 9, 10, 11); // Give the width, in columns, of the assigned string // FONT_5x4_WIDTH and FONT_5x4_HEIGHT are parameter specified in the "font_5x4.h" file wd = HT1632.getTextWidth("Hello, how are you?", FONT_5X4_WIDTH, FONT_5X4_HEIGHT); } void loop () { // Font rendering example HT1632.drawTarget(BUFFER_BOARD(1)); HT1632.clear(); HT1632.drawText("Hello, how are you?", 2*OUT_SIZE - i, 2, FONT_5X4, FONT_5X4_WIDTH, FONT_5X4_HEIGHT, FONT_5X4_STEP_GLYPH); HT1632.render(); i = (i+1)%(wd + OUT_SIZE * 2); delay(200); }
The words "Hello, how are you?" with the specified font created in the "font_5x4.h" file, will scroll on the matrix. Enjoy!
On Playground you can find another project that use a different SURE electronics LED matrix and an Arduino Mega2560 for making a clock. This guys uses the same libray but they modified it a little.
On Playground you can find another project that use a different SURE electronics LED matrix and an Arduino Mega2560 for making a clock. This guys uses the same libray but they modified it a little.

Comments