Skip to Content
Using LEDs, LCDs and GLCDs in Microcontroller Projects
book

Using LEDs, LCDs and GLCDs in Microcontroller Projects

by Dogan Ibrahim
November 2012
Intermediate to advanced
496 pages
12h 2m
English
Wiley
Content preview from Using LEDs, LCDs and GLCDs in Microcontroller Projects

12.4 PROJECT 12.4 – GLCD X-Y Plotting

12.4.1 Project Description

This project will demonstrate how the graph of a function can be plotted on the GLCD. In this project, the graph of y = x2 − 1 is plotted as an example, with x varying between −2 and +2.

The mid-point of the GLCD screen is taken as the co-ordinate centre point of the X-Y axis, and the two axes are drawn from this point, as shown in Figure 12.24, that is the GLCD co-ordinate (63,31) is taken to be the (0,0) co-ordinate point of our axes. The X-axis is the horizontal axis extending from left to right. Similarly, the Y-axis is the vertical axis extending from bottom to top.

Figure 12.24 The GLCD screen co-ordinates and X-Y co-ordinates

img

12.4.2 Block Diagram

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

12.4.3 Circuit Diagram

The circuit diagram of the project is as shown in Figure 12.6.

12.4.4 Project PDL

The PDL of this project is given in Figure 12.25.

Figure 12.25 PDL of the project

img

12.4.5 Project Program

Figure 12.26 shows the program listing (GLCD5.C) of the project. At the beginning of the program, the connection between the microcontroller and the GLCD are defined using sbit statements. The GLCD is connected to ports B and D of the microcontroller and thus both of these ports are configured as digital ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Practical AVR Microcontrollers: Games, Gadgets, and Home Automation with the Microcontroller Used in Arduino

Practical AVR Microcontrollers: Games, Gadgets, and Home Automation with the Microcontroller Used in Arduino

Alan Trevennor

Publisher Resources

ISBN: 9781118361030Purchase book