LCD Serial Terminal using PIC16F84
LCD Serial Terminal
In the 1980s a serial terminal was a big thing with a picture tube and keyboard. You used it to communicate with a computer by RS-232 cable or with a modem. In this century, we still sometimes have need for a serial terminal, and we’ll typically use a personal computer running a terminal program (Hyperterminal, bundled withWindows, is a terminal program). This project is a self-contained serial terminal using a PIC16F84 microcontroller chip, an inexpensive LCD character display, a keypad, and very little else. It is full-duplex, meaning keypresses cause RS-232 output, and RS-232 input makes characters appear on the LCD. If you connect the RS-232 output to the input you can see the keys as you press them, without connecting to anything else (that’s called “looping back”).
The picture above doesn’t show the electronics, just a keypad and LCD display. The electronics is on a small board behind the LCD. This LCD is a 4 line by 20 character intelligent LCD display. Displays from 1×8 to 4×20 or 2×40 and pretty much anything in between are compatible. I paid less than US$10 for this display from All Electronics. The keyboard you use should be a matrixed keyboard or keypad with up to 5 rows and 4 columns (20 keys maximum).
This small PC board is the terminal itself. Someday I will document a PC board design, but currently I am only making available the schematic diagram, source code for the PIC16F84, and compiled hex code for a typical configuration so you can quickly test it out. The source code is in C and very easily configured for different baud rates, LCD and keypad configurations. The program should be compiled with Hi-Tech PICC. A free version supporting the PIC16F84 called “PICLITE” is available and works fine.
The mapping of the keys is fully configurable, and each key can also be configured for one of four different modes. Each key is allowed to have a primary code and a secondary code. Depending on what mode is chosen, the secondary code might be sent when the key is released, or when the key is held more than one second, etc. Key repeat is also programmable, and each key can have a different mode.
Many cursor movement features are implemented, all the standard ones (backspace, carriage return etc.) and if you tell the program your LCD format, text will flow from line to line.
For more detail: LCD Serial Terminal using PIC16F84
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w
Current Project / Post can also be found using:
- pic18f lcd serial terminal