Search This Blog

Imagine your phone without its display! Seems absurd right? You may ask how will then anyone understand what's going on. Visons are much...

LCD Part-01: How to Use



Imagine your phone without its display! Seems absurd right? You may ask how will then anyone understand what's going on. Visons are much more feasible than the explanation of an incident. Applying the same argument to your fascinating project, you can avoid a chunk of descriptions by simply adding a display to your project. 

Now the selection of display depends on the purpose of your project. But LCD has a greater extent of acceptance to all for its user-friendly interface and controlling parameters. Let us talk about a 16x2 LCD screen here.


Firstly what do we mean by 16x2? This matrix defines that we can represent 16 characters in each row and 32 characters altogether in the display. Each character is accommodated in a 7x5 pixel display. Now there is a big problem with this display. To work with this module you need to connect 16 pins! And sometimes it is a great hassle to figure out the functioning of the pins. 


✧ Pin_01: GND/VSS: It is the ground (0V) of the module. It needs to be connected with 0V.

✧ Pin_02: VDD/Vcc:  Supply voltage of the module. The module supports 5V (4.7~5.3V).

✧ Pin_03: V0/Vee: It adjusts the contrast of the display. A potentiometer can be connected with this pin to adjust the contrast level. Increment of the potentiometer increases the contrast and vice-versa.

✧ Pin_04: RS: It stands for Register Select. Low voltage in this pin selects the command register. Command register stores the instructions given to the LCD. High voltage selects the data register. Data is processed and stored in the data register. The data is mainly the ASCII code of the character.

✧ Pin_05: R/W: To write to the register, we need to give low voltage, and to read from the register it needs a high pulse.

✧ Pin_06: EN: This pin enables the module to receive data through the data pins. To enable data reception, this pin needs to be provided with a voltage spike.

✧ Pin_07: D0: ----------------------
✧ Pin_08: D1:                          ||
✧ Pin_09: D2:                          ||
✧ Pin_10: D3: 8-bit data pins  ||
✧ Pin_11: D4:                          ||
✧ Pin_12: D5:                          ||
✧ Pin_13: D6:                          ||
✧ Pin_14: D7: ----------------------  

✧ Pin_15: A: It is the anode pin of the backlight. It needs to be shorted with Vcc.

✧ Pin_16: K: It is the cathode pin of the backlight. It needs to be shorted with the ground. 


Arduino Interface:




Now there are few things to notice;

* R/W pin has been grounded.
* Enable pin is connected to a PWM pin.
* Only 4 data pins are connected 

Problem!

As it is said earlier, the biggest problem of using this LCD module is that one needs to connect at least 12 pins of the module to the MCU. It may cause a shortage of pins of the MCU for other components!
To avoid this problem, there's another module called I2C LCD Adapter Module.


This module works based on the I2C protocol. Here you only need 4 pins of your MCU to run the display! But you need to modify your code.



Now let's wrap this up. You know how to connect, write your code, build your project. Be yourself!
Check out the next part to know how LCD works.





Image source:
* Makerguides.com
* WeArGenius
* CHS Sigma Wiki
* courses.jamesmpoe.com





0 comments: