semifluid.com

PIC18F2550 KS0108 GLCD Text Test - Copyright Steven Cholewiak

PIC18F2550 KS0108 Graphical LCD Text Test

08/21/2006

After working with HD44780 displays for such a long time, I've decided to try my hand at graphical LCDs. They are cheap and effective at displaying more information than character LCDs, and in a much more concise manner. Most controllerless graphical LCDs can be difficult to work with, however the KS0107/KS0108 controller combination allow for quick and easy programming. For this project, I opted to use the AZ Displays AGM1264F 128 x 64 pixel graphical LCD with the KS0108 controller. This circuit is a very simple proof-of-concept that has acted as a stepping stone for further development into more complex programs and displays. When constructed and run, the display will show the complete custom 3x5 character set that I put together for the firmware (using the font format from Cornell University and additional font information from Michael Koss).

Full Circuit

PIC18F2550 KS0108 GLCD Text Test

The source and firmware for the circuit can be found at the bottom of the page. Each section of the circuit is labeled in the schematic. All of the sections and their components are described and discussed below. The part numbers for the components are linked to websites for data and more information when available.

Power Supply

PIC18F2550 KS0108 GLCD Text Test Power Supply

The power supply uses a 9 volt battery and a TC1262-5.0V high-accuracy low-dropout linear voltage regulator to provide a stable 5 volt supply for the microcontroller and the graphical LCD. A 1uF (microFarad) polarized decoupling capacitor is necessary on the output of the voltage regulator to prevent power spikes or ripples. A wall wart power supply as low as 5.3V can be substituted for the 9 Volt battery.

AZ Displays AGM1264F

PIC18F2550 KS0108 GLCD Text Test AGM1264F

The AGM1264F is 128 x 64 pixel graphical LCD with built in controllers that allow is to be easily controlled using a PIC microcontroller. It is a 128 x 64 pixel graphical LCD and has an LED backlight, onboard negative voltage generator (7660) for LCD driving, onboard Samsung KS0108 controller, and an 8-Bit MPU interface.

Microcontroller

PIC18F2550 KS0108 GLCD Text Test Microcontroller

The microcontroller used is a Microchip PIC18F2550. I modified the PIC18F2550 Tiny PIC Bootloader assembly file so I could use a 20MHz crystal/resonator at 115,200 baud (the modified bootloader can be found at the bottom of the page). The PIC18F2550 runs at 48MHz using the internal PLL. R1 is a pull-up resistor necessary for operation. C1 is a stabilizing capacitor that is used for the onboard USB voltage regulator, which is not used in this project. The component marked 'RES' is a 20MHz resonator.

RS232 Level Converter

PIC18F2550 KS0108 GLCD Text Test RS232 Level Converter

The microcontroller USART pins need to be connected to a RS-232 Level Converter to connect to a PC for firmware updates using the Tiny PIC Bootloader. Otherwise, after initial programming they can be left disconnected

Source and Firmware

The PIC must initially programmed with the 'SAC_tinybld18F2550usb _20MHz_115200_48MHz' hex file to program the bootloader on the PIC. Then, using Tiny PIC Bootloader, the hex file can be placed on the chip using the Tiny PIC Bootloader frontend with '12h 34h 56h 78h 90h' in the 'List of codes to send first:' in the 'Options' menu. Please feel free to contact me if you have any problems.
- SAC_tinybld18F2550usb_20MHz_115200_48MHz.HEX
- 18F2550 GLCD Text Test.c (hex)
- GLCD - modified.c

©2006 Steven Cholewiak