Details

Using LEDs, LCDs and GLCDs in Microcontroller Projects


Using LEDs, LCDs and GLCDs in Microcontroller Projects


1. Aufl.

von: Dogan Ibrahim

81,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 22.08.2012
ISBN/EAN: 9781118361047
Sprache: englisch
Anzahl Seiten: 496

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<p>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.</p> <p>Key features:</p> <ul> <li>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)</li> <li>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</li> <li>Includes the highly popular PIC series of microcontrollers using the medium range PIC18 family of microcontrollers in the book.</li> <li>Provides a detailed explanation of Visual GLCD and Visual TFT with examples.</li> <li>Companion website hosting program listings and data sheets</li> <li>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 exercises</li> </ul> <p><i>Using LEDs, LCDS, and GLCDs in Microcontroller Projects </i>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.</p>
<p>Preface xiii</p> <p>Acknowledgements xv</p> <p><b>1 Introduction to Microcontrollers and Display Systems 1</b></p> <p>1.1 Microcontrollers and Microprocessors 2</p> <p>1.2 Evolution of the Microcontroller 3</p> <p>1.3 Parts of a Microcontroller 4</p> <p>1.3.1 Address 4</p> <p>1.3.2 ALU 5</p> <p>1.3.3 Analogue Comparator 5</p> <p>1.3.4 Analogue-to-Digital Converter 5</p> <p>1.3.5 Brown-out Detector 5</p> <p>1.3.6 Bus 5</p> <p>1.3.7 CAN 6</p> <p>1.3.8 CISC 6</p> <p>1.3.9 Clock 6</p> <p>1.3.10 CPU 6</p> <p>1.3.11 EEPROM 6</p> <p>1.3.12 EPROM 6</p> <p>1.3.13 Ethernet 7</p> <p>1.3.14 Flash Memory 7</p> <p>1.3.15 Harvard Architecture 7</p> <p>1.3.16 Idle Mode 7</p> <p>1.3.17 Interrupts 7</p> <p>1.3.18 LCD Drivers 8</p> <p>1.3.19 Pipelining 8</p> <p>1.3.20 Power-on Reset 8</p> <p>1.3.21 PROM 8</p> <p>1.3.22 RAM 8</p> <p>1.3.23 Real-time Clock 8</p> <p>1.3.24 Register 9</p> <p>1.3.25 Reset 9</p> <p>1.3.26 RISC 9</p> <p>1.3.27 ROM 9</p> <p>1.3.28 Serial Input-Output 9</p> <p>1.3.29 Sleep Mode 9</p> <p>1.3.30 Supply Voltage 10</p> <p>1.3.31 Timers 10</p> <p>1.3.32 USB 10</p> <p>1.3.33 Watchdog 10</p> <p>1.4 Display Devices 10</p> <p>1.4.1 LED 10</p> <p>1.4.2 7-Segment LED 11</p> <p>1.4.3 OLED 12</p> <p>1.4.4 LCD 12</p> <p>1.5 Summary 15</p> <p>Exercises 15</p> <p><b>2 PIC18F Microcontrollers 17</b></p> <p>2.1 The PIC18F2410 Microcontroller 18</p> <p>2.2 PIC18F2410 Architecture 19</p> <p>2.2.1 The Program Memory 21</p> <p>2.2.2 The Data Memory 21</p> <p>2.2.3 Power Supply Requirements 22</p> <p>2.2.4 Oscillator Configurations 24</p> <p>2.2.5 The Reset 30</p> <p>2.2.6 Parallel I/O Ports 31</p> <p>2.2.7 Timer Modules 38</p> <p>2.2.8 Analogue-to-Digital Converter Module 43</p> <p>2.2.9 Special Features of the CPU 48</p> <p>2.2.10 Interrupts 49</p> <p>2.2.11 Pulse Width Modulator Module 53</p> <p>2.3 Summary 56</p> <p>Exercises 56</p> <p><b>3 C Programming Language 59</b></p> <p>3.1 C Languages for Microcontrollers 59</p> <p>3.2 Your First mikroC Pro for PIC Program 61</p> <p>3.2.1 Comments 61</p> <p>3.2.2 Beginning and Ending a Program 62</p> <p>3.2.3 White Spaces 63</p> <p>3.2.4 Variable Names 63</p> <p>3.2.5 Reserved Names 64</p> <p>3.2.6 Variable Types 64</p> <p>3.2.7 Constants 66</p> <p>3.2.8 Escape Sequences 68</p> <p>3.2.9 Volatile Variables 69</p> <p>3.2.10 Accessing Bits of a Variable 69</p> <p>3.2.11 sbit Type 70</p> <p>3.2.12 bit Type 70</p> <p>3.2.13 Arrays 70</p> <p>3.2.14 Pointers 73</p> <p>3.2.15 Structures 76</p> <p>3.2.16 Unions 80</p> <p>3.2.17 Operators in mikroC Pro for PIC 80</p> <p>3.2.18 The Flow of Control 90</p> <p>3.3 Functions in mikroC Pro for PIC 101</p> <p>3.3.1 Function Prototypes 102</p> <p>3.3.2 void Functions 103</p> <p>3.3.3 Passing Parameters to Functions 104</p> <p>3.3.4 Passing Arrays to Functions 106</p> <p>3.3.5 Interrupt Processing 106</p> <p>3.4 mikroC Pro for PIC Built-in Functions 108</p> <p>3.5 mikroC Pro for PIC Libraries 109</p> <p>3.5.1 ANSI C Library 109</p> <p>3.5.2 Miscellaneous Library 111</p> <p>3.6 Using the mikroC Pro for PIC Compiler 111</p> <p>3.6.1 mikroC Pro for PIC IDE 112</p> <p>3.6.2 Creating a New Source File 118</p> <p>3.6.3 Compiling the Source File 122</p> <p>3.7 Using the mikroC Pro for PIC Simulator 123</p> <p>3.7.1 Setting a Break-Point 124</p> <p>3.8 Other mikroC Pro for PIC Features 126</p> <p>3.8.1 View Statistics 126</p> <p>3.8.2 View Assembly 127</p> <p>3.8.3 ASCII Chart 127</p> <p>3.8.4 USART Terminal 127</p> <p>3.8.5 Seven Segment Editor 127</p> <p>3.8.6 Help 128</p> <p>3.9 Summary 128</p> <p>Exercises 129</p> <p><b>4 PIC Microcontroller Development Tools – Including Display Development Tools 131</b></p> <p>4.1 PIC Hardware Development Boards 132</p> <p>4.1.1 Super Bundle Development Kit 132</p> <p>4.1.2 PIC18 Explorer Board 132</p> <p>4.1.3 PIC18F4XK20 Starter Kit 134</p> <p>4.1.4 PICDEM 4 135</p> <p>4.1.5 PIC16F887 Development Kit 135</p> <p>4.1.6 FUTURLEC PIC18F4550 Development Board 137</p> <p>4.1.7 EasyPIC6 Development Board 137</p> <p>4.1.8 EasyPIC7 Development Board 139</p> <p>4.2 PIC Microcontroller Display Development Tools 140</p> <p>4.2.1 Display Hardware Tools 140</p> <p>4.2.2 Display Software Tools 143</p> <p>4.3 Using the In-Circuit Debugger with the EasyPIC7 Development Board 145</p> <p>4.4 Summary 149</p> <p>Exercises 149</p> <p><b>5 Light Emitting Diodes (LEDs) 151</b></p> <p>5.1 ATypical LED 151</p> <p>5.2 LED Colours 153</p> <p>5.3 LED Sizes 154</p> <p>5.4 Bi-Colour LEDs 154</p> <p>5.5 Tri-Colour LEDs 155</p> <p>5.6 Flashing LEDs 155</p> <p>5.7 Other LED Shapes 155</p> <p>5.8 7-Segment LEDs 156</p> <p>5.8.1 Displaying Numbers 157</p> <p>5.8.2 Multi-digit 7-Segment Displays 159</p> <p>5.9 Alphanumeric LEDs 159</p> <p>5.10 mikroC Pro for PIC 7-Segment LED Editor 163</p> <p>5.11 Summary 163</p> <p>Exercises 164</p> <p><b>6 Liquid Crystal Displays (LCDs) and mikroC Pro for PIC LCD Functions 165</b></p> <p>6.1 HD44780 Controller 165</p> <p>6.2 Displaying User Defined Data 168</p> <p>6.3 DDRAM Addresses 169</p> <p>6.4 Display Timing and Control 171</p> <p>6.4.1 Clear Display 172</p> <p>6.4.2 Return Cursor to Home 172</p> <p>6.4.3 Cursor Move Direction 172</p> <p>6.4.4 Display ON/OFF 172</p> <p>6.4.5 Cursor and Display Shift 173</p> <p>6.4.6 Function Set 173</p> <p>6.4.7 Set CGRAM Address 173</p> <p>6.4.8 Set DDRAM Address 173</p> <p>6.4.9 Read Busy Flag 174</p> <p>6.4.10 Write Data to CGRAM or DDRAM 174</p> <p>6.4.11 Read Data from CGRAM or DDRAM 174</p> <p>6.5 LCD Initialisation 174</p> <p>6.5.1 8-bit Mode Initialisation 175</p> <p>6.5.2 4-bit Mode Initialisation 175</p> <p>6.6 Example LCD Display Setup Program 177</p> <p>6.7 mikroC Pro for PIC LCD Functions 180</p> <p>6.7.1 Lcd_Init 180</p> <p>6.7.2 Lcd_Out 181</p> <p>6.7.3 Lcd_Out_Cp 181</p> <p>6.7.4 Lcd_Chr 181</p> <p>6.7.5 Lcd_Chr_Cp 181</p> <p>6.7.6 Lcd_Cmd 182</p> <p>6.8 Summary 182</p> <p>Exercises 183</p> <p><b>7 Graphics LCD Displays (GLCD) 185</b></p> <p>7.1 The 128 x 64 Pixel GLCD 185</p> <p>7.2 Operation of the GLCD Display 187</p> <p>7.3 mikroC Pro for PIC GLCD Library Functions 189</p> <p>7.3.1 Glcd_Init 189</p> <p>7.3.2 Glcd_Set_Side 190</p> <p>7.3.3 Glcd_Set_X 190</p> <p>7.3.4 Glcd_Set_Page 190</p> <p>7.3.5 Glcd_Write_Data 190</p> <p>7.3.6 Glcd_Fill 190</p> <p>7.3.7 Glcd_Dot 191</p> <p>7.3.8 Glcd_Line 191</p> <p>7.3.9 Glcd_V_Line 191</p> <p>7.3.10 Glcd_H_Line 191</p> <p>7.3.11 Glcd_Rectangle 192</p> <p>7.3.12 Glcd_Rectangle_Round_Edges 192</p> <p>7.3.13 Glcd_Rectangle_Round_Edges_Fill 192</p> <p>7.3.14 Glcd_Box 193</p> <p>7.3.15 Glcd_Circle 193</p> <p>7.3.16 Glcd_Circle_Fill 194</p> <p>7.3.17 Glcd_Set_Font 194</p> <p>7.3.18 Glcd_Set_Font_Adv 194</p> <p>7.3.19 Glcd_Write_Char 195</p> <p>7.3.20 Glcd_Write_Char_Adv 195</p> <p>7.3.21 Glcd_Write_Text 195</p> <p>7.3.22 Glcd_Write_Text_Adv 195</p> <p>7.3.23 Glcd_Write_Const_Text_Adv 196</p> <p>7.3.24 Glcd_Image 196</p> <p>7.4 Example GLCD Display 196</p> <p>7.5 mikroC Pro for PIC Bitmap Editor 198</p> <p>7.6 Adding Touch-screen to GLCDs 199</p> <p>7.6.1 Types of Touch-screen Displays 200</p> <p>7.6.2 Resistive Touch Screens 200</p> <p>7.7 Summary 203</p> <p>Exercises 204</p> <p><b>8 Microcontroller Program Development 205</b></p> <p>8.1 Using the Program Description Language and Flowcharts 205</p> <p>8.1.1 BEGIN – END 206</p> <p>8.1.2 Sequencing 206</p> <p>8.1.3 IF – THEN – ELSE – ENDIF 206</p> <p>8.1.4 DO – ENDDO 207</p> <p>8.1.5 REPEAT – UNTIL 209</p> <p>8.1.6 Calling Subprograms 209</p> <p>8.1.7 Subprogram Structure 209</p> <p>8.2 Examples 211</p> <p>8.3 Representing for Loops in Flowcharts 216</p> <p>8.4 Summary 218</p> <p>Exercises 218</p> <p><b>9 LED Based Projects 219</b></p> <p>9.1 PROJECT 9.1 – Flashing LED 219</p> <p>9.2 PROJECT 9.2 – Binary Counting Up LEDs 226</p> <p>9.3 PROJECT 9.3 – Rotating LEDs 229</p> <p>9.4 PROJECT 9.4 – Wheel of Lucky Day 231</p> <p>9.5 PROJECT 9.5 – Random Flashing LEDs 239</p> <p>9.6 PROJECT 9.6 – LED Dice 240</p> <p>9.7 PROJECT 9.7 – Connecting more than one LED to a Port Pin 246</p> <p>9.8 PROJECT 9.8 – Changing the Brightness of LEDs 250</p> <p>9.9 PROJECT 9.9 – LED Candle 264</p> <p>9.10 Summary 267</p> <p>Exercises 267</p> <p><b>10 7-Segment LED Display Based Projects 269</b></p> <p>10.1 PROJECT 10.1 – Single Digit Up Counting 7-Segment LED Display 269</p> <p>10.2 PROJECT 10.2 – Display a Number on 2-Digit 7-Segment LED Display 271</p> <p>10.3 PROJECT 10.3 – Display Lottery Numbers on 2-Digit 7-Segment LED Display 278</p> <p>10.4 PROJECT 10.4 – Event Counter Using 4-Digit 7-Segment LED Display 285</p> <p>10.5 PROJECT 10.5 – External Interrupt Based Event Counter Using 4-Digit 7-Segment LED Display with Serial Driver 292</p> <p>10.6 Summary 302</p> <p>Exercises 303</p> <p><b>11 Text Based LCD Projects 305</b></p> <p>11.1 PROJECT 11.1 – Displaying Text on LCD 305</p> <p>11.2 PROJECT 11.2 – Moving Text on LCD 307</p> <p>11.3 PROJECT 11.3 – Counting with the LCD 310</p> <p>11.4 PROJECT 11.4 – Creating Custom Fonts on the LCD 315</p> <p>11.5 PROJECT 11.5 – LCD Dice 317</p> <p>11.6 PROJECT 11.6 – Digital Voltmeter 325</p> <p>11.7 PROJECT 11.7 – Temperature and Pressure Display 327</p> <p>11.8 PROJECT 11.8 – The High/Low Game 333</p> <p>11.9 Summary 344</p> <p>Exercises 345</p> <p><b>12 Graphics LCD Projects 347</b></p> <p>12.1 PROJECT 12.1 – Creating and Displaying a Bitmap Image 347</p> <p>12.2 PROJECT 12.2 – Moving Ball Animation 355</p> <p>12.3 PROJECT 12.3 – GLCD Dice 357</p> <p>12.4 PROJECT 12.4 – GLCD X-Y Plotting 372</p> <p>12.5 PROJECT 12.5 – Plotting Temperature Variation on the GLCD 374</p> <p>12.6 PROJECT 12.6 – Temperature and Relative Humidity Measurement 385</p> <p>12.7 Operation of the SHT11 386</p> <p>12.8 Acknowledgement 389</p> <p>12.9 Summary 400</p> <p>Exercises 400</p> <p><b>13 Touch Screen Graphics LCD Projects 401</b></p> <p>13.1 PROJECT 13.1 – Touch Screen LED ON-OFF 401</p> <p>13.2 PROJECT 13.2 – LED Flashing with Variable Rate 410</p> <p>13.3 Summary 418</p> <p>Exercises 418</p> <p><b>14 Using the Visual GLCD Software in GLCD Projects 419</b></p> <p>14.1 PROJECT 14.1 – Toggle LED 420</p> <p>14.2 PROJECT 14.2 – Toggle more than One LED 425</p> <p>14.3 PROJECT 14.3 – Mini Electronic Organ 426</p> <p>14.4 PROJECT 14.4 – Using the SmartGLCD 430</p> <p>14.5 PROJECT 14.5 – Decimal to Hexadecimal Converter using the SmartGLCD 444</p> <p>14.6 Summary 452</p> <p>Exercises 452</p> <p><b>15 Using the Visual TFT Software in Graphics Projects 453</b></p> <p>15.1 PROJECT 15.1 – Countdown Timer 454</p> <p>15.2 PROJECT 15.2 – Electronic Book 462</p> <p>15.3 PROJECT 15.3 – Picture Show 467</p> <p>15.4 Summary 472</p> <p>Exercises 472</p> <p>Bibliography 473</p> <p>Index 475</p>
<p><strong>Dogan Ibrahim, Department of Computer Engineering, Near East University,Cyprus</strong><br />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.
<p>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.</p> <p> Key features:</p> <ul> <li>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)</li> <li>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</li> <li>Includes the highly popular PIC series of microcontrollers using the medium range PIC18 family of microcontrollers in the book.</li> <li>Provides a detailed explanation of Visual GLCD and Visual TFT with examples.</li> <li>Companion website hosting program listings and data sheets</li> <li>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 exercises</li> </ul> <p> <i>Using LEDs, LCDS, and GLCDs in Microcontroller Projects</i> 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.</p>

Diese Produkte könnten Sie auch interessieren:

Foundations of Electromagnetic Compatibility
Foundations of Electromagnetic Compatibility
von: Bogdan Adamczyk
PDF ebook
117,99 €
Human Bond Communication
Human Bond Communication
von: Sudhir Dixit, Ramjee Prasad
EPUB ebook
105,99 €
Computer Vision in Vehicle Technology
Computer Vision in Vehicle Technology
von: Antonio M. López, Atsushi Imiya, Tomas Pajdla, Jose M. Álvarez
PDF ebook
81,99 €