14.1 PROJECT 14.1 – Toggle LED

14.1.1 Project Description

This is perhaps the simplest Visual GLCD based project. In this project, a standard GLCD with touch screen is used, as described in Chapter 13. An LED is connected to pin RC7 of the microcontroller and the LED is toggled when a shape is touched on the screen.

14.1.2 Block Diagram

The block diagram of the project is as shown in Figure 13.3.

The operation of the project is as follows: After power-up and screen calibration, the user can touch the TOGGLE LED box to turn ON the LED. Touching this box again will turn the LED OFF.

14.1.3 Circuit Diagram

The circuit diagram of the project is as shown in Figure 13.5. Standard 128 × 64 pixel GLCD is used in this project. Switching transistors are used as the touch screen controller. A PIC18F45K22 type microcontroller is used in the design with 8 MHz crystal.

1. Create Project File
Start the Visual GLCD software. Select Project -> New from the top-down menu. A window will appear, as shown in Figure 14.1. Enter the project name and choose the desired project path. Then click OK. In this project, the name TOGGLE is given to the project.
2. Configure Project
In the Project Settings window, make the following settings:

Figure 14.1 Specify the project name and project path

img General (see Figure 14.2)

Figure 14.2 General settings

  • Hardware patterns: EasyPIC6;
  • Target Compiler ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.