GLCD_Rectangle(x,y,b,a) - Draw rectangle with co-ordinates (x,y,a,b) The graphics file has three graphics related functions- draw rectangle, circle, and line. But it is rare to have these type of settings changed, so we can go with the default settings. It’s better to refer the datasheet of your display because some displays have inverted pin configurations. We need to change these values based on our display size. The header file (KS0108.h) also contains some global parameter including screen width, screen height, and commands for various commands. GLCD_Bitmap(bmp,x,y,dx,dy) - Display the bmp array contents sized (dx,dy) in (x,y) GLCD_SetPixel(x,y,color) - Set pixel on (x,y) position GLCD_WriteString(stringToWrite) - Write a string on the display GLCD_WriteChar(charToWrite) - Write a single character GLCD_ClearScreen() - Clear the screen content GLCD_Initialize() - Initialize the graphic LCD It includes initializing, setting the location, clearing the screen, writing a single character and string, setting a pixel and displaying a bitmap image. This file has the main higher level functions used in our applications. So we need to add a separate file named KS0108-PIC18.c (or you may edit that one).
The library contains a low-level driver file for PIC16 family, but here we are going to implement it on the PIC18F device (PIC18F4550). KS0108-XXXXX.c&.h – Low level driver for different Microcontrollers.font5x8.h – font definitions for common alphanumeric characters in 5×8 pixel size.
Character LCD only displays the alphanumerical characters. In comparison with the character LCD, it can display anything on the screen provided by the user. It has a resolution of 128×64 which means that it can display 8192 pixels on the screen. In our example, we are using JHD12864 graphical LCD. It supports displays with 128×64 and 192×64 resolutions and can be used with different microcontroller platforms including Microchip PIC microcontrollers. In this article, we are going to use a universal library available for KS0108 based GLCDs. They are commonly seen in the graphics LCDs.
In this article we're going to learn how to use the RS232 communication with MPLAB XC8 Compiler using the PIC18F Peripheral Library and MPLAB Code Configurator.Samsung KS0108/KS0107 is one of the most popular dot matrix LCD controllers available in the market.
UART is also a common integrated feature in most microcontrollers today which is useful for communicating serial data (text, numbers, etc.) to your PC.
The Universal Asynchronous Receiver/Transmitter (UART) controller is the key component of the serial communications between a device and a PC or between devices.
While other interfaces like Ethernet, FireWire, and USB all send data as a serial stream, the term "serial port" usually identifies hardware more or less compliant to the RS-232 standard, intended to interface with a modem or with a similar communication device. This protocol can easily be used to communicate between a PC and various devices supporting this type of protocol like PIC microcontrollers, GPS, GSM modem etc. RS232 serial communication is one of the oldest communication where data is sent or received one bit at a time.