8 Digit 7 Segment LED Display Module Wiki- DFRobot

DFR0646 8-Digital LED Segment Display Module

Introduction

This 8-digit 7 segment display module has two colors to choose: red and green. It supports 16-level brigthness adjustment and can be drived via two normal I/O ports. The display features 4 different slave addresses, standard IIC pins, compatible with Gravity interface, and free from MCU scanning.

Specification

Pinout

DFR0646 8-Digital LED Segment Display Module Pinout
Name Function
SDA Date Line
SCL Control Line
GND Positive
VCC Negative

Communication Description

Address Change

There are two solder pads of data bits A0 and A1 on the back of the LED display (disconnect: 0/connect: 1). The four slave addresses can be realized by the combination of A0 and A1, shown as below.

The address format of LED controller:

MSB D6 D5 D4 D3 D2 D1 LSB
1 1 1 0 0 A1 A0 R/W

Note: D3~D7 should not be changed. When writing, D0 R/W=0, so the addresses are:

A1 A0 Address
0 0 0xE0
0 1 0xE2
1 0 0xE4
1 1 0xE6

IIC Communication

The data of microprocessor communicate with the LED driver control IC via two-line bus interface. During data input, DIN signal must keep unchanged when CLK is at high level. Only when CLK clock signal is at low level can DIN signal be changed. The condition of starting data input is that DIN changes from high to low when CLK is at high level, and its condition of ending is that DIN changes from low to high when CLK is at high level, which is in accordance with IIC communication protocol.

The operation of writing LED display data shall follow the principle of “from low bit to high bit” of display address and “from low bit to high bit” of data byte.

DFR0646 8-Digital LED Segment Display Module IIC Communication

Tutorial with Arduino

Connection Diagram

DFR0646 8-Digital LED Segment Display Module Connection Diagram

Sample Code

Click to download Library File and Example. How to install a library?

/*!
 * @file ledPrint.ino
 * @brief Display experiment of the digital tube
 * @n Experiment phenomenon: The digital tube displays "HALO",and in one second, displays "H.A.L.O.", then show value of the variable val after one second
 * @copyright   Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
 * @license     The MIT License (MIT)
 * @author [Actor](wenzheng.wang@dfrobot.com),[TangJie](jie.tang@dfrobot.com)
 * @version  V1.0.1
 * @data  2022-03-21
 * @url https://github.com/DFRobot/DFRobot_LedDisplayModule
 */
# include "DFRobot_LedDisplayModule.h"
/**
 * DFRobot_LedDisplayModule Constructor
 * Parameter &wire  Wire
 * In default, the IIC address of 8 bits digital tube is 0xE0
 * The IIC address of 8 bits digital tube can be changed by combining A1 and A0
 * 1  1  1  0  | 0  A1 A0 0
 * 1  1  1  0  | 0  0  0  0    0xE0
 * 1  1  1  0  | 0  0  1  0    0xE2
 * 1  1  1  0  | 0  1  0  0    0xE4
 * 0  0  1  0  | 0  1  1  0    0xE6
 */ 
DFRobot_LedDisplayModule LED(&Wire, 0xE0);

/**
 * DFRobot_LedDisplayModule Constructor
 * In default, the IIC address of 4 bits digital tube is 0x48 
 */
//DFRobot_LedDisplayModule LED(&Wire, 0x48);

void setup() 
{
  Serial.begin(115200);
  /*Wait for the chip to be initialized completely, and then exit*/
  while(LED.begin(LED.e8Bit) != 0)
  {
    Serial.println("Failed to initialize the chip , please confirm the chip connection!");
    delay(1000);
  }

  /**
   * Set the display area to 1, 2, 3, 4
   * It can show 4 bits, the region of each parameter is 1~4 
   * Please resend the display value if the display area is changed
   */
  LED.setDisplayArea(1,2,3,4);
}

void loop() 
{
  /**
   * Display "HALO"
   * At present, it only supports showing the numbers 0 to 9, capital letters A, B, C, D, E, F, H, L, O, P, U and dash-,
   * and you can also bring decimal points, such as "0." "9." "A." "-."
   */
  LED.print("H","A","L","O");
  delay(1000);

  LED.print("H.","A.","L.","O."); 
  delay(1000);

  /**
   * Show a viriable value
   * The viriable could be both integer and decimal
   * Here it can be compatible with the sensor return value, such as temperature, humdity and so on
   */
  double val = 13.25;
  LED.print(val);
  delay(1000);
}

Result

DFR0646 8-Digital LED Segment Display Module Result

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum

More Documents