Summary of Custom Characters on LCD using PIC – MPLAB XC8
This tutorial explains creating up to eight custom 5×8 (or four 5×10) characters on HD44780-compatible LCDs using a PIC microcontroller and MPLAB XC8 by writing patterns into the LCDs CGRAM. It contrasts CGROM, DDRAM, and CGRAM, and shows characters are built from 5×8 or 5×10 dot matrices (example: Ω symbol).Parts used in the Custom Characters on LCD using PIC – MPLAB XC8:
- PIC Microcontroller (e.g., PIC16 series such as 871 family referenced)
- HD44780-compatible LCD module (5×8 dot matrix typical)
- MPLAB XC8 compiler
- MPLAB IDE (or equivalent development environment)
- Interfacing wires and breadboard or PCB for connections
- Power supply for PIC and LCD (Vcc and ground)
I hope that you already go through our tutorial, Interfacing LCD with PIC Microcontroller – MPLAB XC8. HD44780 compatible controllers used in these LCDs allows us to define 8 custom characters in addition to the standard pre-programmed characters. In this tutorial we will learn, how to create custom characters on LCD using PIC Microcontroller and MPLAB XC8 compiler.
DDRAM, CGROM and CGRAM
CGROM – Character Generator ROM
This is the memory which holds 5×8 or 5×10 dot patterns of predefined characters in the LCD. It can generate 208 5×8 dot character patterns and 32 5×10 dot character patterns.
DDRAM – Display Data RAM
This is the memory which holds the character data which is currently displayed on the LCD screen. Its capacity is 80×8 bits, ie 80 characters.
CGRAM – Character Generator RAM
This memory works similar to CGROM but as this is a RAM we can modify its data any time. So we can store our custom character patterns in this memory through program. We can store up to eight 5×8 character dot patterns or four 5×10 character dot patterns in this memory.
Character Generation
Characters are displayed on the LCD using 5×8 or 5×10 dot matrix. Most of the commonly available displays uses 5×8 dot matrix. We can simply create a custom character by defining each pixel in the dot matrix. Here is an example of creating Ω symbol on 5×8 dot matrix.Project List - 871 PIC Microcontroller
For more detail: Custom Characters on LCD using PIC – MPLAB XC8
Quick Solutions to Questions related to Custom Characters on LCD using PIC – MPLAB XC8:
- What memory holds predefined character patterns in the LCD?
CGROM holds predefined 5×8 or 5×10 dot patterns. - Where is the currently displayed character data stored?
DDRAM stores the character data currently displayed on the LCD. - Which memory allows storing custom character patterns?
CGRAM allows storing custom character patterns because it is RAM and can be modified by program. - How many custom 5×8 characters can be stored in CGRAM?
You can store up to eight 5×8 character dot patterns in CGRAM. - How many custom 5×10 characters can CGRAM store?
CGRAM can store up to four 5×10 character dot patterns. - What dot matrix sizes are used to generate characters on the LCD?
Characters are generated using 5×8 or 5×10 dot matrices, with 5×8 being most common. - Can custom characters be created using PIC and MPLAB XC8?
Yes, custom characters can be created by defining pixel patterns and storing them in CGRAM using a PIC microcontroller and MPLAB XC8. - What example symbol is shown in the tutorial for creating a custom character?
The tutorial shows an example of creating the Omega symbol on a 5×8 dot matrix.
Related projects
Leveraging Blockout Banners for Effective Electronics and Tech Product Displays
Blockout banners have become a popular and effective tool for displaying electronics and tech products in various settings, from trade shows and...
LCD & Display Projects · PIC18F4520Interfacing PIC18F4520 microcontroller with an HD44780 LCD
Introduction Being able to display data from a microcontroller visually has many advantages. It allows for menus, status indicators, and instructions to...
LCD & Display ProjectsVideo Project Development in the Midst of an Impromptu Online Semester
Receiving robot parts in the mail was an unexpected conclusion to the Winter 2020 semester for students. However, when faced with a...
LCD & Display Projects · PIC16F628AFrequency Counter by PIC16F628
In this project we are building a basic and low cost frequency counter circuit . It can measure from 16Hz to 100Hz...
LCD & Display ProjectsWHAT IS A PIC MICROCONTROLLER? WHAT CAN IT DO?
PIC microcontrollers ( Programmable Interface Controllers), are electronic circuits that can be programmed to carry out a vast range of tasks. They...
LCD & Display Projects · PIC16F877ASerial Data Received from PC and Displayed on 16×2 Using USART of Pic16f877 Microcontroller
Here is a simple tutorial on how to receive serial data from PC(Personal Computer) Hyperterminal and display it on 16x2 lcd using...