Once I’ve got several HQM1286404 graphical LCDs around, I decided to build a prototyping board where I could easily plug LCD to it, read data via ADC and display graphs, and plug keypad if needed for some menu functions. Earlier, I tested graphical LCD on prototype breadboard but dealing with multiple wires (GLCD needs 20) resulted in many failures. It is OK to do simple tasks, but more complex applications require a more stable platform. So here it is:
This type of GLCD is a standard 128×64 pixel matrix controlled by the KS0108 LCD controller. I have a smaller non-common pin-header where pins have 2mm step, so I had to draw it for Eagle library, which you will find in project files. I decided to make a simple circuit so it could fit in 100x50mm single-sided PCB. As base MCU, I used Atmega16, which can be replaced with Atmega32, which is pin-compatible with Atmega16 have more data memory.
The main features list:
- Atmega16 or ATmega32 microcontroller;
- High speed with 16MHz quartz;
- Can be programmed ISP;
- RS232 Communication with on-board MAX232;
- Adjustable AREF;
- The voltage regulator on board with power LED;
- Graphical LCD connector;
- 3 ADC inputs;
- 10 I/O pins for custom use;
- 100x50mm easy to build single-sided PCB;
- Reset button.
PCB overlay for quick pin finding:
Working with graphical LCD is really simple. Just find a suitable KS0108 library and you can output information with few commands. If you work with the WinAVR tool-set, I recommend downloading KS0108 Library which was written by Fabian Maximilian Thiele some time ago. As his site link is dead you can download it from here.
It is easy to add new characters to this library. Just download GLCDFontCreator2, and with this java program, you can fetch fonts from your windows system and automatically convert them to character arrays and save them in .h format ready to include in to project.
Download Eagle schematic, PCB and sample avrgcc project.