Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000010306254 | TK7882.I6 I37 2012 | Open Access Book | Book | Searching... |
On Order
Summary
Summary
Describing the use of displays in microcontroller based projects, the author makes extensive use of real-world, tested projects. The complete details of each project are given, including the full circuit diagram and source code. The author explains how to program microcontrollers (in C language) with LED, LCD and GLCD displays; and gives a brief theory about the operation, advantages and disadvantages of each type of display.
Key features:
Covers topics such as: displaying text on LCDs, scrolling text on LCDs, displaying graphics on GLCDs, simple GLCD based games, environmental monitoring using GLCDs (e.g. temperature displays) Uses C programming throughout the book - the basic principles of programming using C language and introductory information about PIC microcontroller architecture will also be provided Includes the highly popular PIC series of microcontrollers using the medium range PIC18 family of microcontrollers in the book. Provides a detailed explanation of Visual GLCD and Visual TFT with examples. Companion website hosting program listings and data sheets Contains the extensive use of visual aids for designing LED, LCD and GLCD displays to help readers to understand the details of programming the displays: screen-shots, tables, illustrations, and figures, as well as end of chapter exercisesUsing LEDs, LCDS, and GLCDs in Microcontroller Projects is an application oriented book providing a number of design projects making it practical and accessible for electrical & electronic engineering and computer engineering senior undergraduates and postgraduates. Practising engineers designing microcontroller based devices with LED, LCD or GLCD displays will also find the book of great use.
Author Notes
Dogan Ibrahim, Department of Computer Engineering, Near East University,Cyprus
Professor Ibrahim is currently Head of the Department of Computer Engineering at Near East University, Cyprus. He has been a lecturer at Near East University since 1999, and prior to this held a range of roles including Principal Research Engineer at GEC Hirst Research Centre, London and Lecturer at South Bank University, London. He is an IEE Fellow.
Table of Contents
Preface | p. xiii |
Acknowledgements | p. xv |
1 Introduction to Microcontrollers and Display Systems | p. 1 |
1.1 Microcontrollers and Microprocessors | p. 2 |
1.2 Evolution of the Microcontroller | p. 3 |
1.3 Parts of a Microcontroller y | p. 4 |
1.3.1 Address | p. 4 |
1.3.2 ALU | p. 5 |
1.3.3 Analogue Comparator | p. 5 |
1.3.4 Analogue - to - Digital Converter | p. 5 |
1.3.5 Brown - out Detector | p. 5 |
1.3.6 Bus | p. 5 |
1.3.7 CAN | p. 6 |
1.3.8 CISC | p. 6 |
1.3.9 Clock | p. 6 |
1.3.10 CPC | p. 6 |
1.3.11 EEPROM | p. 6 |
1.3.12 EPROM | p. 6 |
1.3.13 Ethernet | p. 7 |
1.3.14 Flash Memory | p. 7 |
1.3.15 Harvard Architecture | p. 7 |
1.3.16 Idle Mode | p. 1 |
1.3.17 Interrupts | p. 7 |
1.3.18 LCD Drivers | p. 8 |
1.3.19 Pipelining | p. 8 |
1.3.20 Power - on Reset | p. 8 |
1.3.21 PROM | p. 8 |
1.3.22 ROM | p. 8 |
1.3.23 Real - time Clock | p. 8 |
1.3.24 Register | p. 9 |
1.3.25 Reset | p. 9 |
1.3.26 RISC | p. 9 |
1.3.27 ROM | p. 9 |
1.3.28 Serial Input - Output | p. 9 |
1.3.29 Sleep Mode | p. 9 |
1.3.30 Supply Voltage | p. 10 |
1.3.31 Timers | p. 10 |
1.3.32 USB | p. 10 |
1.3.33 Watchdog | p. 10 |
1.4 Display Devices | p. 10 |
1.4.1 LED | p. 10 |
1.4.2 7 - Segment LED | p. 11 |
1.4.3 OLED | p. 12 |
1.4.4 LCD | p. 12 |
1.5 Summary | p. 15 |
Exercises | p. 15 |
2 PIC18F Microcontrollers | p. 17 |
2.1 The PIC18F2410 Microcontroller | p. 18 |
2.2 PIC18F2410 Architecture | p. 19 |
2.2.1 The Program Memory | p. 21 |
2.2.2 The Data Memory | p. 21 |
2.2.3 Power Supply Requirements | p. 22 |
2.2.4 Oscillator Configurations | p. 24 |
2.2.5 The Reset | p. 30 |
2.2.6 Parallel I/O Ports | p. 31 |
2.2.7 Timer Modules | p. 38 |
2.2.8 Analogue - to - Digital Converter Module | p. 43 |
2.2.9 Special Features of the CPU | p. 48 |
2.2.10 Interrupts | p. 49 |
2.2.11 Pulse Width Modulator Module | p. 53 |
2.3 Summary | p. 56 |
Exercises | p. 56 |
3 C Programming Language | p. 59 |
3.1 C Languages for Microcontrollers | p. 59 |
3.2 Your First mikroC Pro for PIC Program | p. 61 |
3.2.1 Comments | p. 61 |
3.2.2 Beginning and Ending a Program | p. 62 |
3.2.3 White Spaces | p. 63 |
3.2.4 Variable Names | p. 63 |
3.2.5 Reserved Names | p. 64 |
3.2.6 Variable Types | p. 64 |
3.2.7 Constants | p. 66 |
3.2.8 Escape Sequences | p. 68 |
3.2.9 Volatile Variables | p. 69 |
3.2.10 Accessing Bits of a Variable | p. 69 |
3.2.11 sbit Type | p. 70 |
3.2.12 bit Type | p. 70 |
3.2.13 Arrays | p. 70 |
3.2.14 Pointers | p. 73 |
3.2.15 Structures | p. 76 |
3.2.16 Onions | p. 80 |
3.2.17 Operators in mikroC Pro for PIC | p. 80 |
3.2.18 The Flow of Control | p. 90 |
3.3 Functions in mikroC Pro for PIC | p. 101 |
3.3.1 Function Prototypes | p. 102 |
3.3.2 void Functions | p. 103 |
3.3.3 Passing Parameters to Functions | p. 104 |
3.3.4 Passing Arrays to Functions | p. 106 |
3.3.5 Interrupt Processing | p. 106 |
3.4 mikroC Pro for PIC Built - in Functions | p. 108 |
3.5 mikroC Pro for PIC Libraries | p. 109 |
3.5.1 ANSI C Library | p. 109 |
3.5.2 Miscellaneous Library | p. 111 |
3.6 Using the mikroC Pro for PIC Compiler | p. 111 |
3.6.1 mikroC Pro for PIC IDE | p. 112 |
3.6.2 Creating a New Source File | p. 118 |
3.6.3 Compiling the Source File | p. 122 |
3.7 Using the mikroC Pro for PIC Simulator | p. 123 |
3.7.1 Setting a Break - Point | p. 124 |
3.8 Other mikroC Pro for PIC Features | p. 126 |
3.8.1 View Statistics | p. 126 |
3.8.2 View Assembly | p. 127 |
3.8.3 ASCII Chart | p. 127 |
3.8.4 USART Terminal | p. 127 |
3.8.5 Seven Segment Editor | p. 127 |
3.8.6 Help | p. 128 |
3.9 Summary | p. 128 |
Exercises | p. 129 |
4 PIC Microcontroller Development Tools - Including Display Development Tools | p. 131 |
4.1 PIC Hardware Development Boards | p. 132 |
4.1.1 Super Bundle Development Kit | p. 132 |
4.1.2 PIC18 Explorer Board | p. 132 |
4.1.3 PIC18F4XK20 Starter Kit | p. 134 |
4.1.4 PICDEM4 | p. 135 |
4.1.5 PIC16F887Development Kit | p. 135 |
4.1.6 FUTURLEC PIC18F4550 Development Board | p. 137 |
4.1.7 EasyPIC6 Development Board | p. 137 |
4.1.8 EasyPIC7 Development Board | p. 139 |
4.2 PIC Microcontroller Display Development Tools | p. 140 |
4.2.1 Display - Hardware Tools | p. 140 |
4.2.2 Display Software Tools | p. 143 |
4.3 Using the In - Circuit Debugger with the EasyPIC7 Development Board | p. 145 |
4.4 Summary | p. 149 |
Exercises | p. 149 |
5 Light Emitting Diodes (LEDs) | p. 151 |
5.1 A Typical LED | p. 151 |
5.2 LED Colours | p. 153 |
5.3 LED Sizes | p. 154 |
5.4 Bi - Colour LEDs | p. 154 |
5.5 Tri - Colour LEDs | p. 155 |
5.6 Hashing LEDs | p. 155 |
5.7 Other LED Shapes | p. 155 |
5.8 7 - Segment LEDs | p. 156 |
5.8.1 Displaying Numbers | p. 157 |
5.8.2 Multi - digit 7 - Segment Displays | p. 159 |
5.9 Alphanumeric LEDs | p. 159 |
5.10 mikroC Pro for PIC 7 - Segment LED Editor | p. 163 |
5.11 Summary | p. 163 |
Exercises | p. 164 |
6 Liquid Crystal Displays (LCDs) and mikroC Pro for PIC LCD Functions | p. 165 |
6.1 HD44780 Controller | p. 165 |
6.2 Displaying User Defined Data | p. 168 |
6.3 DDRAM Addresses | p. 169 |
6.4 Display Timing and Control | p. 171 |
6.4.1 Clear Display | p. 172 |
6.4.2 Return Cursor to Home | p. 172 |
6.4.3 Cursor Move Direction | p. 172 |
6.4.4 Display ON/OFF | p. 172 |
6.4.5 Cursor and Display Shift | p. 173 |
6.4.6 Function Set | p. 173 |
6.4.7 Set CGRAM Address | p. 173 |
6.4.8 Set DDRAM Address | p. 173 |
6.4.9 Read Busy Flag | p. 174 |
6.4.10 Write Data to CGRAM or DDRAM | p. 174 |
6.4.11 Read Data from CGRAM or DDRAM | p. 174 |
6.5 LCD Initialisation | p. 174 |
6.5.1 8 - bit Mode Initialisation | p. 175 |
6.5.2 4 - bit Mode Initialisation | p. 175 |
6.6 Example LCD Display Setup Program | p. 177 |
6.7 mikroC Pro for PIC LCD Functions | p. 180 |
6.7.1 Lcd_Init | p. 180 |
6.7.2 Lcd_Out | p. 181 |
6.7.3 Lcd_Out_Cp | p. 181 |
6.7.4 Lcd_Chr | p. 181 |
6.7.5 Lcd_Chr_Cp | p. 181 |
6.7.6 Lcd_Cmd | p. 182 |
6.8 Summary | p. 182 |
Exercises | p. 183 |
7 Graphics LCD Displays (GLCD) | p. 185 |
7.1 The 128×64 Pixel GLCD | p. 185 |
7.2 Operation of the GLCD Display | p. 187 |
7.3 mikroC Pro for PIC GLCD Library Functions | p. 189 |
7.3.1 Glcd_Init | p. 189 |
7.3.2 Glcd_Set_Side | p. 190 |
7.3.3 Glcd_Set_X | p. 190 |
7.3.4 Glcd_Set_Page | p. 190 |
7.3.5 Glcd__Write_Data | p. 190 |
7.3.6 Glcd_Fill | p. 190 |
7.3.7 Glcd_Dot | p. 191 |
7.3.8 Glcd_Line | p. 191 |
7.3.9 Glcd_V_Line | p. 191 |
7.3.10 Glcd_H_Line | p. 191 |
7.3.11 Glcd_Rectangle | p. 192 |
7.3.12 Glcd_Rectangle_Round_Edges | p. 192 |
7.3.13 Glcd__Rectangle Round_Edges_Fill | p. 192 |
7.3.14 Glcd_Box | p. 193 |
7.3.15 Glcd_Circle | p. 193 |
7.3.16 Glcd_Circle_Fill | p. 194 |
7.3.17 Glcd_Set_Font | p. 194 |
7.3.18 Glcd_Set_Font_Adv | p. 194 |
7.3.19 Glcd_Write_Char | p. 195 |
7.3.20 Glcd_Write_Char_Adv | p. 195 |
7.3.21 Glcd_Write_Text | p. 195 |
7.3.22 Glcd_Write_Text_Adv | p. 195 |
7.3.23 Glcd_Write_Const_Text_Adv | p. 196 |
7.3.24 Glcd_Image | p. 196 |
7.4 Example GLCD Display | p. 196 |
7.5 mikroC Pro for PIC Bitmap Editor | p. 198 |
7.6 Adding Touch - screen to GLCDs | p. 199 |
7.6.1 Types of Touch - screen Displays | p. 200 |
7.6.2 Resistive Touch Screens | p. 200 |
7.7 Summary | p. 203 |
Exercises | p. 204 |
8 Microcontroller Program Development | p. 205 |
8.1 Using the Program Description Language and Flowcharts | p. 205 |
8.1.1 BEGIN - END | p. 206 |
8.1.2 Sequencing | p. 206 |
8.1.3 IF - THEN - ELSE - ENDIF | p. 206 |
8.1.4 DO - ENDDO | p. 207 |
8.1.5 REPEAT - UNTIL | p. 209 |
8.1.6 Calling Subprograms | p. 209 |
8.1.7 Subprogram Structure | p. 209 |
8.2 Examples | p. 211 |
8.3 Representing for Loops in Flowcharts | p. 216 |
8.4 Summary | p. 218 |
Exercises | p. 218 |
9 LED Based Projects | p. 219 |
9.1 PROJECT 9.1 - Flashing LED | p. 219 |
9.2 PROJECT 9.2 - Binary Counting Up LEDs | p. 226 |
9.3 PROJECT 9.3 - Rotating LEDs | p. 229 |
9.4 PROJECT 9.4 - Wheel of Lucky Day | p. 231 |
9.5 PROJECT 9.5 - Random Hashing LEDs | p. 239 |
9.6 PROJECT 9.6 - LED Dice | p. 240 |
9.7 PROJECT 9.7 - Connecting more than one LED to a Port Pin | p. 246 |
9.8 PROJECT 9.8 - Changing the Brightness of LEDs | p. 250 |
9.9 PROJECT 9.9 - LED Candle | p. 264 |
9.10 Summary | p. 267 |
Exercises | p. 267 |
10 7 - Segment LED Display Based Projects | p. 269 |
10.1 PROJECT 10.1 - Single Digit Up Counting 7 - Segment LED Display | p. 269 |
10.2 PROJECT 10.2 - Display a Number on 2 - Digit 7 - Segment LED Display | p. 271 |
10.3 PROJECT 10.3 - Display Lottery Numbers on 2 - Digit 7 - Segment LED Display | p. 278 |
10.4 PROJECT 10.4 - Event Counter Using 4 - Digit 7 - Segment LED Display | p. 285 |
10.5 PROJECT 10.5 - External Interrupt Based Event Counter Using 4 - Digit 7 - Segment LED Display with Serial Driver | p. 292 |
10.6 Summary | p. 302 |
Exercises | p. 303 |
11 Text Based LCD Projects | p. 305 |
11.1 PROJECT 11.1 - DisplayingText on LCD | p. 305 |
11.2 PROJECT 11.2 - Moving Text on LCD | p. 307 |
11.3 PROJECT 11.3 - Counting with the LCD | p. 310 |
11.4 PROJECT 11.4 - Creating Custom Fonts on the LCD | p. 315 |
11.5 PROJECT 11.5 - LCD Dice | p. 317 |
11.6 PROJECT 11.6 - Digital Voltmeter | p. 325 |