Details

Microcontroller Theory and Applications with the PIC18F


Microcontroller Theory and Applications with the PIC18F


2. Aufl.

von: M. Rafiquzzaman

108,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 28.12.2017
ISBN/EAN: 9781119448433
Sprache: englisch
Anzahl Seiten: 528

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

Beschreibungen

<p><b>A thorough revision that provides a clear understanding of the basic principles of microcontrollers using C programming and PIC18F assembly language</b></p> <p>This book presents the fundamental concepts of assembly language programming and interfacing techniques associated with typical microcontrollers. As part of the second edition's revisions, PIC18F assembly language and C programming are provided in separate sections so that these topics can be covered independent of each other if desired. This extensively updated edition includes a number of fundamental topics. Characteristics and principles common to typical microcontrollers are emphasized. Interfacing techniques associated with a basic microcontroller such as the PIC18F are demonstrated from chip level via examples using the simplest possible devices, such as switches, LEDs, Seven-Segment displays, and the hexadecimal keyboard. In addition, interfacing the PIC18F with other  devices such as LCD displays, ADC, and DAC is also included. Furthermore, topics such as CCP (Capture, Compare, PWM) and Serial I/O using C along with simple examples are also provided.  </p> <p><i>Microcontroller Theory and Applications with the PIC18F, 2<sup>nd</sup> Edition</i> is a comprehensive and self-contained book that emphasizes characteristics and principles common to typical microcontrollers. In addition, the text:</p> <ul> <li>Includes increased coverage of C language programming with the PIC18F I/O and interfacing techniques</li> <li>Provides a more detailed explanation of PIC18F timers, PWM, and Serial I/O using C</li> <li>Illustrates C interfacing techniques through the use of numerous examples, most of which have been implemented successfully in the laboratory</li> </ul> <p>This new edition of <i>Microcontroller Theory and Applications with the PIC18F</i> is excellent as a text for undergraduate level students of electrical/computer engineering and computer science. </p>
<p>Preface xiii</p> <p>Credits xvii</p> <p><b>1. Introduction to Microcontrollers 1</b></p> <p>1.1 Explanation of Terms 3</p> <p>1.2 Microcontroller Data Types 7</p> <p>1.2.1 Unsigned and Signed Binary Numbers 7</p> <p>1.2.2 ASCII and EBCDIC Codes 10</p> <p>1.2.3 Unpacked and Packed Binary-Coded-Decimal Numbers 10</p> <p>1.3 Evolution of the Microcontroller 11</p> <p>1.4 Embedded Controllers 14</p> <p><b>2. Microcontroller Basics 17</b></p> <p>2.1 Basic Blocks of a Microcomputer 17</p> <p>2.1.1 System Bus 18</p> <p>2.1.2 Clock Signals 19</p> <p>2.2 Microcontroller architectures 20</p> <p>2.3 Central Processing Unit (CPU) 21</p> <p>2.3.1 Register Section 21</p> <p>2.3.2 Control Unit 29</p> <p>2.3.3 Arithmetic and Logic Unit (ALU) 30</p> <p>2.3.4 Simplified Explanation of Control Unit design 30</p> <p>2.4 Basic concept of pipelining 31</p> <p>2.5 RISC vs. CISC 33</p> <p>2.6 Functional Representation of a Typical Microcontroller---- The PIC18F4321 34</p> <p>Questions and Problems 36</p> <p><b>3. Microcontroller Memory and Input/Output (I/O) 37</b></p> <p>3.1 Introduction to Microcontroller Memory 37</p> <p>3.1.1 Main memory 38</p> <p>3.1.2 READ and WRITE Timing Diagrams 40</p> <p>3.1.3 Main Memory Organization 42</p> <p>3.2 Microcontroller Input/Output (I/O) 45</p> <p>3.2.1 Overview of digital output circuits 47</p> <p>3.2.2 Simple I/O Devices 49</p> <p>3.2.3 Programmed I/O 50</p> <p>3.2.4 Unconditional and Conditional Programmed I/O 52</p> <p>3.2.5 Interrupt I/O 53</p> <p>Questions and Problems 56</p> <p><b>4. Programming Languages 59</b></p> <p>4.1 Computer Programming Languages 59</p> <p>4.2 Machine Language 60</p> <p>4.3 Assembly Language 60</p> <p>4.3.1 Types of Assemblers 61</p> <p>4.3.2 Assembler Delimiters 62</p> <p>4.3.3 Specifying Numbers by Typical Assemblers 63</p> <p>4.3.4 Assembler Directives or Pseudoinstructions 63</p> <p>4.3.5 Assembly Language Instruction Formats 65</p> <p>4.3.6 Typical Instruction Set 67</p> <p>4.3.7 Typical Addressing Modes 73</p> <p>4.3.8 Subroutine Calls in Assembly Language 74</p> <p>4.4 High-Level Language 74</p> <p>4.5 Introduction to C Language 76</p> <p>4.5.1 Data types 78</p> <p>4.5.2 Bit manipulation operators 79</p> <p>4.5.3 Control structures 81</p> <p>4.5.4 The if-else construct 81</p> <p>4.5.5 The switch construct 82</p> <p>4.5.6 The while construct 83</p> <p>4.5.7 The for construct 84</p> <p>4.5.8 The do-while construct 85</p> <p>4.5.9 Structures, and Unions 85</p> <p>4.5.10 Functions in C 86</p> <p>4.5.11 Arrays 88</p> <p>4.5.12 Macros 88</p> <p>4.6 Choosing a programming language 88</p> <p>4.7 Flowcharts 89</p> <p>Questions and Problems 90</p> <p><b>5. PIC18F Architecture and Addressing Modes 93</b></p> <p>5.1 Basic features of the PIC18F family 93</p> <p>5.2 PIC18F Register Architecture 96</p> <p>5.3 PIC18F Memory Organization 100</p> <p>5.3.1 PIC18F Program Memory 101</p> <p>5.3.2 PIC18F Data Memory 101</p> <p>5.4 PIC18F Addressing Modes 104</p> <p>5.4.1 Literal or Immediate Addressing Mode 104</p> <p>5.4.2 Inherent or Implied Addressing Mode 104</p> <p>5.4.3 Direct or Absolute Addressing Mode 104</p> <p>5.4.4 Indirect Addressing Mode 105</p> <p>5.4.5 Relative Addressing Mode 110</p> <p>5.4.6 Bit Addressing Mode 112</p> <p>Questions and Problems 113</p> <p><b>6. Assembly Language Programming With the PIC18F: Part 1 115</b></p> <p>6.1 Introduction to the PIC18F MPLAB assembler 115</p> <p>6.2 PIC18F Instruction Format 120</p> <p>6.3 PIC18F Instruction Set 121</p> <p>6.3.1 Data Movement Instructions 124</p> <p>6.3.2 Arithmetic Instructions 130</p> <p>6.3.3 Logic Instructions 138</p> <p>6.3.4 Rotate Instructions 141</p> <p>6.3.5 Bit Manipulation Instructions 147</p> <p>Questions and Problems 151</p> <p><b>7. Assembly Language Programming With the PIC18F: Part 2 155</b></p> <p>7.1 PIC18F Jump/Branch instructions 155</p> <p>7.2 PIC18F Test, Compare, and Skip instructions 157</p> <p>7.3 PIC18F Table Read/Write instructions 163</p> <p>7.4 PIC18F Subroutine instructions 168</p> <p>7.5 PIC18F System Control instructions 170</p> <p>7.6 PIC18F Hardware vs. Software stack 171</p> <p>7.7 Multiplication and Division algorithms 178</p> <p>7.7.1 Signed Multiplication algorithm 178</p> <p>7.7.2 Unsigned Division algorithm 180</p> <p>7.7.3 Signed Division algorithm 182</p> <p>7.8 Advanced Programming Examples 184</p> <p>7.9 PIC18F Delay Routine 188</p> <p>Questions and Problems 191</p> <p><b>8. PIC18F Programmed I/O Using Assembly & C 195</b></p> <p>8.1 PIC18F Pins and Signals 195</p> <p>8.1.1 Clock 196</p> <p>8.1.2 PIC18F Reset 202</p> <p>8.1.3 High Voltage and Low Voltage Programming (HVP and LVP) 205</p> <p>8.1.4 “pragma config” and “config” directives 205</p> <p>8.1.5 A simplified setup for the PIC18F4321 206</p> <p>8.1.6 Downloading programs into the PIC18F4321 using the PICKit3 interface 206</p> <p>8.2 PIC18F4321 Programmed I/O 208</p> <p>8.2.1 I/O instructions in PIC18F assembly 211</p> <p>8.2.2 Configuring PIC18F4321 I/O ports using PIC18F assembly 211</p> <p>8.2.3 Configuring PIC18F4321 I/O ports using C 213</p> <p>8.2.4 Interfacing LED’s (Light Emitting Diodes) and Seven-segment displays 215</p> <p>8.2.5 Programmed I/O examples using PIC18F assembly 216</p> <p>8.2.6 Programmed I/O examples using C Language 220</p> <p>Questions and Problems 228</p> <p><b>9. PIC18F Interrupt I/O, LCD, and Keyboard Interfacing 231</b></p> <p>9.1 Basics of Polled I/O vs. Interrupt I/O 231</p> <p>9.2 PIC18F Interrupts 236</p> <p>9.2.1 Interrupt Procedure 236</p> <p>9.2.2 PIC18F Interrupt Types 238</p> <p>9.2.3 Programming the PIC18F External Interrupts 238</p> <p>9.2.4 Programming PIC18F external interrupts using assembly 243</p> <p>9.2.5 Programming PIC18F external interrupts using C 243</p> <p>9.2.6 Accessing PIC18F on-chip peripheral devices using Polled I/O vs. Interrupt I/O 252</p> <p>9.3 PIC18F Interface to a typical LCD (Liquid Crystal Display) 252</p> <p>9.4 Interfacing PIC18F4321 to a hexadecimal keyboard and a seven-segment display 259</p> <p>9.4.1 Basics of Keyboard and Display Interface to a Microcontroller 259</p> <p>9.4.2 PIC18F4321 Interface to a Hexadecimal Keyboard and a Seven-Segment Display 261</p> <p>Questions and Problems 270</p> <p><b>10. PIC18F Timers and Analog Interface 273</b></p> <p>10.1 PIC18F Timers 273</p> <p>10.1.1 Timer0 275</p> <p>10.1.2 Timer1 283</p> <p>10.1.3 Timer2 289</p> <p>10.1.4 Timer3 293</p> <p>10.2 Analog Interface 301</p> <p>10.2.1 PIC18F on-chip ADC (A/D Converter) 302</p> <p>10.2.2 Interfacing an external D/A (Digital to Analog) Converter using C 315</p> <p>Questions and Problems 317</p> <p><b>11. PIC18F CCP and Serial I/O 321</b></p> <p>11.1 PIC18F CCP (Capture/Compare/PWM (Pulse Width Modulation) Module 321</p> <p>11.1.1 CCP Registers 322</p> <p>11.1.2 CCP modules and associated timers 322</p> <p>11.1.3 PIC18F4321 Capture mode 322</p> <p>11.1.4 PIC18F4321 Compare mode 326</p> <p>11.1.5 PIC18F4321 PWM (Pulse Width Modulation) mode 329</p> <p>11.2 DC Motor Control 332</p> <p>11.3 Serial Interface 336</p> <p>11.3.1 Synchronous Serial Data Transmission 336</p> <p>11.3.2 Asynchronous Serial Data Transmission 337</p> <p>11.3.3 Basics of SPI and I<sup>2</sup>C 337</p> <p>11.4 PIC18F Serial I/O 338</p> <p>11.4.1 PIC18F SPI mode 338</p> <p>11.4.2 PIC18F I<sup>2</sup>C (Inter-Integrated Circuit) mode 348</p> <p>Questions and Problems 359</p> <p><b>Appendix A: Answers to Selected Problems 363</b></p> <p><b>Appendix B: Glossary 371</b></p> <p><b>Appendix C: PIC18F Instruction Set (Alphabetical Order) 383</b></p> <p><b>Appendix D: PIC18F Instruction Set — Details 389</b></p> <p><b>Appendix E: PIC18F4321 Special Function Registers 433</b></p> <p><b>Appendix F: Tutorial for Assembling and Debugging a PIC18F Assembly Language Program Using the MPLAB</b></p> <p><b>Appendix G: Tutorial for Compiling and Debugging a C-Program Using the MPLAB 465</b></p> <p><b>Appendix H: Interfacing the PIC18F4321 to a Personal Computer or A Laptop Using PICKIT™ 3 493</b></p> <p>H.1 Initial Hardware Setup for the PIC18F4321 493</p> <p>H.2 Connecting The Personal Computer (PC) or The Laptop to the PIC18F4321 via PICkit3 494</p> <p>H.3 Programming The PIC18F4321 from a Personal Computer or a Laptop Using the PICkit3 495</p> <p>Bibliography 499</p> <p>Index 501</p>
<p><b>M. RAFIQUZZAMAN, PhD, PE,</b> is Professor of Electrical and Computer Engineering at California State Polytechnic University, Pomona. Dr. Rafiquzzaman has over 40 years of academic and industrial experiences. He is the founder and President of Rafi Systems, Inc., a manufacturer of biomedical devices (Intraocular lenses) in California. Dr. Rafiquzzaman authored several books on digital logic, microcontrollers, and microprocessors. His first book on microprocessors was published by Wiley in 1982.
<p><b>A Thorough Revision that Provides a Clear Understanding of the Basic Principles of Microcontrollers Using C Programming and PIC18F Assembly Language</b> <p>This book presents the fundamental concepts of assembly language programming and interfacing techniques associated with typical microcontrollers. As part of the second edition's revisions, PIC18F assembly language and C programming are provided in separate sections so that these topics can be covered independent of each other if desired. This extensively updated edition includes a number of fundamental topics. Characteristics and principles common to typical microcontrollers are emphasized. Interfacing techniques associated with a basic microcontroller such as the PIC18F are demonstrated from chip level via examples using the simplest possible devices, such as switches, LEDs, Seven-Segment displays, and the hexadecimal keyboard. In addition, interfacing the PIC18F with other devices such as LCD displays, ADC, and DAC is also included. Furthermore, topics such as CCP (Capture, Compare, PWM) and Serial I/O using C along with simple examples are also provided. <p><i>Microcontroller Theory and Applications with the PIC18F, 2nd Edition</i> is a comprehensive and self-contained book that emphasizes characteristics and principles common to typical microcontrollers. In addition, the text: <ul> <li>Includes increased coverage of C language programming with the PIC18F I/O and interfacing techniques</li> <li>Provides a more detailed explanation of PIC18F timers, PWM, and Serial I/O using C</li> <li>Illustrates C interfacing techniques through the use of numerous examples, most of which have been implemented successfully in the laboratory</li> </ul> <p>This new edition of <i>Microcontroller Theory and Applications with the PIC18F</i> is excellent as a text for undergraduate level students of electrical/computer engineering and computer science.

Diese Produkte könnten Sie auch interessieren:

Strategies to the Prediction, Mitigation and Management of Product Obsolescence
Strategies to the Prediction, Mitigation and Management of Product Obsolescence
von: Bjoern Bartels, Ulrich Ermel, Peter Sandborn, Michael G. Pecht
PDF ebook
116,99 €