This document describes how to use the PIC16-based LCD driver board. The description covers two aspects:
It is strongly recommended to read the Technical Design Document.
Board overview and connectors
Figur 1 shows an overview of the board and its connectors. The main components are the Hitachi HD44780U compatible display module (1) and the PIC16F1713 microcontroller (2), controlling the display module.
The LCD display can be controlled by an external board/MCU via a simple command interface communicating over a UART serial interface. The UART serial RX connector is the one labelled RB3 (6) on the header.
The board consists of the following main components and connectors (see figure 1):
The main PCB has been designed with screw holes matching the screw holes on the LCD display module. The LCD module is fitted with M3 screws through 10mm standoffs. The LCD display module used in this project has dimensions 66 x 37mm. The main mechanical construction is shown in Figur 2.
Electrically, the LCD display module has been connected to the main PCB via a male 16-pin header (100mil/2,54mm, soldered to the LCD display module), connected directly to a corresponding female header (soldered to the main PCB). This is shown in Figur 3.
How to use LCD display driver board
The main purpose of the LCD display board is to receive data in serial form from an external board, to be displayed on the LCD. This chapter describes how to connect an external board, and how to send LCD commands and data to be displayed over the UART serial interface.
Connecting power to the board and to the LCD backlight diodes
Connect DV voltage source to the V+ and V- pins, number 5 in Figur 1. Typically 5V, maximum 6,5Volts.
Optionally, connect a DC power source to the LED+ and LED- pins, number 7 in Figur 1. Max voltage 4,5Volts.
Adjust contrast on LCD
By default, the character “0” is displayed in position 0x00. This can be used to help adjusting the contrast on the LCD. This is done by adjusting the trimmable potentiometer on the PCB until the character is displayed with desired contrast. Note that if the contrast is way off, the contents on the LCD may be completely invisible. If you do not see anything when turning on the power, try first adjusting the contrast to get into the visible range.
Connecting an external board to the LCD display driver board
To connect an external board to the LCD display driver board:
Programming an external board for communicating with the LCD display driver board
The available functions and the simple UART communication protocol is described in the technical document. Please read this carefully.
The programmer of the external board needs to do the following:
The code for the reception of the three bytes is shown in Figur 4. When the first byte has been transferred, the RCIF flag is set. This in turn initiates the reception of the two next bytes. They are all initially stored in the array serial_array. The three array elements are theun used ar arguments for the function LCD_select_function(), that executes the appropriate function based on the content of the control byte (first argument, initially stored in serial_array.
The on-board PIC16F1713 MCU needs no additional programming to work. But of course, the user is free to modify or add functionality to the code.