ebook img

Fast and Effective Embedded Systems Design, Second Edition: Applying the ARM mbed PDF

512 Pages·2017·11.58 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Fast and Effective Embedded Systems Design, Second Edition: Applying the ARM mbed

Fast and Effective Embedded Systems Design Please visit the Companion Website to Fast and Effective Embedded Systems Design www.embedded-knowhow.co.uk Elsevier book site The companion website contains instructor support, program examples, errata, updates on parts and answers to frequently asked questions. Fast and Effective Embedded Systems Design Applying the ARM mbed Second Edition Rob Toulson Tim Wilmshurst Amsterdam • Boston • Heidelberg • London • New York • Oxford • Paris San Diego • San Francisco • Singapore • Sydney • Tokyo Newnes is an imprint of Elsevier Newnes is an imprint of Elsevier The Boulevard, Langford Lane, Kidlington, Oxford OX5 1GB, United Kingdom 50 Hampshire Street, 5th Floor, Cambridge, MA 02139, United States Copyright © 2017 RT Sixty Ltd. and Tim Wilmshurst. Published by Elsevier Ltd. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about the Publisher’s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions. This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein). Notices Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods, professional practices, or medical treatment may become necessary. Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information, methods, compounds, or experiments described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility. To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein. Library of Congress Cataloging-in-Publication Data A catalog record for this book is available from the Library of Congress British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library ISBN: 978-0-08-100880-5 For information on all Newnes publications visit our website at https://www.elsevier.com/ Publisher: Jonathan Simpson Acquisition Editor: Tim Pitts Editorial Project Manager: Charlie Kent Production Project Manager: Susan Li Designer: Mark Rogers Typeset by TNQ Books and Journals Contents Introduction ..................................................................................................... xv PART I: Essentials of Embedded Systems, Using the mbed Chapter 1: Embedded Systems, Microcontrollers, and ARM................................... 3 1.1 Introducing Embedded Systems ............................................................................ 3 1.1.1 What Is an Embedded System?......................................................................... 3 1.1.2 An Example Embedded System........................................................................ 5 1.1.3 A Second Example System: A Word on Control Systems and the Segway ... 6 1.2 Microprocessors and Microcontrollers.................................................................. 8 1.2.1 Some Computer Essentials ................................................................................ 8 1.2.2 The Microcontroller......................................................................................... 10 1.3 Development Processes for Embedded Systems................................................. 11 1.3.1 Programming LanguagesdWhat’s So Special About C/Cþþ? .................... 11 1.3.2 The Development Cycle .................................................................................. 12 1.4 The World of ARM ............................................................................................. 13 1.4.1 A Little History................................................................................................ 13 1.4.2 Some Technical DetaildWhat Does This RISC Word Mean?...................... 15 1.4.3 The Cortex Core .............................................................................................. 16 Chapter Review .......................................................................................................... 17 Quiz............................................................................................................................. 17 References................................................................................................................... 18 Chapter 2: Introducing the mbed....................................................................... 19 2.1 Introducing the mbed........................................................................................... 19 2.1.1 mbed and mbed-Enabled ................................................................................. 19 2.1.2 The mbed LPC1768......................................................................................... 20 2.1.3 The mbed LPC1768 Architecture ................................................................... 21 2.1.4 The LPC1768 Microcontroller ........................................................................ 23 2.2 Getting Started With the mbed: A Tutorial......................................................... 25 Step 1. Connecting the mbed to the PC................................................................... 25 Step 2. Creating an mbed Account........................................................................... 25 Step 3. Running a Program....................................................................................... 26 Step 4. Compiling the Program ................................................................................ 28 v Step 5. Downloading the Program Binary Code...................................................... 29 Step 6. Modifying the Program Code ...................................................................... 29 2.3 The Development Environment........................................................................... 29 2.3.1 The mbed Software Development Kit and API.............................................. 29 2.3.2 Using C/Cþþ................................................................................................... 30 2.3.3 The mbed Application Board .......................................................................... 30 Chapter Review .......................................................................................................... 33 Quiz............................................................................................................................. 34 References................................................................................................................... 35 Chapter 3: Digital Input and Output................................................................. 37 3.1 Starting to Program.............................................................................................. 37 3.1.1 Thinking About the First Program.................................................................. 37 3.1.2 Using the mbed API ........................................................................................ 40 3.1.3 Exploring the while Loop................................................................................ 41 3.2 Voltages as Logic Values..................................................................................... 42 3.3 Digital Output on the mbed................................................................................. 44 3.3.1 Using Light Emitting Diodes .......................................................................... 44 3.3.2 Using mbed External Pins............................................................................... 46 3.4 Using Digital Inputs............................................................................................. 47 3.4.1 Connecting Switches to a Digital System....................................................... 47 3.4.2 The DigitalIn API ............................................................................................ 48 3.4.3 Using if to Respond to a Switch Input ........................................................... 49 3.5 Digital Input and Output With the Application Board....................................... 51 3.6 Interfacing Simple Optodevices .......................................................................... 54 3.6.1 Optoreflective and Transmissive Sensors........................................................ 54 3.6.2 Connecting an Optosensor to the mbed.......................................................... 55 3.6.3 Seven-Segment Displays.................................................................................. 56 3.6.4 Connecting a Seven-Segment Display to the mbed ....................................... 58 3.7 Switching Larger DC Loads................................................................................ 61 3.7.1 Applying Transistor Switching........................................................................ 61 3.7.2 Switching a Motor With the mbed.................................................................. 63 3.7.3 Switching Multiple Seven-Segment Displays................................................. 64 3.8 Mini Project: Letter Counter ............................................................................... 65 Chapter Review .......................................................................................................... 65 Quiz............................................................................................................................. 65 References................................................................................................................... 67 Chapter 4: Analog Output................................................................................ 69 4.1 Introducing Data Conversion............................................................................... 69 4.1.1 The DAC .......................................................................................................... 69 4.2 Analog Outputs on the mbed............................................................................... 70 4.2.1 Creating Constant Output Voltages................................................................. 71 4.2.2 Saw Tooth Waveforms..................................................................................... 72 Contents vi 4.2.3 Testing the DAC Resolution............................................................................ 75 4.2.4 Generating a Sine Wave .................................................................................. 75 4.3 Another Form of Analog Output: Pulse Width Modulation .............................. 76 4.4 Pulse Width Modulation on the mbed ................................................................ 78 4.4.1 Using the mbed Pulse Width Modulation Sources......................................... 78 4.4.2 Some Trial Pulse Width Modulation Outputs................................................. 79 4.4.3 Speed Control of a Small Motor..................................................................... 80 4.4.4 Generating Pulse Width Modulation in Software........................................... 82 4.4.5 Servo Control ................................................................................................... 83 4.4.6 Producing Audio Output.................................................................................. 85 Chapter Review .......................................................................................................... 88 Quiz............................................................................................................................. 88 References................................................................................................................... 89 Chapter 5: Analog Input .................................................................................. 91 5.1 Analog-to-Digital Conversion (ADC) ................................................................. 91 5.1.1 The ADC.......................................................................................................... 91 5.1.2 Range, Resolution, and Quantization.............................................................. 92 5.1.3 Sampling Frequency ........................................................................................ 94 5.1.4 Analog Input With the mbed........................................................................... 95 5.2 Combining Analog Input and Output.................................................................. 96 5.2.1 Controlling LED Brightness by Variable Voltage .......................................... 96 5.2.2 Controlling LED Brightness by PWM............................................................ 98 5.2.3 Controlling PWM Frequency .......................................................................... 99 5.3 Processing Data From Analog Inputs ............................................................... 100 5.3.1 Displaying Values on the Computer Screen ................................................. 100 5.3.2 Scaling ADC Outputs to Recognized Units.................................................. 101 5.3.3 Applying Averaging to Reduce Noise........................................................... 102 5.4 Some Simple Analog Sensors ........................................................................... 103 5.4.1 The Light-Dependent Resistor....................................................................... 103 5.4.2 Integrated Circuit Temperature Sensor ......................................................... 104 5.5 Exploring Data Conversion Timing .................................................................. 105 5.5.1 Estimating Conversion Time and Applying Nyquist.................................... 105 5.6 Mini Projects...................................................................................................... 107 5.6.1 Two-Dimensional Light Tracking ................................................................. 107 5.6.2 Temperature Alarm ........................................................................................ 108 Chapter Review ........................................................................................................ 108 Quiz........................................................................................................................... 108 References................................................................................................................. 109 Chapter 6: Further Programming Techniques ................................................... 111 6.1 The Benefits of Considered Program Design and Structure ............................ 111 6.2 Functions ............................................................................................................ 111 6.3 Program Design.................................................................................................. 112 Contents vii 6.3.1 Using Flow Charts to Define Code Structure............................................... 112 6.3.2 Pseudocode..................................................................................................... 114 6.4 Working With Functions on the mbed.............................................................. 115 6.4.1 Implementing a Seven-Segment Display Counter........................................ 116 6.4.2 Function Reuse............................................................................................... 118 6.4.3 A More Complex Program Using Functions................................................ 119 6.5 Using Multiple Files in C/Cþþ........................................................................ 121 6.5.1 Summary of the C/Cþþ Program Compilation Process.............................. 122 6.5.2 Using #define, #include, #ifndef, and #endif Directives.............................. 122 6.5.3 Using mbed Objects Globally ....................................................................... 125 6.6 Modular Program Example................................................................................ 125 6.7 Working With Bespoke Libraries...................................................................... 129 Chapter Review ........................................................................................................ 133 Quiz........................................................................................................................... 134 References................................................................................................................. 134 Chapter 7: Starting with Serial Communication ................................................ 135 7.1 Introducing Synchronous Serial Communication ........................................... 135 7.2 SPI .................................................................................................................... 137 7.2.1 Introducing SPI ............................................................................................ 137 7.2.2 SPI on the mbed and Application Board.................................................... 138 7.2.3 Setting Up an mbed SPI Master.................................................................. 138 7.2.4 Creating a SPI Data Link ............................................................................ 140 7.3 Intelligent Instrumentation............................................................................... 144 7.3.1 Introducing the SPI-Linked ADXL345 Accelerometer.............................. 145 7.3.2 Developing a Simple ADXL345 Program.................................................. 145 7.4 Evaluating SPI.................................................................................................. 148 7.5 The I2C Bus ..................................................................................................... 149 7.5.1 Introducing the I2C Bus............................................................................... 149 7.5.2 I2C on the mbed........................................................................................... 151 7.5.3 Setting Up an I2C Data Link....................................................................... 152 7.6 Communicating With I2C-Enabled Sensors.................................................... 155 7.6.1 The TMP102 Sensor.................................................................................... 155 7.6.2 The SRF08 Ultrasonic Range Finder.......................................................... 158 7.7 Evaluating I2C.................................................................................................. 159 7.8 Asynchronous Serial Data Communication .................................................... 160 7.8.1 Introducing Asynchronous Serial Data ....................................................... 160 7.8.2 Applying Asynchronous Communication on the mbed ............................. 161 7.8.3 Applying Asynchronous Communication With the Host Computer.......... 164 7.9 USB .................................................................................................................. 164 7.9.1 Introducing USB ..........................................................................................164 7.9.2 USB Capability on the mbed ...................................................................... 165 7.9.3 Using the mbed to Emulate a USB Mouse ................................................ 166 7.9.4 Leaving USB for Now................................................................................. 167 Contents viii 7.10 Mini Project: Multinode I2C Bus .................................................................... 167 Chapter Review ........................................................................................................ 167 Quiz........................................................................................................................... 168 References................................................................................................................. 169 Chapter 8: Liquid Crystal Displays.................................................................. 171 8.1 Display Technologies......................................................................................... 171 8.1.1 Introducing Liquid Crystal Technology ........................................................ 171 8.1.2 Liquid Crystal Character Displays ................................................................ 172 8.2 Using the PC1602F LCD................................................................................... 174 8.2.1 Introducing the PC1602F Display................................................................. 174 8.2.2 Connecting the PC1602F to the mbed.......................................................... 175 8.2.3 Using Modular Coding to Interface the LCD............................................... 176 8.2.4 Initializing the Display .................................................................................. 177 8.2.5 Sending Display Data to the LCD ................................................................ 178 8.2.6 The Complete LCD.cpp Definition ............................................................... 180 8.2.7 Using the LCD Functions.............................................................................. 181 8.2.8 Adding Data to a Specified Location............................................................ 182 8.3 Using the mbed TextLCD Library .................................................................... 183 8.4 Displaying Analog Input Data on the LCD...................................................... 185 8.5 Pixel GraphicsdImplementing the NHD-C12832 Display.............................. 187 8.6 Color LCDsdInterfacing the uLCD-144-G2 ................................................... 193 8.7 Mini Project: Digital Spirit Level ..................................................................... 196 Chapter Review ........................................................................................................ 197 Quiz........................................................................................................................... 198 References................................................................................................................. 198 Chapter 9: Interrupts, Timers, and Tasks ........................................................ 199 9.1 Time and Tasks in Embedded Systems........................................................... 199 9.1.1 Timers and Interrupts................................................................................... 199 9.1.2 Tasks............................................................................................................. 199 9.1.3 Event-Triggered and Time-Triggered Tasks ............................................... 200 9.1.4 Working in “Real Time”.............................................................................. 200 9.2 Responding to External Events ....................................................................... 201 9.2.1 Polling .......................................................................................................... 201 9.2.2 Introducing Interrupts .................................................................................. 202 9.3 Simple Interrupts on the mbed........................................................................ 203 9.4 Getting Deeper Into Interrupts ........................................................................ 205 9.4.1 Interrupts on the LPC1768 .......................................................................... 208 9.4.2 Testing Interrupt Latency............................................................................. 208 9.4.3 Disabling Interrupts...................................................................................... 209 9.4.4 Interrupts From Analog Inputs....................................................................210 9.4.5 Conclusion on Interrupts.............................................................................. 211 9.5 An Introduction to Timers............................................................................... 211 9.5.1 The Digital Counter..................................................................................... 212 Contents ix 9.5.2 Using the Counter as a Timer ..................................................................... 212 9.5.3 Timers on the mbed..................................................................................... 213 9.6 Using the mbed Timer..................................................................................... 213 9.6.1 Using Multiple mbed Timers....................................................................... 214 9.6.2 Testing the Timer Maximum Duration ....................................................... 216 9.7 Using the mbed Timeout ................................................................................. 217 9.7.1 A Simple Timeout Application ................................................................... 217 9.7.2 Further Use of Timeout ............................................................................... 219 9.7.3 Timeout Used to Test Reaction Time ......................................................... 220 9.8 Using the mbed Ticker .................................................................................... 222 9.8.1 Using Ticker for a Metronome.................................................................... 223 9.8.2 Reflecting on Multitasking in the Metronome Program............................. 225 9.9 The Real-Time Clock....................................................................................... 226 9.10 Switch Debouncing.......................................................................................... 226 9.11 Where Do We Go From Here? The Real-Time Operating System............... 229 9.11.1 The Limits of Conventional Programming ............................................... 229 9.11.2 Introducing the Real-Time Operating System .......................................... 230 9.11.3 A Mention of the mbed RTOS.................................................................. 231 9.12 Mini Projects.................................................................................................... 231 9.12.1 A Self-contained Metronome .................................................................... 231 9.12.2 Accelerometer Threshold Interrupt ...........................................................231 Chapter Review ........................................................................................................ 232 Quiz........................................................................................................................... 233 References................................................................................................................. 233 Chapter 10: Memory and Data Management ................................................... 235 10.1 A Memory Review........................................................................................... 235 10.1.1 Memory Types ........................................................................................... 235 10.1.2 Essential Memory Technologies................................................................ 235 10.2 Introducing Pointers......................................................................................... 238 10.3 Using Data Files With the mbed..................................................................... 240 10.3.1 Reviewing Some Useful C/Cþþ Library Functions................................ 241 10.3.2 Defining the mbed Local File System ...................................................... 241 10.3.3 Opening and Closing Files ........................................................................ 242 10.3.4 Recovering a “Lost” mbed ........................................................................ 243 10.3.5 Writing and Reading File Data .................................................................243 10.4 Example mbed Data File Access .................................................................... 244 10.4.1 File Access ................................................................................................. 244 10.4.2 String File Access...................................................................................... 245 10.4.3 Using Formatted Data................................................................................ 246 10.5 Using External SD Card Memory With the mbed ......................................... 247 10.6 Using External USB Flash Memory With the mbed...................................... 250 10.7 Mini Project: Accelerometer Data Logging on Exceeding Threshold........... 252 Chapter Review ........................................................................................................ 253 Contents x Quiz........................................................................................................................... 254 References................................................................................................................. 254 PART II: Moving to Advanced and Specialist Applications ................255 Chapter 11: Wireless Communication e Bluetooth and Zigbee........................... 257 11.1 Introducing Wireless Data Communication.................................................... 257 11.1.1 Some Wireless Preliminaries..................................................................... 257 11.1.2 Wireless Networks ..................................................................................... 260 11.1.3 A Word on Protocols.................................................................................. 261 11.2 Bluetooth .......................................................................................................... 263 11.2.1 Introducing Bluetooth ................................................................................ 263 11.2.2 The RN-41 and RN-42 Bluetooth Modules.............................................. 264 11.2.3 Getting to Know the RN-41...................................................................... 265 11.2.4 Simple Bluetooth: Sending mbed Data to a PC....................................... 268 11.2.5 Simple Bluetooth: Receiving Bluetooth Data From a PC ....................... 269 11.2.6 More Advanced Bluetooth: Communicating Between Two mbeds......... 270 11.2.7 Evaluating Bluetooth.................................................................................. 274 11.3 Zigbee............................................................................................................... 274 11.3.1 Introducing Zigbee..................................................................................... 274 11.3.2 Introducing XBee Wireless Modules ........................................................276 11.3.3 Linking to the XBee From a PC............................................................... 277 11.3.4 Configuring an XBee Pair ......................................................................... 279 11.3.5 Implementing a Zigbee Link with XBee and the mbed .......................... 279 11.3.6 Introducing the XBee API......................................................................... 284 11.3.7 Applying the XBee API ............................................................................ 285 11.3.8 Conclusion on Zigbee and Further Work.................................................. 288 11.4 Mini Projects.................................................................................................... 289 11.4.1 Bluetooth Mini Project .............................................................................. 289 11.4.2 Zigbee Mini Project................................................................................... 289 Chapter Review ........................................................................................................ 289 Quiz........................................................................................................................... 290 References................................................................................................................. 290 Chapter 12: Internet Communication and Control............................................. 291 12.1 Introduction to Internet Communication......................................................... 291 12.2 The Ethernet Communication Protocol........................................................... 291 12.2.1 Ethernet Overview ..................................................................................... 291 12.2.2 Implementing Simple mbed Ethernet Communications........................... 292 12.2.3 Ethernet Communication Between mbeds................................................ 295 12.3 Local Area Network Communications With the mbed.................................. 297 12.3.1 Local Area Network Essentials.................................................................297 12.3.2 Using the mbed for Ethernet Network Communications.........................300 12.3.3 Using the mbed as an HTTP File Server.................................................. 303 Contents xi 12.4 Using Remote Procedure Calls With the mbed.............................................. 305 12.4.1 Controlling mbed Outputs With Remote Procedure Calls....................... 306 12.4.2 Using Remote Procedure Call Variables................................................... 308 12.5 Using the mbed With Wide Area Networks................................................... 309 12.6 The Internet of Things..................................................................................... 313 12.6.1 The Internet of Things Concept ................................................................ 313 12.6.2 Opportunities and Challenges for Internet of Things Systems ................ 316 12.6.3 mbed and the Internet of Things............................................................... 316 Chapter Review ........................................................................................................ 319 Quiz........................................................................................................................... 320 References................................................................................................................. 321 Chapter 13: Working With Digital Audio ........................................................ 323 13.1 An Introduction to Digital Audio.................................................................... 323 13.2 USB MIDI on the mbed .................................................................................. 324 13.2.1 Sending USB MIDI Data From an mbed ................................................. 324 13.2.2 Reading USB MIDI Data on the mbed .................................................... 327 13.3 Digital Audio Processing................................................................................. 330 13.3.1 Input and Output of Digital Audio Data With the mbed.........................330 13.3.2 Signal Reconstruction ................................................................................ 332 13.4 Digital Audio Filtering Example..................................................................... 334 13.4.1 Implementing a Digital Low-Pass Filter on the mbed............................. 336 13.4.2 Digital High-Pass Filter ............................................................................. 339 13.5 Delay/Echo Effect............................................................................................ 340 13.6 Working With Wave Audio Files .................................................................... 342 13.6.1 The Wave Information Header.................................................................. 342 13.6.2 Reading the Wave File Header With the mbed........................................ 345 13.6.3 Reading and Outputting Mono Wave Data............................................... 347 13.7 High-Fidelity Digital Audio With the mbed................................................... 350 13.7.1 Texas Instruments TLV320 Audio Codec and the I2S Protocol .............. 351 13.7.2 Outputting Audio Data From the TLV320 ............................................... 352 13.7.3 High-Fidelity Wave File Player.................................................................356 13.7.4 High-Fidelity Audio Input (Recording) .................................................... 359 13.8 Summary on Digital Audio and Digital Signal Processing............................ 361 13.9 Mini Project: Portable Music Player............................................................... 361 Chapter Review ........................................................................................................ 361 Quiz........................................................................................................................... 362 References................................................................................................................. 362 Chapter 14: Letting Go of the mbed Libraries.................................................. 365 14.1 Introduction: How Much Do We Depend on the mbed API ......................... 365 14.2 Control Register Concepts............................................................................... 366 14.3 Digital Input/Output......................................................................................... 367 Contents xii 14.3.1 LPC1768 Digital Input/Output Control Registers .................................... 367 14.3.2 A Digital Output Application....................................................................368 14.3.3 Adding a Second Digital Output............................................................... 370 14.3.4 Digital Inputs.............................................................................................. 371 14.4 Getting Deeper Into the Control Registers ..................................................... 373 14.4.1 Pin Select and Pin Mode Registers...........................................................373 14.4.2 Power Control and Clock Select Registers............................................... 375 14.5 Using the DAC................................................................................................. 377 14.5.1 LPC1768 DAC Control Registers ............................................................. 377 14.5.2 A DAC Application ................................................................................... 378 14.6 Using the ADC................................................................................................. 379 14.6.1 LPC1768 ADC Control Registers ............................................................. 380 14.6.2 An ADC Application ................................................................................. 381 14.6.3 Changing ADC Conversion Speed............................................................ 384 14.7 A Conclusion on Using the Control Registers................................................ 386 Chapter Review ........................................................................................................ 386 Quiz........................................................................................................................... 386 References................................................................................................................. 387 Chapter 15: Hardware Insights: Clocks, Resets, and Power Supply .................... 389 15.1 Hardware Essentials......................................................................................... 389 15.1.1 Power Supply and the mbed...................................................................... 389 15.2 Clock Sources and Their Selection ................................................................. 393 15.2.1 Some Clock Oscillator Preliminaries ........................................................393 15.2.2 LPC1768 Clock Oscillators and the mbed Implementation..................... 394 15.2.3 Adjusting the Clock Configuration Register............................................. 396 15.2.4 Adjusting the Phase-Locked Loop ............................................................ 398 15.2.5 Selecting the Clock Source ....................................................................... 401 15.3 Reset ................................................................................................................. 402 15.3.1 Power-On Reset ......................................................................................... 403 15.3.2 Other Sources of Reset.............................................................................. 404 15.4 Toward Low Power.......................................................................................... 405 15.4.1 How Power Is Consumed in a Digital Circuit.......................................... 405 15.4.2 A Word on Cells and Batteries.................................................................. 407 15.5 Exploring mbed Power Consumption ............................................................. 409 15.5.1 LPC1768 Current Consumption ................................................................ 410 15.5.2 Switching Unwanted Things Off! ............................................................. 411 15.5.3 Manipulating the Clock Frequency...........................................................412 15.5.4 LPC1768 Low-Power Modes ....................................................................413 15.6 Getting Serious About Low Power; the M0/M0þ Cores and the Zero Gecko....................................................................................................... 414 15.6.1 The M0 Cortex Core.................................................................................. 414 15.6.2 The EFM32 Zero Gecko Starter Kit......................................................... 414 Contents xiii Chapter Review ........................................................................................................ 416 Quiz........................................................................................................................... 416 References................................................................................................................. 417 Chapter 16: Developing Commercial Products With mbed ................................. 419 16.1 Embedded Systems Design Process ................................................................ 419 16.2 Using mbed-Enabled Platforms in Commercial Products.............................. 422 16.3 Implementing the mbed Architecture on a Bespoke Printed Circuit Board.................................................................................................... 427 16.4 Programming the LPC1768 Directly............................................................... 428 16.5 Case Study: Irisense Temperature Logger With Touch Screen Display........ 433 16.6 Closing Remarks.............................................................................................. 436 Chapter Review ........................................................................................................ 436 Quiz........................................................................................................................... 437 References................................................................................................................. 437 Appendix A: Some Number Systems ................................................................ 439 Appendix B: Some C Essentials....................................................................... 447 Appendix C: mbed Technical Data................................................................... 467 Appendix D: Parts List .................................................................................. 473 Appendix E: Using a Host Terminal Emulator .................................................. 477 Index........................................................................................................... 483 Contents xiv

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.