Here I have explained how to Integrate LCD (without using I2C protocol) with RL78/G14 Renesas microcontroller using CS+ IDE.
STEP 1:Creating New Projects
We are going to create a project for Integrating 16x2 LCD display with RL78 Renesas MCU using CS+ IDE
.
Below image is the Project tree for LCD Display.
Assigning GPIO's for LCD Display
Here is my GPIO Configuration to communicate with LCD Display
The Liquid Crystal DisplayBefore starting the configuration, let's look and the LCD closely and see what the 16 pins are for:
- GND - Ground Connection
- VCC - +5V Connection
- VO - analogue pin used for screen brightness, connects to Potentiometer.
- RS - tells the LCD what will be written to it.
- R/W - the read/write pin (normally hardwired to ground).
- E - tells the LCD the data is ready to be written.
- D0 to D7 - bus lines for the LCD, this is where your data is passed from the Arduino to the LCD.
- A - +5V Connection for the backlight of the LCD.
- K - the ground pin for the backlight of the LCD.
MCU Pins - LCD Pins - Color (Wires as per above Picture)
P14 - REG_SELECT - BROWN
P15 - ENABLE - RED
P110 - RW_PIN - ORANGE
P10 - D4 - YELLOW
P11 - D5 - GREEN
P12 - D6 - BLUE
P13 - D7 - PURPLE
VSS - GND - BLACK
D0 - D1 - D2 - D3 - Not Connected
MCU is connected with LCD Display as per above PIN configuration. Add variable resistor to the LCD V0
PIN as shown above figure to control the brightness.
Variable resister Pin Connection,
PIN 1 - 5V
PIN 2 - V0(LCD Pin)
PIN 3 - GND
STEP 3:Add source file into the Project
Drag and drop the source file into the Projects you'll get pop as given below
mention the subfolder level which means folder depth of the importing folder and then click OK. Source is added successfully into the projects.
16x2 LCD Display Source you can download from here.
NOTE: Hardware connection should be proper.
Please make sure that every pin is connected with the respected pins as per GPIO PIN configuration.
RESULT:Here, I have given the output of LCD Display with RL78 Microcontroller.
If you are facing below issue in display, do not worry it's because of V0
is not controlled properly. If you change the Variable resister you can see the difference of LCD display brightness. If you reduce LCD brightness you will get the above result.
Comments