with user-defined characters and LCD
display animation for PIC16F84
Concept
Specifications
Project Resources
Available Microchip PIC
Assembler Source Code
Schematics
This test application demonstrates the usage of the LCD assembler module files for dot matrix LCDs. It works for LCD controllers such as Hitachi HD44780 (PDF data sheet, 389 kB), Samsung KS0073 (PDF data sheet, 673 kB), and compatibles.
It initializes the LCD display to the 4 bit transfer mode,
loads two user-defined characters to the CGRAM,
and displays both of them together with some other special
characters. Afterwards, an animation using
stars is shown, followed by a forth-and-back shift animation of a
'Hello World' string.
Shows the implementation and functionality of the modules m_wait.asm and m_lcd.asm on the PIC16F84. For the Samsung KS0073 controller type, the constant 'LCDTYPE' must be set to 0x1 to include also the extended function set features for configuration. If this does not help, see also the FAQ section concerning LCD communication issues.
To see a schematic of the connection between LCD and PIC
microcontroller, please refer to the schematic section below. Basically, the connection is described in
the header section of each LCD
assembler module file.
PCB test board for PIC16F84 |
LCD display after reset |
|
LCD display output during operation |
LCD display output during operation |
Processor: | Microchip PIC 16F84 |
Clock Frequency: | 4 MHz crystal (HS mode) |
Throughput: | 1 MIPS |
Code Size of entire Program: | approx. 557 instruction words |
LCD Transmission Mode: | 4 Bit on D4 - D7 (MSB), uses high nibble of the LCD port |
LCD Connections: | 7 wires (4 Data, 3 Command) |
Total LCD Connections: | 10 wires (4 Data, 3 Command, 1 Vdd, 1 GND, 1 Contrast) |
Required Hardware: | HD44780 compatible dot matrix LCD (2x16, 2x20 or 2x40 characters) |
Main File | HEX Files |
Download assembler source code: LCDx_test.asm |
Download Hex File: Specifications: |
The above program needs additional include files (modules) to get successfully assembled: m_bank.asm, m_wait.asm, m_lcd.asm |
Download the PDF schematic to illustrate the connectivity of both 'classes' of LCD driver routines:
Last updated: 2005/06/06