12.1 PROJECT 12.1 – Creating and Displaying a Bitmap Image

12.1.1 Project Description

This project shows how a monochrome bitmap image can be created and then displayed on the GLCD.

If a bitmap image is already available, we can use the mikroC Pro for PIC GLCD bitmap editor tool to convert the image into a data array, so that it could be used in a C program to display the image on the GLCD. Alternatively, we could create our own bitmap images using suitable programs. There are many tools for creating bitmap images. Perhaps the easiest way to create a bitmap image is by using the Windows Paint program, which is distributed free of charge with the Windows Operating System. In this project we will use the Paint program to create the image of a face with text and then display it on the GLCD. Notice that the created image or the available bitmap image must be monochromatic.

The steps in creating a bitmap image with the Paint program and then displaying on the GLCD are given below:

  • Start the Windows Paint program. Start -> All Programs -> Accessories -> Paint.
  • Click ‘Resize’. Unclick ‘Maintain Aspect Ratio’. Click ‘Pixels’. Select the GLCD screen size in pixels as Horizontal: 128, Vertical: 64. Click ‘OK’ to accept the entries (see Figure 12.1).
  • Click the ‘Magnifier’ button and then click on the image to enlarge the image to a suitable size.
  • Click ‘View’ and then select ‘Gridlines’. As shown in Figure 12.2, you should now see the GLCD screen with 128 pixels in the horizontal direction, ...

Get Using LEDs, LCDs and GLCDs in Microcontroller Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.