Home > Electronics > Intro – Getting started with a 128×64 Graphics LCD Display

Intro – Getting started with a 128×64 Graphics LCD Display

This is going to be a mini-series on how to get started with a 128×64 LCD display. I’ll be going through all the steps that are involved in getting one of these damned things to work and I’ll post links and references wherever necessary.

“But”, you argue, “why do I need to learn this stuff? I can just whip out my Arduino and use the GLCD library and be just as cool!” Well, definitely. The purpose of doing this is not to be “cool”, but to gain an understanding into how this works and what kinds of problems you may face when working on something like this.

I won’t go too much into the pros and cons of which is a better approach. Obviously, libraries are there for a reason and if you’re using a specific development platform/board (Arduino, EasyPic) or a specific compiler for a certain project (AVR-GCC, MikroC, XC8) and you’re on a deadline and have a fairly straightforward task to accomplish, you should go ahead with that.

On the other hand, if LCD.Write(“Hello, World!”) doesn’t cut it anymore and you want to have complete control on a pixel to pixel basis, and/or be able to churn out your own library for a specific microcontroller that you’re currently using (8051, PIC, AVR, MSP) then you should read these series of posts.

On the whole, I will try to keep this series largely microcontroller agnostic. You should be able to read whatever is given here and transfer the learning to any microcontroller or development platform with a small amount of effort.

But for the sake of demonstration, I will be using a PIC16F886 microcontroller here. I have used both AVR and PIC and they’re both excellent microcontrollers in terms of performance, price and availability. But I’m going with a PIC here because I’m trying to learn more about these microcontrollers.

Here’s the table of contents. I will keep updating the links as I push content out:

  1. Intro – Getting started with a 128×64 Graphics LCD Display
  2. Part 1 – Getting started with a 128×64 Graphics LCD Display – JHD12864E (KS0108 family)
  3. Part 2 – Getting started with a 128×64 Graphics LCD Display – Screen resolution and locating pixels
  4. Part 3 – Getting started with a 128×64 Graphics LCD Display – Passing instructions
  5. Part 4 – Getting started with a 128×64 Graphics LCD Display – Pin configuration
  6. Part 5 – Getting started with a 128×64 Graphics LCD Display – Putting it together
  7. Part 6 – Getting started with a 128×64 Graphics LCD Display – Hello World!
  8. Part 7 – Getting started with a 128×64 Graphics LCD Display – Porting a bitmap to the GLCD
  9. Part 8 – Getting started with a 128×64 Graphics LCD Display – Fonts! Fonts! Fonts!
  10. Part 9 – Getting started with a 128×64 Graphics LCD Display – Pitfalls, debugging and troubleshooting
About these ads
  1. ashutosh
    November 12, 2013 at 4:56 pm

    do we have to supply -10 volts at the pin no-18 ??

    • ashutosh
      November 12, 2013 at 4:58 pm

      if yes then. what are the possible options to provide -10v ??

  2. November 12, 2013 at 5:45 pm

    Hi Ashutosh – You don’t have to supply -10V. The LCD display itself will create -10V at pin 18. You can check it out with a digital micrometer if you have one. All you need to do is use the -10V pin with the trimpot to adjust the contrast

    • ashutosh
      November 12, 2013 at 7:33 pm

      okay thanks. I am using JHD12864E via teensy 3.0 but i am not able to run this LCD

      • November 12, 2013 at 8:03 pm

        Yea, it’s a bit difficult to implement this from first principles, but I can suggest a few checkpoints:

        1. Are you giving a delay between setting the Enable pin high and setting it low? I suggest you at least put 4-5ms of delay before and after you change the state of the enable pin. This is very important
        2. Check the connections – are they all correct? (Duh!)
        3. All 8 pins of the data are important, if you miss any of them it won’t work. I had a problem where the pins I was using on the PIC microcontroller were not working because they were XTAL1 and XTAL2 and another case where my AVR microcontroller didn’t work because JTAG was enabled and the pins were always high! One way to check this is to set up the entire thing in Proteus and run a simulation with the code. But I’ve never used the Teensy, so don’t know how it fares in Proteus

  3. nilesh
    January 20, 2014 at 1:14 pm

    great work!!!
    But what about rest tutorials ? 5 , 6, 8, 9.

  1. November 4, 2013 at 7:49 pm
  2. November 4, 2013 at 7:56 pm
  3. November 4, 2013 at 8:02 pm
  4. November 4, 2013 at 8:41 pm
  5. November 17, 2013 at 9:54 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: