Table of Contents

initialize 16×2 display on RST () EN () D4 () D5 () D6 () D7 ()

Description

The block does the pin assignments for a 16x2 display module. The specific pins that are assigned are for the Reset (RST), Enable (EN), Data 4 (D4), Data 5 (D5), Data 6 (D6), and Data 7 (D7) pins of the module. This initialization enables the code to use the 16x2 display.

LCD Module Pinout

Circuit Diagram

To wire your LCD screen to your board, connect the following pins:

  1. LCD RS pin to digital pin 12
  2. LCD Enable pin to digital pin 11
  3. LCD D4 pin to digital pin 5
  4. LCD D5 pin to digital pin 4
  5. LCD D6 pin to digital pin 3
  6. LCD D7 pin to digital pin 2
  7. LCD R/W pin to GND
  8. LCD VSS pin to GND
  9. LCD VCC pin to 5V
  10. LCD LED+ to 5V through a 220-ohm resistor
  11. LCD LED- to GND

Additionally, wire a 10k potentiometer to +5V and GND, with its wiper (output) to LCD screens VO pin (pin3).

Example

Discover the fascinating world of LCD (Liquid Crystal Display) technology. Learn how liquid crystals monitor light to create flat panel electronic visual displays without emitting light directly

Introduction

LCD(Liquid crystal display)

The liquid crystal display uses the property of light monitoring of liquid crystal and they do not emit the light directly. The Liquid crystal display is a flat panel display or the electronic visual display. With low information content the LCD’ s are obtained in the fixed image or the arbitrary image which are displayed or hidden like present words, digits, or 7 segment display. The arbitrary images are made up of large no of small pixels and the element has larger elements. A 16×2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in a 5×7 pixel matrix. The 16 x 2 intelligent alphanumeric dot matrix display is capable of displaying 224 different characters and symbols.

Circuit

Code

  • Create when flag clicked event
  • From display pallete,  drag initialize the 16×2 display and change the pin numbers as per the circuit diagram.
  • From control palette drag forever block
  • From display palette drag set cursor at column() row()
  • Again from display palette drag write() display enter a message that you want to display on lcd screen.
  • Repeat the above to block and change the  column 3 and row to 2
  • From control palette add wat() block and then from the display palette add clear display block
  • Insert the above set of blocks in forever block

Script:

Output

 

 

Read More
All articles loaded
No more articles to load