Tag Archives: hd44780

LCD Library for PIC – Setup on MPLAB X IDE

This article describes the setup and use of the C library for hd44780 based alphanumeric lcd modules. This library is also available for the AVR family of microcontrollers. This part is focused on its usage with PIC16F series of MCUs from Microchip. Here we describe how to setup a MPLAB X project with support for lcd related functions. The library is designed for compilation and use with Microchip’s XC8 C Compiler. Fig. LCD Demo   Creating a New Project in MPLAB X You can create a new project using the MPLAB’s Start page as shown below. Fig. MPLAB X Start Page Alternatively you can use File->New Project Fig. Select New Project from File Menu And for those who love the Keyboard over mouse can hit <Ctrl>+<Shift>+<N> Any of the three method will launch the New Project Wizard as shown below. The first step is the selection of project type. From the Categories list select Microchip Embedded and from Projects select Standalone Project. Fig. Project Type Selection Second step is the selection of device for which the project is targeted. Select Mid Range 8-bit MCUs (PIC12/16/MCP) in Family and PIC16F877A in Device. Fig. Device Selection Third step is the selection of debug tool. For that select Simulator. Fig. Tool Selection Microchip MPLAB lets you install more that one compiler. It also […]

LCD Module Interface with PIC16F877A

This article describe the hardware setup required for interfacing HD44780 based alphanumeric LCD modules with a PIC16F877A microcontroller. The software part consisting of the LCD library for PIC, its setup and use with MPLAB X IDE and XC8 compiler are described in a separate article. LCD Library for PIC – Setup on MPLAB X IDE A common controller chip used in many alphanumeric LCD module is the HD44780. The purpose of the controller is to generate pixel patterns and drive individual pixels of the LCD to show characters and symbols. In this method the main microcontroller running your application code does NOT need to generate the pixel patterns, it just need to tell the controller chip which character or symbol to show the rest is done by the controller, i.e. the HD44780. The same controller chip is used in many differently sized alphanumeric LCDs. Thus the connection schematic and driving code is same. Pin Details of LCD Module All HD44780 based LCD modules have 16 pin connecters. The detail about these pins is given below. Interface pins of LCD Module   Pin Number Pin Name Pin Type Connected with PIC16F877A’s pin 1 VSS Power Supply – 2 VCC Power Supply – 3 VEE Contrast Adjust – 4 RS Control Line RD4 5 R/W Control Line RD5 6 E Control Line […]