Hobby Components SmartLCD Backpack Module (HCMODU0162)

Hobby Components modules
Post Reply
admin
Site Admin
Posts: 785
Joined: Sun Aug 05, 2012 4:02 pm

Hobby Components SmartLCD Backpack Module (HCMODU0162)

Post by admin » Thu Sep 10, 2020 9:22 am

Image





The SmartLCD backpack module is designed to be interfaced directly to the parallel interface of commonly available 16x02 and 20x04 LCD alphanumeric displays using the Hitachi HD44780 controller (see hobby components items HCMODU0013, HCMODU0038, & HCMODU0039 for compatible displays). Once soldered to the rear of one of these displays the SmartLCD backpack module turns these displays into intelligent serial devices which can then be controlled via either a serial UART or I2C interface. It also requires no software or libraries to initialise the display, output text to the screen or control the features of the module, which reduces development time and frees up much needed resources in your microcontroller or development board.

For customers wishing to purchase the SmartLCD backpack already fitted to a suitable display these are available from Hobby Components in both 16x02 and 20x04 configurations:

Hobby Components 1602 SmartLCD (SKU: HCMODU0122)
Hobby Components 2004 SmartLCD (SKU: HCMODU0163)

The SmartLCD module adds three types of interface to the parallel LCD:



Terminal Mode:

Image

This is the out-of-the-box state (mode jumper fitted) and with no configuration required will turn a 16x2 or 20x4 LCD into a serial UART terminal display. Just connect any device with a serial UART interface (9600 default BAUD rate) to the SmartLCDs UART header and the SmartLCD will automatically output any ASCII printable text it receives to the LCD. As well as printable text the SmartLCD also supports several ASCII control codes such as line feed, carriage return, backspace, delete etc.



AT Command Mode:

In AT command mode (mode jumper removed) the SmartLCD module can be controlled using simple text based ‘AT’ commands via its serial UART header. AT command mode adds a significantly greater level of control of the LCD, including precise positioning of text, backlight and contrast controls, custom characters, etc. As they are simple serial text commands they can be sent to the module using a microcontroller's serial print function such as an Arduinos built-in Serial.println() function.



I2C Mode:

Image

Serial I2C mode gives the same level of control as AT command mode but also takes advantage of the I2C two-wire serial interface protocol. In this mode the module is addressable, allowing for multiple modules to be daisy-chained from a microcontrollers I2C interface.

For Arduino users wanting to take advantage of this mode we have written a library (SmartLCD) and example sketches to make controlling the SmartLCD module from your own sketches as simple as possible. The library will give full control of the SmartLCD using a set of straightforward library commands. The SmartLCD library can be downloaded from the software section of our support forum here:

viewtopic.php?f=58&t=2206



Features:

Turns a 16x2 or 20x4 alphanumeric character display into a smart serial device.
In terminal mode no software or drivers are required to initialise or control the module.
Software backlight control with 11 brightness levels.
Software contrast control.
External keypad with buzzer support (optional extra, see item HCKITS0058).
Single 5V operation.

Terminal mode
Compatible with 5V serial UART devices (9600 baud default) – no microcontroller required.
Automatically displays any printable ASCII text.
Responds to a number of additional extended ASCII control codes.

Serial AT command mode
Software control of all module features via simple AT text commands.
Software configurable baud with 8 different speeds (9600 BAUD default).
Access to external keypad and buzzer.

I2C Mode
Control multiple displays from one I2C bus.
Software control of all module features via simple I2C commands.
I2C address configurable via software from 0x08 to 0x77 (default 0x27).
Built-in 10K pull-up resistors for clock SCL and data SDA lines.
Access to external keypad and buzzer.
Specification

Model number: HCMODU0162
Supply voltage: 5V
Display type: Supports 16 x 2 or 20 x 4 alphanumeric HD44780 LCDs
Supply current: 9.8mA
Interfaces: I2C, serial UART and external keypad
Module dimensions: 42mm x 23.5mm




Arduino Example - Printing to the screen in AT command mode

This example demonstrates how simple it is to control the LCD in AT command mode using an Arduino. The example uses the Arduinos built in serial print function to send the AT commands to clear the screen and print 'HELLO WORLD!' to the screen. No special libraries or setting up required! Just connect the LCD to your 5V Arduino as follows:

ARDUINO.......SMART LCD
GND..............GND
5V.................5
TX.................Rx

  1. void setup()
  2. {
  3.   Serial.begin(9600);                 //Initialise the serial UART
  4.  
  5.   Serial.println("AT+CLR");           //Clear the screen
  6. }
  7.  
  8. void loop()
  9. {
  10.   Serial.print("AT+PR=");             //Send the AT print command
  11.   Serial.println("HELLO WORLD !");    //Send the text to print. Note the println to send a CR+LF after the text
  12.  
  13.   while(1);                           //Do nothing
  14. }



Optional Features - LCD Keypad kit

Image

The SmartLCD's features can be further expanded with the addition of the Smart LCD keypad (see item SKU: HCKITS0058). This add-on board connects to the SmartLCD's keypad header using a single 4 way cable. Once connected it adds the additional features of keypad control (up, down, left, right, select, and back) and audible output to your end application. Access to button states and speaker output is then available via the SmartLCD's I2C or UART interfaces using its built-in commands (see the software section of the SmartLCD manual for more information).


Wireless access

Image

A bonus feature of the Smart LCD, due to it not requiring initialisation by a microcontroller, is it's ability to operate wirelessly using a suitable serial wireless pass-through module. Here in the diagram below you can see a remote control application of the Smart LCD and
keypad with the addition of HC-05 Bluetooth slave (see item SKU: HCARDU0004) and Bluetooth master (see item SKU: HCARDU0064) modules.




Image

The reference manual for the SmartLCD backpack module can be downloaded here:

http://hobbycomponents.com/downloads/Sm ... V1.1.0.pdf


If you wish to interface the SmartLCD to an Arduino via its I2C interface we have written an Arduino library that will help simplify your sketch. This can be downloaded from the software section of our forum here:

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




Disclaimer: 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 not 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