HT1621 6 Digit 7 Segment LCD Module with White Backlight (HCMODU0170)

LCD, TFT, OLED, LED modules
Post Reply
admin
Site Admin
Posts: 865
Joined: Sun Aug 05, 2012 4:02 pm

HT1621 6 Digit 7 Segment LCD Module with White Backlight (HCMODU0170)

Post by admin » Fri Sep 18, 2020 12:54 pm

Image




This item is a 6 digit 7-segment LCD display module. It features large black LCD digits displayed against a white backlight resulting in a clear and easy to read display. Communication to the module is via a 5V serial interface requiring only 3 digital pins (CS, WR, Data). Additionally, this 6 digit display module also features a 3 state battery charge icon.

Image Image

For Arduino users we have also written an exclusive library (HCDisplay) which will help you develop your project with the minimum of effort. This library can be downloaded from the support section of our support forum here:

viewtopic.php?f=58&t=2827

Hobby components notes: Although this module can display numbers up to 6 digits, for fractional numbers only the 3 right most digits are capable of displaying a decimal point.


Specification:

Product code: HCMODU0152
Display type: 6 digit 7-segment LCD
Backlight: White
Interface: 3 wire serial SPI
Driver: HT1621
Supply voltage: 4.7-5.2VDC
Supply current: 0.4mA without backlight, 4mA with backlight

Note: Screen in video below is the green backlit version (HCMODU0136).




Example Arduino Sketch:

  1. /* FILE:    HCDisplay_HT1621_Example
  2.    DATE:    20/12/18
  3.    VERSION: 0.1
  4.    AUTHOR:  Andrew Davies
  5.    
  6. 20/12/18 version 0.1: Original version
  7.  
  8. This example sketch demonstrates how to control the HT1621 using the HCDisplay
  9. library. This sketch supports the following display:
  10.  
  11. HT1621 6 Digit 7 Segment LCD Module - Green Backlight (SKU: HCMODU0136)
  12. HT1621 6 Digit 7 Segment LCD Module - White Backlight (SKU: HCMODU0152)
  13.  
  14. Connect the module to your Arduino as follows:
  15.  
  16. MODULE............UNO/NANO
  17. CS................8
  18. WR................9
  19. Data..............10
  20. Gnd...............GND
  21. Vcc...............5V
  22. LED...............5V
  23.  
  24. NOTE: TO USE THIS SKETCH YOU MUST FIRST SELECT THE VERSION OF DISPLAY YOU HAVE BY
  25. UNCOMMENTING THE APPROPRIATE LINE IN THE OPTIONS.H FILE WHICH CAN BE FOUND IN THE
  26. HCDISPLAY LIBRARY FOLDER. For windows users avoid using the Windows Notepad editor
  27. as it doesn't format things properly.
  28.  
  29. More information about this library can be found in the software section of our
  30. support forum here:
  31.  
  32. http://forum.hobbycomponents.com/software
  33.  
  34.  
  35. You may copy, alter and reuse this code in any way you like, but please leave
  36. reference to HobbyComponents.com in your comments if you redistribute this code.
  37. This software may not be used directly for the purpose of selling products that
  38. directly compete with Hobby Components Ltd's own range of products.
  39. THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
  40. EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
  41. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
  42. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
  43. INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
  44. REASON WHATSOEVER. */
  45.  
  46. #include "HCDisplay.h"
  47.  
  48.  
  49. #define CS 8            //Digital pin used to connect to the modules CS pin
  50. #define WR 9            //Digital pin used to connect to the modules WR pin
  51. #define DATA 10         //Digital pin used to connect to the modules Data pin
  52.  
  53.  
  54. HCDisplay HCDisplay;    //Creates an instance of the HCDisplay library
  55.  
  56.  
  57. void setup()
  58. {
  59.   HCDisplay.Init(CS, WR, DATA);  //Initialise the display
  60. }
  61.  
  62.  
  63. void loop()
  64. {
  65.   ScrollText("Hello World ");
  66.   ScrollText("Hobby Components HT1621 ");
  67.   CountDown(10);
  68.  
  69.   HCDisplay.Clear();
  70.  
  71.   // Cycle though all 4 battery level states
  72.   for(byte i = 0; i < 10; i++)
  73.     for(byte Level = 0; Level < 4; Level++)
  74.     {
  75.       HCDisplay.Pos(0);
  76.       HCDisplay.Print("BATT");
  77.       HCDisplay.Print(Level);
  78.  
  79.       Battery(Level);
  80.       delay(1000);
  81.   }
  82. }
  83.  
  84.  
  85.  
  86.  
  87. /* Scroll some text. Demonstrates the Print() & Pos() functions. */
  88. void ScrollText(const char *Text)
  89. {
  90.   int Length = strlen(Text);  // Calculate length of string in pixels.
  91.  
  92.   HCDisplay.Clear();
  93.  
  94.   // Scroll the text across the display.
  95.   for(int16_t x = 6; x > -Length; x--)
  96.   {
  97.     HCDisplay.Pos(x);
  98.     HCDisplay.Print(Text);
  99.     delay(200);
  100.   }
  101. }
  102.  
  103.  
  104. /* Count down in 0.001 increments. Demonstrates printing floating point numbers */
  105. void CountDown(float Value)
  106. {
  107.   while(Value >= 0)
  108.   {
  109.     HCDisplay.Clear();
  110.     HCDisplay.Pos(2);
  111.     HCDisplay.Print(Value, 3);
  112.     delay(1);
  113.     Value -= 0.001;
  114.   }
  115. }
  116.  
  117.  
  118. /* Set the state of the battery level icon. Valid values are from 0 (empty) to 3 (full).
  119.  * Note that each segment of the battery icon is mapped to the decimal points of the left most
  120.  * 3 digits of the display. */
  121. void Battery(byte Level)
  122. {
  123.   if(Level >= 0 && Level <= 3)
  124.   {
  125.     //Use DRAWMODE_OR mode to write the decimal point(s) so that we don't overwrite what's currently being displayed
  126.     HCDisplay.DrawMode(DRAWMODE_OR);
  127.  
  128.     // Start from the left most digit
  129.     HCDisplay.Pos(0);
  130.  
  131.     // Write to the left most decimal points to set the state of the battery icon
  132.     for(; Level > 0 ; Level--)
  133.       HCDisplay.Print(".");
  134.  
  135.     // Put the drawing mode back to normal.
  136.     HCDisplay.DrawMode(DRAWMODE_NORMAL);
  137.   }
  138.  
  139. }



Image


The HCDisplay library for the above sketch can be downloaded from the software section of this support forum here:

http://forum.hobbycomponents.com/viewto ... =58&t=2827

Dimensions
Image
HT1621v320.pdf
2.4in 6-digit Segment LCD COM and Segment.pdf



Community contributions:

Image

Forum user Gazz292 has kindly posted a range of 3D printed cases he has designed for this display. You can find the his original post here:

viewtopic.php?p=7939#p7939



Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Display”