File Exchange

image thumbnail

Simulink library for Arduino Liquid Crystal Display

version 1.0.1 (117 KB) by Madhu Govindarajan
The Simulink block allows you to display text on a 16x2 character LCD screen connected to an Arduino

49 Downloads

Updated 18 Apr 2019

View License

The files include:
The Simulink Library containing the LCD block and supporting files
Example Simulink model that demonstrates how to use the block
The .m setup file for adding the folder to the MATLAB path
Usage:
The two input ports of the block are the two strings you wish to display on the top and bottom row respectively cast to their uint8 ascii value.
The block parameters are the connected pins to the Arduino: in the order RS, EN, d0, d1, d2, d3

Visit this page for wiring the LCD: https://www.arduino.cc/en/Tutorial/LiquidCrystalDisplay

Cite As

Madhu Govindarajan (2019). Simulink library for Arduino Liquid Crystal Display (https://www.mathworks.com/matlabcentral/fileexchange/67997-simulink-library-for-arduino-liquid-crystal-display), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

@Tony Koki: To display numbers, I would recommend passing the number through a MATLAB function block wherein you just have a switch case statement outputting uint8('0') for 0 input and so on. If you do this for all 10 numbers, 0 through 9, then you should be able to display any number. Using the same techniques you can display pretty much any character.

Tony Koki

When i display words it works great. However when i display variable values and number it does not display. I use the data conversion block and set it to uint8. For exmple i want to display a Analog value on the LCD from a sensor. How can i do this ?

david asijm

@Darren Page I think this is only compatible for releases R2018a and later. Will edit the submission to reflect that.

Darren Page

Hi, the links wont load on my R2017 version although says it is compatible.

I need some help to make it display 16 characters and 4 lines... as my LCD is 16*4 and I need it for a project.

Updates

1.0.1

Updated Release Compatibility

1.0.0.1

Updating the Required Products

MATLAB Release Compatibility
Created with R2018a
Compatible with R2018a to R2019a
Platform Compatibility
Windows macOS Linux

Arduino_LCD_Driver

Arduino_LCD_Driver/+LiquidCrystalDisplay/+block

Arduino_LCD_Driver/+LiquidCrystalDisplay/+internal

Arduino_LCD_Driver/block

Arduino_LCD_Driver/block

Arduino_LCD_Driver/examples