Displaying Images on Graphical Lcd(JHD12864E) using Pic16f877 Microcontroller

Here in this post/tutoriqal i am going to teach you how to display images on Graphical lcd using Pic Microcontroller(pic16F877). I am using JHD12864E graphical LcD in my Project. JHD12864E is 128×64 dimension lcd. 128×64 means it has 128 coulombs and 64 rows. So total dots it has is 128×64=8192. You can display an image of maximum size(Dimension = 128×64) with in this range. Some notable things before starting the tutorial.

  • You can only display images of .bmp format. Images bitmaps are obtained only by .bmp format. Graphical lcds consists of dots, we have to display our images on these dots and .bmp image is also comprised of dots. So can easily find bits of images of .bmp format and can map them on Graphical lcd.
  • You can only display black and white images(Monochrome images bitmap is hard to generate. No software is found for generating bitmap of monochrome images on internet).
  • If you want to display images of size greater than 128×64 than first change the size of the image. I used an online image dimension converter(My image size is 960×1280. I converted it to 128×64 using an online image dimension converter. You can found many tools to convert images just Google for it).  

If you are new to graphical lcd and didn’t know much about it just go through the tutorial below. You will become familiar with graphical lcd, its half and pages, its commands, its pin out and how to effectively use it. It will help you in understanding the code given below.

I am going to display five images on graphical lcd. Images which i am going to display on lcd are below. I created bitmaps of all the images given below.

Displaying Images on Graphical Lcd(JHD12864E) using Pic16f877 Microcontroller

The first pic which i am going to display is mine(The Admin). Its original size is 960×1280, format is .jpg and its a monochrome pic. I converted it to black and white, format .bmp and size is reduced to 128×64 using an online software for image editing.

Now when you converted images its time to find bitmaps. Bitmaps are found using special software’s. I used an open source software The Dot Factory. Just give the path of the image and click generate it will generate bitmap with in a second. Download the software from here.

Dot factory not only generates bitmaps it also gives you the dimension of the newly generated bitmaps. Once bitmaps code is generated you can copy them from their and place them in your code. 
Pic16f877 microcontroller is used to display images on jhd12864E graphical lcd. Port-B is used to send data and commands to graphical lcd. It is connected to data pins D0-D7 of Graphical lcd. Lcd controlling pins en(Enable),rs(Register-select),rw(read-write) are connected to Port-D pins#7,6,5. Graphical lcd’s First-Half selection line is connected to Port-D Pin#4 and second-half selection line is connected to Port-C Pin#4. Circuit diagram of the project is given below.

Source: Displaying Images on Graphical Lcd(JHD12864E) using Pic16f877 Microcontroller

Leave a Comment

= 4 + 5

Read previous post:

Geniatech and Linaro announced a “SOM 3399” module that adopts the 96Boards SOM spec and runs Linux on a Rockchip...

Scroll to top