100% found this document useful (1 vote)
312 views2 pages

LCD 16x2 Interfacing With ARM MBED - MBED

This document discusses interfacing an LCD 16x2 display with an ARM mbed microcontroller. It describes the LCD 16x2 as having 2 rows that can display 16 characters each using either 4-bit or 8-bit mode. It provides an interfacing diagram and example code to display "Hello World!" on the LCD in 4-bit mode using the TextLCD library.

Uploaded by

Krishanu Modak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
312 views2 pages

LCD 16x2 Interfacing With ARM MBED - MBED

This document discusses interfacing an LCD 16x2 display with an ARM mbed microcontroller. It describes the LCD 16x2 as having 2 rows that can display 16 characters each using either 4-bit or 8-bit mode. It provides an interfacing diagram and example code to display "Hello World!" on the LCD in 4-bit mode using the TextLCD library.

Uploaded by

Krishanu Modak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LCD 16x2 Interfacing With ARM MBED

LCD 16x2

LCDs (Liquid Crystal Displays) are used in embedded system applications for displaying various parameters and status of the
system.
LCD 16x2 is a 16-pin device that has 2 rows that can accommodate 16 characters each.
LCD 16x2 can be used in 4-bit mode or 8-bit mode.
It is also possible to create custom characters.
It has 8 data lines and 3 control lines that can be used for control purposes.

For more information about LCD 16x2 and how to use it, refer the topic LCD 16x2 module in the sensors and modules section.

Interfacing Diagram

Interfacing 16x2 LCD With ARM MBED

Example

Displaying text “Hello World!\n” on 16x2 LCD in 4-bit mode.

Here, we are using TextLCD library, developed by Simon Ford for controlling various LCD panels based on the HD44780 4-bit
interface.

You can find more information about the TextLCD library from here.

Program
#include "mbed.h"

#include "TextLCD.h"

TextLCD lcd(p5, p6, p7, p8, p9, p10);//RS, RW, D4, D5, D6, D7

int main() {

int a=0;

lcd.printf("Hello World!\n");

while(1)

lcd.locate(0,1);

lcd.printf("%d",a);

wait(1);

a++;

You might also like