mLink 128x64 Graphics LCD (HCMODU0189)

mLink serial I2C modules
Post Reply
Site Admin
Posts: 819
Joined: Sun Aug 05, 2012 4:02 pm

mLink 128x64 Graphics LCD (HCMODU0189)

Post by admin » Wed Jun 08, 2022 2:50 pm



The mLink graphics LCD is a serial (I2C / IIC) 128 x 64 pixel LCD with a large 66mm x 33mm displayable area. Because it uses a standard I2C interface it is compatible with most microcontrollers including Arduino. It is addressale allowing for multiple modules to be connected together (address can be changed in software), and only requires 2 data pins for communication. Unlike standard serial or parallel character displays it requires no configuration or setup saving on development time and code size.

Other features of the display include a built-in font and various graphics drawing functions such as pixel, line, rectangle, and erase. For low power applications it also includes power saving features such as a software dimmable backlight and sleep mode reducing power consumption to as little as 1.2mA.

Being an mLink module it is compatible with other mLink or standard I2C modules allowing you to daisy-chain several different types of modules together using only the two I2C pins of your microcontroller.

For Arduino users you can use the mLink library (see below) to control any type of mLink module. The library has a very small memory footprint and only one single instance is needed to control multiple types of mLink modules. This makes it great for Arduinos with small amounts of memory and pin counts.

Module specifications:

Module code: 						HCMODU0189
Supply voltage (VDD): 				4.5V to 5.5V
Operating range (recommended):		0oC to 50oC
Display type:						128x64 pixel transmissive graphic LCD white with blue backlight
Current max:						70mA (100% backlight, Vcc = 5V)
Current min:						1.2mA (sleep, Vcc = 5V)
Interfaces:						I2C
I2C Interface speed: 					400kbits/s (fast mode)
I2C default address (HEX): 			0h57
Maximum number of modules: 			5 with pullups fitted, 112 with pullups removed*
Module dimensions:					91mm x 70mm x 19mm

*Note the maximum number of connected modules will depend on cable lengths and power requirements of each module. Do not exceed 5 mLink modules connected in series with all pullups fitted.

Arduino Connection Example:



Because the modules use an I2C interface this also means multiple modules can be controlled from a single Arduino I2C interface simply by daisy-chaining them together. Note to control multiple mLink modules of the same type requires changing the default I2C address of the additional modules. See mLink Library Quick Start Guide for how to do this.


Print some text example

Arduino print text example:

This sketch uses the mLink library to print some text to the display.

  1. #include "mLink.h"                      // Include the library
  3. mLink mLink;                            // Create an instance of the library
  5. #define I2C_ADD 0x57                    // Default I2C address
  8. void setup()
  9. {
  10.   mLink.init();                         // Initialise the library
  12.   mLink.gLCD_clear(I2C_ADD);            // Clear the display
  13. }
  16. void loop()
  17. {
  18.   mLink.gLCD_cursor(I2C_ADD, 49, 20);   // Set the cursor to col 48 row 20
  19.   mLink.gLCD_print(I2C_ADD, "Hello");   // Print something
  22.   mLink.gLCD_cursor(I2C_ADD, 46, 36);   // Set the cursor to col 46 row 36
  23.   mLink.gLCD_print(I2C_ADD, "World!");  // Print something
  25.   while(1);
  26. }

Graphics example

Arduino Grahpics and Text Example:

This sketch uses the mLink library to display a value representing the Arduino 'up time'
  1. #include "mLink.h"                      // Include the library
  3. mLink mLink;                            // Create an instance of the library
  5. #define I2C_ADD 0x57                    // Default I2C address
  8. void setup()
  9. {
  10.   mLink.init();                         // Initialise the library
  11. }
  14. void loop()
  15. {
  16.   // Draw some random lines in normal draw mode
  17.   mLink.gLCD_clear(I2C_ADD);
  18.   mLink.gLCD_drawMode(I2C_ADD, GLCD_DRAW_MODE_NORMAL);
  20.   for(byte i = 0; i < 254; i++)
  21.   {
  22.     int x1 = random(0, 128);
  23.     int y1 = random(0, 64);
  24.     int x2 = random(0, 128);
  25.     int y2 = random(0, 64);
  27.     mLink.gLCD_line(I2C_ADD, x1, y1, x2, y2);
  28.   }
  31.   // Draw some random rectangles with invert mode turned on
  32.   mLink.gLCD_clear(I2C_ADD);        
  33.   mLink.gLCD_drawMode(I2C_ADD, GLCD_DRAW_MODE_INVERT);
  35.   for(byte i = 0; i < 254; i++)
  36.   {
  37.     int x1 = random(0, 128);
  38.     int y1 = random(0, 64);
  39.     int x2 = random(0, 128);
  40.     int y2 = random(0, 64);
  42.     mLink.gLCD_rect(I2C_ADD, x1, y1, x2, y2);
  43.   }
  46.   // Draw random sized text with text background mode on
  47.   mLink.gLCD_clear(I2C_ADD);      
  48.   mLink.gLCD_drawMode(I2C_ADD, GLCD_DRAW_MODE_NORMAL);
  49.   mLink.gLCD_bgMode(I2C_ADD, GLCD_BG_ON);
  51.   for(byte i = 0; i < 254; i++)
  52.   {
  53.     int x = random(-50, 128);
  54.     int y = random(-10, 64);
  56.     byte dx = random(1, 5);
  57.     byte dy = random(1, 5);
  59.     mLink.gLCD_scaleXY(I2C_ADD, dx, dy);
  60.     mLink.gLCD_cursor(I2C_ADD, x, y);
  61.     mLink.gLCD_print(I2C_ADD, "Hello!");
  62.   }
  63. }


mLink Arduino library

mLink Library Quick Start Guide For Arduino Users ... _Guide.pdf

mLink Library Reference Guide For The Character LCD Sensor Modules ... _Guide.pdf

mLink Specifications and Register Map For The Character LCD Modules ... er_Map.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.

Post Reply

Return to “mLink”