HT1621 6 Digit 7 Segment LCD Module (HCMODU0136)

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

HT1621 6 Digit 7 Segment LCD Module (HCMODU0136)

Post by admin » Tue Feb 26, 2019 2:32 pm

Image





This item is a 6 digit 7-segment LCD display module. It features large black LCD digits displayed against a green 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.

ImageImage

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:

http://forum.hobbycomponents.com/viewto ... =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: HCMODU0136
Display type: 6 digit 7-segment LCD
Backlight: Green
Interface: 3 wire serial SPI
Driver: HT1621
Supply voltage: 4.7-5.2VDC
Supply current: 0.4mA without backlight, 4mA with backlight





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



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

6-digit Segment LCD dimensions.jpg
HT1621v320.pdf
2.4in 6-digit Segment LCD COM and Segment.pdf




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