This 8 digit seven segment display module (HCMODU0095) uses a TM6138 controller allowing full control of the display using just 3 digital pins on a microcontoller. In addition to the seven segment display there are 8 individually controllable 3mm LEDs and a keypad with 8 push buttons arranged in a single row. These can also be controlled through the TM6138 IC and so require no extra digital pins. A standard 5 pin header provides easy interface to the module from your microcontroller.
Additionally if you plan to use this module with an Arduino development board we have created an exclusive library (HCTI6138) to make controlling the module as easy as possible. The library will provide full control over the seven segment display (providing the ability to display alphanumeric text), the 8 LEDs, and reading the state of the keypad. It is also capable of controlling multiple modules from one Arduino and is only limited by the number of spare pins and memory. The library can be downloaded from the software section of our support forum.
Where to buy: http://hobbycomponents.com/displays/721 ... lay-keypad
Product code: HCMODU0095
Supply Voltage: 5V
Controller: TM1638
Dimensions: 76mm x 50mm
Example: Driving the module from and Arduino with the HCTM1638 library
Code: Select all
/* FILE: HCMODU0095_Text_And_Numbers.cpp
DATE: 21/01/16
VERSION: 0.1
AUTHOR: Andrew Davies
21/01/16 version 0.1: Original version
This sketch demonstrates the use of the HCTM1638 library with the Hobby
Components TM1638 Serial Seven Segment Display & Keypad (HCMODU0095) to
display some text and numbers.
Connect the module to your Arduino as follows:
Module.....Arduino
VCC........+5V
GND........GND
STB........Digital pin 7
CLK........Digital pin 8
DIO........Digital pin 9
You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.
This software may not be used directly for the purpose of selling products that
directly compete with Hobby Components Ltd's own range of products.
THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
REASON WHATSOEVER.
*/
/* Include the library */
#include "HCTM1638.h"
/* Set the digital pins used to interface to the module */
#define STB 7 // Strobe pin
#define CLK 8 // Clock pin
#define DIO 9 // Data pin
/* Create an instance of the library */
HCTM1638 HCTM1638(STB, DIO, CLK);
void setup()
{
/* Set the LED display brightness to maximum */
HCTM1638.Brightness(0x07);
}
void loop()
{
/* Display some text starting at position 8 */
HCTM1638.print7Seg("HELLO !!", 8);
delay(2000);
HCTM1638.Clear();
/* Display a integer number starting at position 6*/
HCTM1638.print7Seg(1234, 6);
delay(2000);
HCTM1638.Clear();
/* Display a decimal number starting at position 7 with 3 decimal places */
HCTM1638.print7Seg(-12.345, 7, 3);
delay(2000);
HCTM1638.Clear();
/* Display a decimal number starting at position 7 cropped to 1 decimal place */
HCTM1638.print7Seg(-12.345, 7, 1);
delay(2000);
}
The HCTI6138 Arduino library can be downloaded from the software section of our support forum here:
http://forum.hobbycomponents.com/viewto ... 954&p=4760
TM6138 datasheet: