| Introduction |
|
xvii | |
| PART I The Basics |
|
1 | (178) |
|
|
|
3 | (6) |
|
Transduction: Electrical Basics |
|
|
3 | (2) |
|
Electricity versus Electronics |
|
|
5 | (1) |
|
|
|
6 | (3) |
|
|
|
9 | (24) |
|
|
|
9 | (1) |
|
|
|
10 | (3) |
|
Microcontroller Features (in Order of Priority) |
|
|
10 | (2) |
|
High-Level Microcontroller Modules |
|
|
12 | (1) |
|
Mid-Level Microcontroller Modules |
|
|
12 | (1) |
|
|
|
13 | (1) |
|
|
|
13 | (6) |
|
|
|
14 | (1) |
|
|
|
15 | (1) |
|
|
|
15 | (1) |
|
|
|
16 | (1) |
|
|
|
17 | (1) |
|
|
|
18 | (1) |
|
|
|
19 | (1) |
|
|
|
20 | (1) |
|
|
|
21 | (1) |
|
|
|
21 | (1) |
|
|
|
21 | (1) |
|
|
|
22 | (1) |
|
|
|
22 | (1) |
|
|
|
23 | (1) |
|
|
|
23 | (1) |
|
|
|
23 | (1) |
|
|
|
24 | (1) |
|
|
|
24 | (1) |
|
|
|
25 | (3) |
|
|
|
28 | (4) |
|
Bringing It All Back Home |
|
|
32 | (1) |
|
Chapter 3 Building Circuits |
|
|
33 | (16) |
|
|
|
33 | (1) |
|
|
|
34 | (1) |
|
|
|
34 | (1) |
|
|
|
35 | (1) |
|
|
|
35 | (1) |
|
Where Does the Microcontroller Fit In? |
|
|
36 | (1) |
|
Translating Schematics into Circuits |
|
|
37 | (2) |
|
|
|
39 | (2) |
|
|
|
41 | (1) |
|
|
|
42 | (5) |
|
Connecting the Quick and Dirty Way |
|
|
42 | (2) |
|
Connecting the Professional Way |
|
|
44 | (1) |
|
|
|
44 | (3) |
|
|
|
47 | (2) |
|
Chapter 4 The Microcontroller |
|
|
49 | (16) |
|
"Hello World!" Is the Hard Part |
|
|
49 | (1) |
|
Where Does the Microcontroller Fit In? |
|
|
49 | (2) |
|
|
|
50 | (1) |
|
|
|
50 | (1) |
|
Routing Inputs to Outputs |
|
|
51 | (1) |
|
Identifying the Pins of the Microcontroller |
|
|
51 | (2) |
|
Lower-Level Microcontrollers: External Clock |
|
|
53 | (1) |
|
Your First Microcontroller-Based Circuit |
|
|
53 | (1) |
|
Getting Your Program to the Chip |
|
|
54 | (1) |
|
Programming Stamp-Like Modules |
|
|
55 | (4) |
|
Stamp-Like Programming Hardware Connection |
|
|
56 | (1) |
|
Stamp-Like Programming Software Environments |
|
|
56 | (3) |
|
Programming Lower-Level Chips |
|
|
59 | (3) |
|
|
|
59 | (1) |
|
Lower-Level Programming Software Environments |
|
|
59 | (3) |
|
|
|
62 | (3) |
|
|
|
65 | (22) |
|
|
|
65 | (1) |
|
Flow Control: How a Computer "Reads" a Program |
|
|
65 | (1) |
|
|
|
66 | (1) |
|
|
|
67 | (1) |
|
|
|
68 | (4) |
|
Built-In Routines: Subroutines and Functions |
|
|
72 | (3) |
|
|
|
75 | (1) |
|
Advanced Loops: While-Wend and For-Next |
|
|
76 | (4) |
|
|
|
77 | (1) |
|
|
|
78 | (2) |
|
|
|
80 | (1) |
|
|
|
81 | (1) |
|
|
|
82 | (2) |
|
|
|
84 | (2) |
|
|
|
86 | (1) |
|
Chapter 6 The "Big Four" Schematics, Programs, and Transducers |
|
|
87 | (50) |
|
|
|
87 | (9) |
|
|
|
87 | (3) |
|
|
|
90 | (1) |
|
|
|
91 | (5) |
|
|
|
96 | (6) |
|
|
|
96 | (3) |
|
|
|
99 | (2) |
|
|
|
101 | (1) |
|
|
|
102 | (10) |
|
|
|
103 | (1) |
|
|
|
104 | (4) |
|
|
|
108 | (3) |
|
Pulsewidth Modulation for Input |
|
|
111 | (1) |
|
|
|
112 | (15) |
|
Pulsewidth Modulation for Output |
|
|
112 | (2) |
|
|
|
114 | (1) |
|
|
|
114 | (3) |
|
|
|
117 | (4) |
|
|
|
121 | (6) |
|
From Analog In to Analog Out: Scaling Functions |
|
|
127 | (9) |
|
|
|
136 | (1) |
|
Chapter 7 Communicating between Computers |
|
|
137 | (42) |
|
|
|
138 | (1) |
|
|
|
139 | (1) |
|
|
|
140 | (1) |
|
|
|
140 | (1) |
|
Numbers or Letters: Using ASCII |
|
|
141 | (1) |
|
Software for the Microcontroller |
|
|
142 | (1) |
|
Serial Output from a Microcontroller |
|
|
143 | (6) |
|
|
|
149 | (1) |
|
Testing with Terminal Software |
|
|
149 | (1) |
|
Serial Input to a Microcontroller |
|
|
150 | (3) |
|
Serial Freeze and Blocking Functions |
|
|
153 | (2) |
|
|
|
155 | (5) |
|
|
|
155 | (2) |
|
|
|
157 | (3) |
|
|
|
160 | (2) |
|
Send Your Numbers as Text |
|
|
160 | (1) |
|
|
|
160 | (1) |
|
Sending Big Numbers in Many Bytes |
|
|
161 | (1) |
|
Serial Communication on a Multimedia Computer |
|
|
162 | (16) |
|
|
|
163 | (6) |
|
|
|
169 | (2) |
|
|
|
171 | (5) |
|
|
|
176 | (2) |
|
|
|
178 | (1) |
| PART II Advanced Methods |
|
179 | (236) |
|
Chapter 8 Physical Interaction Design, or Techniques for Polite Conversation |
|
|
181 | (36) |
|
The Conversation: Listening, Speaking, and Thinking |
|
|
181 | (6) |
|
|
|
181 | (3) |
|
|
|
184 | (3) |
|
|
|
187 | (2) |
|
|
|
188 | (1) |
|
|
|
189 | (1) |
|
Techniques for Effective Interaction |
|
|
189 | (27) |
|
|
|
189 | (6) |
|
|
|
195 | (4) |
|
Analog Sensors: Thresholds, Edges, and Peaks |
|
|
199 | (6) |
|
|
|
205 | (2) |
|
Smoothing, Sampling, and Averaging |
|
|
207 | (9) |
|
|
|
216 | (1) |
|
Chapter 9 Sensing Movement |
|
|
217 | (32) |
|
|
|
217 | (2) |
|
|
|
219 | (1) |
|
|
|
220 | (3) |
|
|
|
220 | (1) |
|
|
|
220 | (1) |
|
|
|
221 | (1) |
|
|
|
222 | (1) |
|
|
|
223 | (5) |
|
|
|
223 | (2) |
|
|
|
225 | (2) |
|
|
|
227 | (1) |
|
|
|
228 | (6) |
|
|
|
228 | (1) |
|
|
|
229 | (4) |
|
|
|
233 | (1) |
|
|
|
233 | (1) |
|
|
|
234 | (1) |
|
|
|
234 | (1) |
|
|
|
234 | (12) |
|
Video Tracking in Director MX |
|
|
237 | (2) |
|
Video Tracking in Max/MSP |
|
|
239 | (1) |
|
Video Tracking in Processing |
|
|
240 | (2) |
|
|
|
242 | (3) |
|
|
|
245 | (1) |
|
|
|
246 | (2) |
|
|
|
248 | (1) |
|
Chapter 10 Making Movement |
|
|
249 | (36) |
|
Types of Motion, Types of Motors |
|
|
249 | (2) |
|
Characteristics of Motors |
|
|
251 | (1) |
|
Special Electrical Needs of Motors |
|
|
252 | (3) |
|
Inductive Loads and Back Voltage |
|
|
252 | (2) |
|
Smoothing Current Drops Using Decoupling Capacitors |
|
|
254 | (1) |
|
|
|
255 | (4) |
|
Controlling DC Motors and Gearhead Motors |
|
|
255 | (4) |
|
|
|
259 | (1) |
|
Controlling Stepper Motors |
|
|
259 | (10) |
|
|
|
260 | (3) |
|
|
|
263 | (6) |
|
|
|
269 | (2) |
|
Basic Mechanics: Converting Motor Motion to Usable Motion |
|
|
271 | (10) |
|
|
|
272 | (6) |
|
|
|
278 | (1) |
|
|
|
279 | (2) |
|
|
|
281 | (2) |
|
|
|
282 | (1) |
|
|
|
282 | (1) |
|
|
|
282 | (1) |
|
|
|
282 | (1) |
|
|
|
282 | (1) |
|
|
|
283 | (1) |
|
|
|
283 | (1) |
|
|
|
283 | (2) |
|
|
|
285 | (10) |
|
Force-Sensitive Resistors |
|
|
285 | (2) |
|
|
|
286 | (1) |
|
|
|
287 | (1) |
|
|
|
287 | (1) |
|
Sensing Touch Using Capacitance Sensors |
|
|
287 | (2) |
|
Off-the-Shelf Touch Interfaces |
|
|
289 | (1) |
|
Sensing Vibrations Using Piezoelectric Sensors |
|
|
289 | (2) |
|
|
|
291 | (1) |
|
|
|
291 | (1) |
|
Cooling Things Off and Heating Them Up |
|
|
292 | (1) |
|
|
|
293 | (1) |
|
|
|
294 | (1) |
|
|
|
294 | (1) |
|
Chapter 12 More Communication between Devices |
|
|
295 | (58) |
|
Synchronous and Asynchronous Communication |
|
|
296 | (1) |
|
Asynchronous Serial Protocols |
|
|
296 | (1) |
|
|
|
297 | (1) |
|
|
|
298 | (1) |
|
Global Positioning System Data |
|
|
299 | (3) |
|
|
|
299 | (1) |
|
Learning the GPS Protocol |
|
|
299 | (3) |
|
|
|
302 | (12) |
|
MIDI Physical and Electrical Connections |
|
|
303 | (2) |
|
|
|
305 | (9) |
|
Connecting to the Internet |
|
|
314 | (18) |
|
Network Connection Using the CoBox Micro |
|
|
316 | (11) |
|
Network Connection in Lingo |
|
|
327 | (3) |
|
Network Connection in Processing |
|
|
330 | (2) |
|
Connecting over Telephone Lines Using Modems |
|
|
332 | (1) |
|
Special-Function ICs and Modules |
|
|
333 | (3) |
|
Synchronous Serial Protocols |
|
|
336 | (8) |
|
Wireless Serial Communication |
|
|
344 | (1) |
|
Infrared Serial Communication |
|
|
345 | (1) |
|
|
|
345 | (7) |
|
|
|
349 | (1) |
|
|
|
350 | (1) |
|
Wireless Ethernet Security |
|
|
351 | (1) |
|
|
|
352 | (1) |
|
Chapter 13 Controlling Sound and Light |
|
|
353 | (28) |
|
|
|
353 | (11) |
|
|
|
354 | (5) |
|
Synthesizing Sound on a Microcontroller |
|
|
359 | (1) |
|
|
|
360 | (1) |
|
|
|
361 | (3) |
|
|
|
364 | (1) |
|
|
|
364 | (6) |
|
|
|
365 | (1) |
|
|
|
366 | (1) |
|
|
|
367 | (3) |
|
|
|
370 | (6) |
|
Controlling Character Displays |
|
|
370 | (1) |
|
Controlling Video Displays |
|
|
370 | (6) |
|
Linear Media on a Multimedia Computer |
|
|
376 | (1) |
|
Linear Media on a Microcontroller |
|
|
376 | (3) |
|
|
|
379 | (1) |
|
|
|
380 | (1) |
|
Chapter 14 Managing Multiple Inputs and Outputs |
|
|
381 | (34) |
|
Setting Groups of Pins in Parallel |
|
|
381 | (4) |
|
|
|
385 | (3) |
|
|
|
388 | (1) |
|
Resistor Ladders as Analog Input |
|
|
388 | (1) |
|
|
|
389 | (8) |
|
Row-Column Scanning Analog Inputs |
|
|
396 | (1) |
|
Row-Column Scanning Outputs |
|
|
396 | (1) |
|
|
|
397 | (7) |
|
|
|
404 | (5) |
|
|
|
409 | (5) |
|
|
|
414 | (1) |
| Appendix A Choosing a Microcontroller |
|
415 | (8) |
|
|
|
415 | (1) |
|
|
|
416 | (1) |
|
Expandability/Compatibility |
|
|
416 | (1) |
|
Physical and Electrical Characteristics |
|
|
416 | (1) |
|
The Microcontrollers Covered in This Book |
|
|
417 | (3) |
|
|
|
417 | (1) |
|
|
|
418 | (1) |
|
Basic Micro Basic Atom Pro24 |
|
|
418 | (1) |
|
|
|
418 | (2) |
|
|
|
420 | (3) |
| Appendix B Recommended Suppliers |
|
423 | (10) |
|
|
|
423 | (2) |
|
|
|
423 | (1) |
|
|
|
424 | (1) |
|
|
|
424 | (1) |
|
|
|
425 | (8) |
|
|
|
425 | (7) |
|
|
|
432 | (1) |
| Appendix C Schematic Glossary |
|
433 | (10) |
|
Common Schematic Terms and Abbreviations |
|
|
441 | (2) |
| Index |
|
443 | |