This book is an introduction to embedded systems design, using the ARM mbed and C programming language as development tools.<br>The mbed provides a compact, self-contained and low-cost hardware core, and the on-line compiler requires no download or installation, being accessible wherever an internet
Fast and Effective Embedded Systems Design: Applying the Arm Mbed
✍ Scribed by Toulson, Rob;Wilmshurst, Tim
- Publisher
- Newnes
- Year
- 2016
- Tongue
- English
- Leaves
- 512
- Edition
- 2nd edition
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
Fast and Effective Embedded Systems Designis a fast-moving introduction to embedded systems design, applying the innovative ARM mbed and its web-based development environment. Each chapter introduces a major topic in embedded systems, and proceeds as a series of practical experiments, adopting a learning through doing strategy. Minimal background knowledge is needed to start. C/C++ programming is applied, with a step-by-step approach which allows you to get coding quickly. Once the basics are covered, the book progresses to some hot embedded issues - intelligent instrumentation, wireless and networked systems, digital audio and digital signal processing. In this new edition all examples and peripheral devices are updated to use the most recent libraries and peripheral devices, with increased technical depth, and introduction of the mbed enabled concept.
Written by two experts in the field, this book reflects on the experimental results, develops and matches theory to practice, evaluates the strengths and weaknesses of the technology and techniques introduced, and considers applications in a wider context.
New Chapters on:
Bluetooth and ZigBee communication
Internet communication and control, setting the scene for the 'Internet of Things'
Digital Audio, with high-fidelity applications and use of the I2S bus
Power supply, and very low power applications
The development process of moving from prototyping to small-scale or mass manufacture, with a commercial case study.
✦ Table of Contents
Front Cover......Page 1
Fast and Effective Embedded Systems Design......Page 2
Companion Website......Page 3
Fast and Effective Embedded Systems Design: Applying the ARM mbed......Page 4
Copyright......Page 5
Contents......Page 6
Introduction......Page 16
I - Essentials of Embedded Systems, Using the mbed......Page 20
1.1.1 What Is an Embedded System?......Page 22
1.1.2 An Example Embedded System......Page 24
1.1.3 A Second Example System: A Word on Control Systems and the Segway......Page 25
1.2.1 Some Computer Essentials......Page 27
1.2.2 The Microcontroller......Page 29
1.3.1 Programming Languages—What's So Special About C/C++?......Page 30
1.3.2 The Development Cycle......Page 31
1.4.1 A Little History......Page 32
1.4.2 Some Technical Detail—What Does This RISC Word Mean?......Page 34
1.4.3 The Cortex Core......Page 35
Quiz......Page 36
References......Page 37
2.1.1 mbed and mbed-enabled......Page 38
2.1.2 The mbed LPC1768......Page 39
2.1.3 The mbed LPC1768 Architecture......Page 40
2.1.4 The LPC1768 Microcontroller......Page 42
Step 2. Creating an mbed Account......Page 44
Step 3. Running a Program......Page 45
Step 4. Compiling the Program......Page 47
2.3.1 The mbed Software Development Kit and API......Page 48
2.3.3 The mbed Application Board......Page 49
Chapter Review......Page 52
Quiz......Page 53
References......Page 54
3.1.1 Thinking About the First Program......Page 56
3.1.2 Using the mbed API......Page 59
3.1.3 Exploring the while Loop......Page 60
3.2 Voltages as Logic Values......Page 61
3.3.1 Using Light Emitting Diodes......Page 63
3.3.2 Using mbed External Pins......Page 65
3.4.1 Connecting Switches to a Digital System......Page 66
3.4.2 The DigitalIn API......Page 67
3.4.3 Using if to Respond to a Switch Input......Page 68
3.5 Digital Input and Output With the Application Board......Page 70
3.6.1 Optoreflective and Transmissive Sensors......Page 73
3.6.2 Connecting an Optosensor to the mbed......Page 74
3.6.3 Seven-Segment Displays......Page 75
3.6.4 Connecting a Seven-Segment Display to the mbed......Page 77
3.7.1 Applying Transistor Switching......Page 80
3.7.2 Switching a Motor With the mbed......Page 82
3.7.3 Switching Multiple Seven-Segment Displays......Page 83
Quiz......Page 84
References......Page 86
4.1.1 The DAC......Page 88
4.2 Analog Outputs on the mbed......Page 89
4.2.1 Creating Constant Output Voltages......Page 90
4.2.2 Saw Tooth Waveforms......Page 91
4.2.4 Generating a Sine Wave......Page 94
4.3 Another Form of Analog Output: Pulse Width Modulation......Page 95
4.4.1 Using the mbed Pulse Width Modulation Sources......Page 97
4.4.2 Some Trial Pulse Width Modulation Outputs......Page 98
4.4.3 Speed Control of a Small Motor......Page 99
4.4.4 Generating Pulse Width Modulation in Software......Page 101
4.4.5 Servo Control......Page 102
4.4.6 Producing Audio Output......Page 104
Quiz......Page 107
References......Page 108
5.1.1 The ADC......Page 110
5.1.2 Range, Resolution, and Quantization......Page 111
5.1.3 Sampling Frequency......Page 113
5.1.4 Analog Input With the mbed......Page 114
5.2.1 Controlling LED Brightness by Variable Voltage......Page 115
5.2.2 Controlling LED Brightness by PWM......Page 117
5.2.3 Controlling PWM Frequency......Page 118
5.3.1 Displaying Values on the Computer Screen......Page 119
5.3.2 Scaling ADC Outputs to Recognized Units......Page 120
5.3.3 Applying Averaging to Reduce Noise......Page 121
5.4.1 The Light-Dependent Resistor......Page 122
5.4.2 Integrated Circuit Temperature Sensor......Page 123
5.5.1 Estimating Conversion Time and Applying Nyquist......Page 124
5.6.1 Two-Dimensional Light Tracking......Page 126
Quiz......Page 127
References......Page 128
6.2 Functions......Page 130
6.3.1 Using Flow Charts to Define Code Structure......Page 131
6.3.2 Pseudocode......Page 133
6.4 Working With Functions on the mbed......Page 134
6.4.1 Implementing a Seven-Segment Display Counter......Page 135
6.4.2 Function Reuse......Page 137
6.4.3 A More Complex Program Using Functions......Page 138
6.5 Using Multiple Files in C/C++......Page 140
6.5.2 Using #define, #include, #ifndef, and #endif Directives......Page 141
6.6 Modular Program Example......Page 144
6.7 Working With Bespoke Libraries......Page 148
Chapter Review......Page 152
References......Page 153
7.1 Introducing Synchronous Serial Communication......Page 154
7.2.1 Introducing SPI......Page 156
7.2.3 Setting Up an mbed SPI Master......Page 157
7.2.4 Creating a SPI Data Link......Page 159
7.3 Intelligent Instrumentation......Page 163
7.3.2 Developing a Simple ADXL345 Program......Page 164
7.4 Evaluating SPI......Page 167
7.5.1 Introducing the I2C Bus......Page 168
7.5.2 I2C on the mbed......Page 170
7.5.3 Setting Up an I2C Data Link......Page 171
7.6.1 The TMP102 Sensor......Page 174
7.6.2 The SRF08 Ultrasonic Range Finder......Page 177
7.7 Evaluating I2C......Page 178
7.8.1 Introducing Asynchronous Serial Data......Page 179
7.8.2 Applying Asynchronous Communication on the mbed......Page 180
7.9.1 Introducing USB......Page 183
7.9.2 USB Capability on the mbed......Page 184
7.9.3 Using the mbed to Emulate a USB Mouse......Page 185
Chapter Review......Page 186
Quiz......Page 187
References......Page 188
8.1.1 Introducing Liquid Crystal Technology......Page 190
8.1.2 Liquid Crystal Character Displays......Page 191
8.2.1 Introducing the PC1602F Display......Page 193
8.2.2 Connecting the PC1602F to the mbed......Page 194
8.2.3 Using Modular Coding to Interface the LCD......Page 195
Function mode......Page 196
8.2.5 Sending Display Data to the LCD......Page 197
8.2.6 The Complete LCD.cpp Definition......Page 199
8.2.7 Using the LCD Functions......Page 200
8.2.8 Adding Data to a Specified Location......Page 201
8.3 Using the mbed TextLCD Library......Page 202
8.4 Displaying Analog Input Data on the LCD......Page 204
8.5 Pixel Graphics—Implementing the NHD-C12832 Display......Page 206
8.6 Color LCDs—Interfacing the uLCD-144-G2......Page 212
8.7 Mini Project: Digital Spirit Level......Page 215
Chapter Review......Page 216
References......Page 217
9.1.2 Tasks......Page 218
9.1.4 Working in “Real Time”......Page 219
9.2.1 Polling......Page 220
9.2.2 Introducing Interrupts......Page 221
9.3 Simple Interrupts on the mbed......Page 222
9.4 Getting Deeper Into Interrupts......Page 224
9.4.2 Testing Interrupt Latency......Page 227
9.4.3 Disabling Interrupts......Page 228
9.4.4 Interrupts From Analog Inputs......Page 229
9.5 An Introduction to Timers......Page 230
9.5.2 Using the Counter as a Timer......Page 231
9.6 Using the mbed Timer......Page 232
9.6.1 Using Multiple mbed Timers......Page 233
9.6.2 Testing the Timer Maximum Duration......Page 235
9.7.1 A Simple Timeout Application......Page 236
9.7.2 Further Use of Timeout......Page 238
9.7.3 Timeout Used to Test Reaction Time......Page 239
9.8 Using the mbed Ticker......Page 241
9.8.1 Using Ticker for a Metronome......Page 242
9.8.2 Reflecting on Multitasking in the Metronome Program......Page 244
9.10 Switch Debouncing......Page 245
9.11.1 The Limits of Conventional Programming......Page 248
9.11.2 Introducing the Real-Time Operating System......Page 249
9.12.2 Accelerometer Threshold Interrupt......Page 250
Chapter Review......Page 251
References......Page 252
10.1.2 Essential Memory Technologies......Page 254
10.2 Introducing Pointers......Page 257
10.3 Using Data Files With the mbed......Page 259
10.3.2 Defining the mbed Local File System......Page 260
10.3.3 Opening and Closing Files......Page 261
10.3.5 Writing and Reading File Data......Page 262
10.4.1 File Access......Page 263
10.4.2 String File Access......Page 264
10.4.3 Using Formatted Data......Page 265
10.5 Using External SD Card Memory With the mbed......Page 266
10.6 Using External USB Flash Memory With the mbed......Page 269
10.7 Mini Project: Accelerometer Data Logging on Exceeding Threshold......Page 271
Chapter Review......Page 272
References......Page 273
II - Moving to Advanced and Specialist Applications......Page 274
11.1.1 Some Wireless Preliminaries......Page 276
11.1.2 Wireless Networks......Page 279
11.1.3 A Word on Protocols......Page 280
11.2.1 Introducing Bluetooth......Page 282
11.2.2 The RN-41 and RN-42 Bluetooth Modules......Page 283
11.2.3 Getting to Know the RN-41......Page 284
11.2.4 Simple Bluetooth: Sending mbed Data to a PC......Page 287
11.2.5 Simple Bluetooth: Receiving Bluetooth Data From a PC......Page 288
11.2.6 More Advanced Bluetooth: Communicating Between Two mbeds......Page 289
11.3.1 Introducing Zigbee......Page 293
11.3.2 Introducing XBee Wireless Modules......Page 295
11.3.3 Linking to the XBee From a PC......Page 296
11.3.5 Implementing a Zigbee Link with XBee and the mbed......Page 298
11.3.6 Introducing the XBee API......Page 303
11.3.7 Applying the XBee API......Page 304
11.3.8 Conclusion on Zigbee and Further Work......Page 307
Chapter Review......Page 308
References......Page 309
12.2.1 Ethernet Overview......Page 310
12.2.2 Implementing Simple mbed Ethernet Communications......Page 311
12.2.3 Ethernet Communication Between mbeds......Page 314
12.3.1 Local Area Network Essentials......Page 316
12.3.2 Using the mbed for Ethernet Network Communications......Page 319
12.3.3 Using the mbed as an HTTP File Server......Page 322
12.4 Using Remote Procedure Calls With the mbed......Page 324
12.4.1 Controlling mbed Outputs With Remote Procedure Calls......Page 325
12.4.2 Using Remote Procedure Call Variables......Page 327
12.5 Using the mbed With Wide Area Networks......Page 328
12.6.1 The Internet of Things Concept......Page 332
12.6.3 mbed and the Internet of Things......Page 335
Chapter Review......Page 338
Quiz......Page 339
References......Page 340
13.1 An Introduction to Digital Audio......Page 342
13.2.1 Sending USB MIDI Data From an mbed......Page 343
13.2.2 Reading USB MIDI Data on the mbed......Page 346
13.3.1 Input and Output of Digital Audio Data With the mbed......Page 349
13.3.2 Signal Reconstruction......Page 351
13.4 Digital Audio Filtering Example......Page 353
13.4.1 Implementing a Digital Low-Pass Filter on the mbed......Page 355
13.4.2 Digital High-Pass Filter......Page 358
13.5 Delay/Echo Effect......Page 359
13.6.1 The Wave Information Header......Page 361
13.6.2 Reading the Wave File Header With the mbed......Page 364
13.6.3 Reading and Outputting Mono Wave Data......Page 366
13.7 High-Fidelity Digital Audio With the mbed......Page 369
13.7.1 Texas Instruments TLV320 Audio Codec and the I2S Protocol......Page 370
13.7.2 Outputting Audio Data From the TLV320......Page 371
13.7.3 High-Fidelity Wave File Player......Page 375
13.7.4 High-Fidelity Audio Input (Recording)......Page 378
Chapter Review......Page 380
References......Page 381
14.1 Introduction: How Much Do We Depend on the mbed API......Page 384
14.2 Control Register Concepts......Page 385
14.3.1 LPC1768 Digital Input/Output Control Registers......Page 386
14.3.2 A Digital Output Application......Page 387
14.3.3 Adding a Second Digital Output......Page 389
14.3.4 Digital Inputs......Page 390
14.4.1 Pin Select and Pin Mode Registers......Page 392
14.4.2 Power Control and Clock Select Registers......Page 394
14.5.1 LPC1768 DAC Control Registers......Page 396
14.5.2 A DAC Application......Page 397
14.6 Using the ADC......Page 398
14.6.1 LPC1768 ADC Control Registers......Page 399
14.6.2 An ADC Application......Page 400
14.6.3 Changing ADC Conversion Speed......Page 403
Quiz......Page 405
References......Page 406
15.1.1 Power Supply and the mbed......Page 408
15.2.1 Some Clock Oscillator Preliminaries......Page 412
15.2.2 LPC1768 Clock Oscillators and the mbed Implementation......Page 413
15.2.3 Adjusting the Clock Configuration Register......Page 415
15.2.4 Adjusting the Phase-Locked Loop......Page 417
15.2.5 Selecting the Clock Source......Page 420
15.3 Reset......Page 421
15.3.1 Power-On Reset......Page 422
Brownout detect......Page 423
15.4.1 How Power Is Consumed in a Digital Circuit......Page 424
15.4.2 A Word on Cells and Batteries......Page 426
15.5 Exploring mbed Power Consumption......Page 428
15.5.1 LPC1768 Current Consumption......Page 429
15.5.2 Switching Unwanted Things Off!......Page 430
15.5.3 Manipulating the Clock Frequency......Page 431
15.5.4 LPC1768 Low-Power Modes......Page 432
15.6.2 The EFM32 Zero Gecko Starter Kit......Page 433
Quiz......Page 435
References......Page 436
16.1 Embedded Systems Design Process......Page 438
16.2 Using mbed-Enabled Platforms in Commercial Products......Page 441
16.3 Implementing the mbed Architecture on a Bespoke Printed Circuit Board......Page 446
16.4 Programming the LPC1768 Directly......Page 447
16.5 Case Study: Irisense Temperature Logger With Touch Screen Display......Page 452
Chapter Review......Page 455
References......Page 456
A.1 Binary, Decimal, and Hexadecimal......Page 458
A.2 Representation of Negative Numbers—Two's Complement......Page 461
A.2.1 Range of Two's Complement......Page 462
A.3 Floating Point Number Representation......Page 463
Declarations......Page 466
Comments......Page 468
#define......Page 469
B.3.2 Data Types......Page 470
B.4 Functions......Page 471
B.4.1 The main Function......Page 472
B.4.4 Using the static Storage Class With Functions......Page 473
B.6.1 If and Else......Page 474
B.6.2 Switch Statements and Using break......Page 476
B.7.3 Infinite Loops......Page 477
B.8.1 Arrays and Strings......Page 478
B.8.2 Pointers......Page 479
B.9.1 Header Files......Page 480
Data messages......Page 481
B.10.2 Opening and Closing Files......Page 482
B.10.3 Writing and Reading File Data......Page 483
B.11 Toward Professional Practice......Page 484
References......Page 485
C.2 LPC1768 Electrical Characteristics......Page 486
HIGH-level input current, IIH......Page 487
Output voltage, VO......Page 488
LOW-level short-circuit output current, IOLS......Page 489
C.2.2 Limiting Values......Page 490
D - Parts List......Page 492
E.2 Windows Users—Setting Up and Testing Tera Term......Page 496
E.4 A More Advanced Host Terminal Example......Page 498
E.5 Shorthand Terminal Communication......Page 499
References......Page 500
B......Page 502
C......Page 503
D......Page 504
H......Page 505
L......Page 506
N......Page 507
R......Page 508
V......Page 509
Z......Page 510
Back Cover......Page 512
📜 SIMILAR VOLUMES
<p><i>Fast and Effective Embedded Systems Design</i> is a fast-moving introduction to embedded systems design, applying the innovative ARM mbed and its web-based development environment. Each chapter introduces a major topic in embedded systems, and proceeds as a series of practical experiments, ado
<p><i>Fast and Effective Embedded Systems Design</i> is a fast-moving introduction to embedded systems design, applying the innovative ARM mbed and its web-based development environment. Each chapter introduces a major topic in embedded systems, and proceeds as a series of practical experiments, ado
<p><span>Fast and Effective Embedded Systems Design, Third Edition</span><span> is a fast-moving introduction to embedded systems design, applying the innovative Arm mbed “ecosystem,” including both hardware components and its web-based development environment. Minimal background knowledge is needed
A comprehensive and accessible introduction to the development of embedded systems and Internet of Things devices using ARM mbed Designing Embedded Systems and the Internet of Things (IoT) with the ARM mbed offers an accessible guide to the development of ARM mbed and includes a range of topics on
A comprehensive and accessible introduction to the development of embedded systems and Internet of Things devices using ARM mbed Designing Embedded Systems and the Internet of Things (IoT) with the ARM mbed offers an accessible guide to the development of ARM mbed and includes a range of topics o