KS0108 Based 128×64 Pixel GLCD

Assembled GLCD kit, GLCD modulet, 128×64 pixel GLCD

The following picture shows the assembled GLCD kit. The default microcontroller that comes with the development board is PIC16F886. The IDC cables connect the 8-bit data port of the GLCD to PORTC and the GLCD control signals to PORTB. Table 1 shows the details of the mapped pins. An SMT potentiometer is provided on the backside of the GLCD adapter to adjust the contrast of the display. The GLCD adapter has got an onboard transistor switch for turning the GLCD back-light on and off.

The IDC cable connects the switch to the RB3 pin, which must be set to 1 to turn the back-light on. I quickly tested the board with a “Hello World” program, which was written and compiled with mikroC Pro for PIC. I used the built-in GLCD library routines for the test program. An important thing to note here is that the mikroElektronika’s built-in GLCD library works with any KS0108 based 128×64 pixel GLCD that has active low CS1 and CS2 signals.

However, the GLCD module that comes with the kit has CS1 and CS2 pins as active high signals. A simple solution to incorporate this difference in the mikroC code is to swap the CS1 and CS2 pins in the program, like this.

Download the source and HEX codes for the test program

Download the source and HEX codes for the DHT11 sensor

Leave a Reply

Your email address will not be published. Required fields are marked *