KS0108 Graphics Library for PIC16F microcontrollers

Submit to reddit

easypic5Not that I’m not happy with the default mikroC library for the KS0108 graphic displays, as I always I wanted something with the source available. Considering that I’m a beginner with microcontrolers having the source available to hack around is a very valuable learning tool.

The project is based on the source found here:


The source is made pretty universal, still it took some work and modifications to have it working in mikroC. The archive is a ready working project for mikroC.

I tested and developed it on the EasyPIC5 development board with a PIC16F887 microcontroller. You have to have the board  configured for the touchscreen panel and GLCD display – i suppose you know how to do that, if not you should consult the EasyPIC5 manual.

The project has everything you need:

  • a small demo program that uses text and bitmaps so you can see how the touchscreen, graphics, images and text work
  • a font file
  • a file to host your bitmap data
  • graphic functions
  • ks0108 functions
  • microcontroller dependent functions.

Download everything HERE. Or you could find the code on GitHub.

  • Hello my friend
    You did good job. But I have tried to port any ks108 graphic program to mikroelektronika easydspic4 microcontroller board since 4 days. But no success. Could you please help me.
    Noly it shows something. ı can fix others.
    Thaks a loooot.

    Huseyin Aga
    [email removed]

    EasydsPIC Board as follows
    only Graphics lcd side:

    cs1 rb4
    sc2 rb5
    rf0 rs
    rf1 r/w
    rf4 e
    rb0..3 data 0..3
    rd4..7 data 4..7
    rf5 rst

  • I’m sorry but I have never worked with dsPICs and know nothing about. My hint would be to check ks0108-pic16 as this is the file dealing with microcontrolers dependent code. See if everything there is appropriate for dsPICs.