Introduction: Hello World! on LCD Using CloudX M633

In this Tutorial, we are going to display on LCD(Liquid Crystal Display).

Step 1: LCD(liquid Crystal Display)

The LCDs have a parallel interface, meaning that the microcontroller has to manipulate several interface pins at once to control the display. The interface consists of the following pins:

A register select (RS) pin that controls where in the LCD's memory you're writing data to. You can select either the data register, which holds what goes on the screen, or an instruction register, which is where the LCD's controller looks for instructions on what to do next.

A Read/Write (R/W) pin that selects reading mode or writing mode

An Enable pin that enables writing to the registers

8 data pins (D0 -D7). The states of these pins (high or low) are the bits that you're writing to a register when you write, or the values you're reading when you read.

There's also a display constrast pin (Vo), power supply pins (+5V and Gnd) and LED Backlight (Bklt+ and BKlt-) pins that you can use to power the LCD, control the display contrast, and turn on and off the LED backlight, respectively.

The process of controlling the display involves putting the data that form the image of what you want to display into the data registers, then putting instructions in the instruction register. The LiquidCrystal Library simplifies this for you so you don't need to know the low-level instructions.

The Hitachi-compatible LCDs can be controlled in two modes: 4-bit or 8-bit. The 4-bit mode requires seven I/O pins from the Arduino, while the 8-bit mode requires 11 pins. For displaying text on the screen, you can do most everything in 4-bit mode, so example shows how to control a 2x16 LCD in 4-bit mode.

Step 2: COMPONENT

  • CloudX M633
  • CloudX SoftCard
  • V3 Cord
  • LCD 16x2
  • 10k Ohm Potentiometer
  • Jumper wire
  • 220 ohm resistor
  • BreadBoard

you can buy your componentHere

Step 3: HARDWARE

  • LCD RS pin to digital pin 1 of the Cloudx M633
  • LCD Enable pin to digital pin 2 of the Cloudx M633
  • LCD D4 pin to digital pin 3 of the Cloudx M633
  • LCD D5 pin to digital pin 4 of the Cloudx M633
  • LCD D6 pin to digital pin 5 of the Cloudx M633
  • LCD D7 pin to digital pin 6 of the Cloudx M633

Additionally, wire a 10k pot to +5V and GND, with it's wiper (output) to LCD screens VO pin . A 220 ohm resistor is used to power the backlight of the display, usually on pin 15 and 16 of the LCD connector

Step 4: CODING

Copy this code to your CloudX IDE

#include<CloudX/M633.h>
#include<CloudX/Lcd.h>
setup(){
    lcdSetting(1,2,3,4,5,6);
    lcdCmd(clear);
    lcdCmd(cursorOff);
loop(){
    lcdWriteText(1,2,"HELLO WORLD!"); 
    lcdWriteText(2,2,"I USE CLOUDX ");
    }
}