PIC M68 Display Library
This project is a C module for using 'Hitachi style' M68 displays with a PIC18 micro controller. Typically this would be a 1 or 2 line LCD or VFD display. The C module is targeted and tested with the MPLAB C18 compiler. The MPLAB C18 compiler comes with XLCD, a peripheral library for Hitachi HD44780 LCD controllers. This code is for a M68 interface used in my Noritake and Seiko displays, for which the include XLCD code does not work.
Images
Usage
The header file lcd.h is extensively commented and provides instructions for preparation. Preparation mostly involves implementing a device millisecond
delay routine, defining your data port, and defining your control pins. Notable functions:
- lcdInit()
- lcdPutc(<character>)
- lcdWrite(<string>)
- lcdCursorLine1(<position>)
- lcdCursorLine2(<position>)
- lcdClear()
- lcdSetBriteness()
- lcdSetDisplayMode()
Notes
These displays may optionally support an 8 or 4 bit data transfer, but only 8 bit transfer is supported at this time. The specific displays I've developed this module for is the Noritake 5 x 7 dot VFD CU24025ECPB-U1J with the M68 bus timing selected. This module also adjusted to work with a similar Seiko LCD.
Download
MPLAB is a free PIC integrated development environment by Microchip.
MPLAB download page
The MPLAB C for PIC18 tool chain has a lite and 30 day trail paid version.
MPLAB C Compiler for PIC18 series (Academic version) download page
- lcdTest.c (1 KB) Main source to demonstrate usage Version 1.1
- lcd.h (7 KB) Header File Version 1.1
- lcd.c (5 KB) C Source File Version 1.1
Version History
- Version 1.1: This C module is a rewrite I recently did of an assembly module I did long ago. This C version has very little testing, but was based on my heavily tested ASM. Silently updated with fixed ROM lcdWriteR routine and added a test main source file to demonstrate usage.
(Current)