Introduction
With low-voltage scanning, LED dot-matrix display have some advantages such as power saving, long service life, low cost, high brightness, wide angle of view, long visual range, waterproof, and numerous specifications. LED dot-matrix display can meet the needs of different applications, thus have a broad development prospect. This time, we will conduct an LED dot-matrix experiment to experience its charm firsthand.
Hardware Required
- 1 * REV4 board
- 1 * 8x8 dot-matrix
- 8 * Resistor (220Ω)
- 1 * Breadboard
- 1 * USB cable
- 16 * Jumper wires
Video Tutorial
Connection
The external view of a dot-matrix is shown as follows:
The display principle of the 8*8 dot-matrix:
The 8*8 dot-matrix is made up of sixty-four LEDs, and each LED is placed at the cross point of a row and a column. When the electrical level of a certain row is 1 and the electrical level of a certain column is 0, the corresponding LED will be on. If you want to light the LED on the first dot, you should set pin 9 to high level and pin 13 to low level. If you want to light LEDs on the first row, you should set pin 9 to high level and pins 13, 3, 4, 10, 6, 11, 15 and 16 to low level. If you want to light the LEDs on the first column, set pin 13 to low level and pins 9, 14, 8, 12, 1, 7, 2 and 5 to high level.
The internal view of a dot-matrix is shown as follows:
The principle of 74HC595 has been previously illustrated. One chip is used to control the rows of the dot-matrix while the other chip is used to control the columns.
Connect circuit as shown in the following diagram:
Connection for REV4:
Connection for 2560 R3:
Sample Code
for Displaying “0”:
// set an array to store character of “0” unsigned char Text[]={0x00,0x1c,0x22,0x22,0x22,0x22,0x22,0x1c}; void Draw_point(unsigned char x,unsigned char y)// point drawing function { clear_(); digitalWrite(x+2, HIGH); digitalWrite(y+10, LOW); delay(1); } void show_num(void)// display function, call point drawing function { unsigned char i,j,data; for(i=0;i<8;i++) { data=Text[i]; for(j=0;j<8;j++) { if(data & 0x01)Draw_point(j,i); data>>=1; } } } void setup(){ int i = 0 ; for(i=2;i<18;i++) { pinMode(i, OUTPUT); } clear_(); } void loop() { show_num(); } void clear_(void)// clear screen {for(int i=2;i<10;i++) digitalWrite(i, LOW); for(int i=0;i<8;i++) digitalWrite(i+10, HIGH); }
Result
Burn the program into REV4 board, the dot-matrix will display 0.
Note: if it’s not displaying correctly, check the wiring.
All Tutorial
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 1: Hello World
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project Project 2: LED Blinking
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 3: PWM
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 4: Traffic Light
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 5: LED Chasing Effect
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 6: Button-controlled LED
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 7: Active Buzzer
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 8: Passive Buzzer
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 9: RGB LED
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 10: Photo Resistor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 11: Flame Sensor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 12: LM35 Temperature Sensor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 13: Tilt Switch
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 14: IR Remote Control
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 15: Analog Value Reading
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 16: 74HC595 driving LEDs
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 17: 1-digit LED Segment Display
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 18: 4-digit LED Segment Display
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 19: 8*8 LED Matrix
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 20: 1602 LCD
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 21: Servo Control
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 22: 5V Stepper Motor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 23: PIR Motion Sensor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 24: Analog Gas Sensor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 25: ADXL345 Three Axis Acceleration Module
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 26: HC-SR04 Ultrasonic Sensor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 27: Joystick Module
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 28: 5V Relay Module
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 29: DS3231 Clock Module
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 30: DHT11 Temperature and Humidity Sensor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 31: Soil Humidity Sensor
- Arduino UNO R3/MEGA 2560 R3 Starter Kit Project 32: RC522 RFID Module
Buy