Contents
About the Authors............................................................................... xv
Chapter 1: The Fundamentals ................................................................ 1
1.1 Electrical Fundamentals..................................................................................1
1.2 Passive Components.....................................................................................36
1.3 DC Circuits..................................................................................................87
1.4 Alternating Voltage and Current ................................................................. 124
1.5 Circuit Simulation ...................................................................................... 151
1.6 Intuitive Circuit Design .............................................................................. 166
1.7 Troubleshooting Basic ................................................................................ 177
References .......................................................................................................... 208
Chapter 2: The Semiconductor Diode....................................................211
References .......................................................................................................... 215
Chapter 3: Understanding Diodes and Their Problems .............................217
3.1 Speed Demons ........................................................................................... 219
3.2 Turn ’em off—turn ’em on. . . .................................................................... 220
3.3 Other Strange Things that Diodes Can Do to You. . . .................................. 222
3.4 Zener, Zener, Zener.................................................................................... 225
3.5 Diodes that Glow in the Dark, Efficiently................................................... 228
3.6 Optoisolators .............................................................................................. 228
3.7 Assault and Battery .................................................................................... 231
References .......................................................................................................... 232
Chapter 4: Bipolar Transistors ............................................................235
References .......................................................................................................... 247
Chapter 5: Field-Effect Transistors.......................................................249
References .......................................................................................................... 254
Chapter 6: Identifying and Avoiding Transistor Problems..........................255
6.1 More Beta—More Better? .......................................................................... 257
6.2 Field-Effect Transistors .............................................................................. 258
6.3 Power Transistors may Hog Current ........................................................... 261
6.4 Apply the 5-Second Rule ........................................................................... 264
6.5 Fabrication Structures make a Difference.................................................... 264
6.6 Power-Circuit Design Requires Expertise.................................................... 267
6.7 MOSFETs Avoid Secondary Breakdown .................................................... 269
References .......................................................................................................... 270
Chapter 7: Digital Circuit Fundamentals ...............................................271
7.1 Digital Technology..................................................................................... 273
References .......................................................................................................... 278
Chapter 8: Number Systems ...............................................................279
8.1 Introduction................................................................................................ 279
8.2 Decimal–Unsigned Binary Conversion........................................................ 280
8.3 Signed Binary Numbers.............................................................................. 284
8.4 Gray Code ................................................................................................. 289
8.5 Binary Coded Decimal ............................................................................... 290
8.6 Octal-Binary Conversion ............................................................................ 291
8.7 Hexadecimal-Binary Conversion................................................................. 294
Chapter 9: Binary Data Manipulation ..................................................301
9.1 Introduction................................................................................................ 301
9.2 Logical Operations ..................................................................................... 302
9.3 Boolean Algebra ........................................................................................ 303
9.4 Combinational Logic Gates ........................................................................ 306
9.5 Truth Tables............................................................................................... 308
References .......................................................................................................... 317
Chapter 10: Combinational Logic Design...............................................319
10.1 Introduction.............................................................................................. 319
10.2 NAND and NOR Logic ............................................................................ 332
10.3 Karnaugh Maps ........................................................................................ 334
10.4 Don’t Care Conditions.............................................................................. 341
References .......................................................................................................... 341
Chapter 11: Sequential Logic Design ....................................................343
11.1 Introduction.............................................................................................. 343
11.2 Level Sensitive Latches and Edge-triggered Flip-flops .............................. 348
11.3 The D Latch and D-type Flip-Flop ........................................................... 348
11.4 Counter Design ........................................................................................ 354
11.5 State Machine Design............................................................................... 366
11.6 Moore Versus Mealy State Machines........................................................ 377
11.7 Shift Registers.......................................................................................... 377
11.8 Digital Scan Path ..................................................................................... 379
References .......................................................................................................... 382
Chapter 12: Memory.........................................................................383
12.1 Introduction............................................................................................ 383
12.2 Random Access Memory........................................................................ 385
12.3 Read-only Memory................................................................................. 386
Chapter 13: Selecting a Design Route...................................................389
13.1 Introduction............................................................................................ 389
13.2 Discrete Implementation ......................................................................... 391
13.3 Mask Programmable ASICs.................................................................... 400
13.4 Field-Programmable Logic...................................................................... 414
13.5 VHDL.................................................................................................... 434
13.6 Choosing a Design Route ....................................................................... 436
Chapter 14: Designing with Logic ICs...................................................441
14.1 Logic ICs ............................................................................................... 441
Chapter 15: Interfacing......................................................................455
15.1 Mixing Analog and Digital ..................................................................... 455
15.2 Generating Digital Levels from Analog Inputs ........................................ 458
15.3 Protection Against Externally Applied Overvoltages ............................... 461
15.4 Isolation ................................................................................................. 462
15.5 Classic Data Interface Standards ............................................................. 465
15.6 High-Performance Data Interface Standards ............................................ 471
Chapter 16: DSP and Digital Filters ....................................................477
16.1 Origins of Real-World Signals and Their Units of Measurement ............. 477
16.2 Reasons for Processing Real-World Signals ............................................ 478
16.3 Generation of Real-World Signals........................................................... 480
16.4 Methods and Technologies Available for Processing Real-World Signals 480
16.5 Analog Versus Digital Signal Processing ................................................ 481
16.6 A Practical Example............................................................................... 482
16.7 Finite Impulse Response (FIR) Filters ..................................................... 489
16.8 FIR Filter Implementation In DSP Hardware Using Circular Buffering ... 494
16.9 Designing FIR Filters ............................................................................. 497
16.10 Infinite Impulse Response (IIR) Filters ................................................... 508
16.11 IIR Filter Design Techniques .................................................................. 511
16.12 Multirate Filters...................................................................................... 514
16.13 Adaptive Filters ...................................................................................... 519
References .......................................................................................................... 523
Chapter 17: Dealing with High-Speed Logic...........................................525
References on Dealing with High-Speed Logic ...........................................532
Chapter 18: Bridging the Gap between Analog and Digital .......................533
18.1 Try to Measure Temperature Digitally .................................................... 536
18.2 Road Blocks Abound.............................................................................. 540
18.3 The Ultimate Key to Analog Success...................................................... 548
18.4 How Analog and Digital Design Differ ................................................... 549
18.5 Time and Its Inversion............................................................................ 556
18.6 Organizing Your Toolbox ....................................................................... 556
18.7 Set Your Foundation and Move On, Out of The Box .............................. 557
References .......................................................................................................... 558
Chapter 19: Op-Amps .......................................................................559
19.1 The Magical Mysterious Op-Amp........................................................... 559
19.2 Understanding Op-Amp Parameters ........................................................ 572
19.3 Modeling Op-Amps ................................................................................ 599
19.4 Finding the Perfect Op-Amp................................................................... 600
References .......................................................................................................... 618
Chapter 20: Analog-to-Digital Converters..............................................619
20.1 ADCs..................................................................................................... 621
20.2 Types of ADCs ...................................................................................... 624
20.3 ADC Comparison ................................................................................... 633
20.4 Sample and Hold.................................................................................... 634
20.5 Real Parts............................................................................................... 636
20.6 Microprocessor Interfacing ..................................................................... 637
20.7 Clocked Interfaces .................................................................................. 643
20.8 Serial Interfaces...................................................................................... 644
20.9 Multichannel ADCs................................................................................ 650
20.10 Internal Microcontroller ADCs................................................................ 650
20.11 Codecs ................................................................................................... 652
20.12 Interrupt Rates........................................................................................ 652
20.13 Dual-Function Pins On Microcontrollers ................................................. 653
20.14 Design Checklist .................................................................................... 655
Chapter 21: Sensors..........................................................................657
21.1 Instrumentation and Control Systems ...................................................... 657
21.2 Transducers ............................................................................................ 659
21.3 Sensors................................................................................................... 660
21.4 Switches................................................................................................. 667
21.5 Semiconductor Temperature Sensors ....................................................... 672
21.6 Thermocouples ....................................................................................... 672
21.7 Threshold Detection................................................................................ 674
21.8 Outputs .................................................................................................. 676
21.9 LED Indicators ....................................................................................... 676
21.10 Driving High-Current Loads ................................................................... 678
21.11 Audible Outputs ..................................................................................... 678
21.12 Motors.................................................................................................... 681
21.13 Driving Mains Connected Loads............................................................. 682
Chapter 22: Active Filters ..................................................................685
22.1 Introduction............................................................................................ 685
22.2 Fundamentals of Low-Pass Filters........................................................... 686
22.3 Low-Pass Filter Design........................................................................... 697
22.4 High-Pass Filter Design .......................................................................... 707
22.5 Band-Pass Filter Design.......................................................................... 714
22.6 Band-Rejection Filter Design .................................................................. 724
22.7 All-Pass Filter Design............................................................................. 729
22.8 Practical Design Hints ............................................................................ 734
22.9 Filter Coefficient Tables ......................................................................... 744
References .......................................................................................................... 752
Chapter 23: Radio-Frequency (RF) Circuits ...........................................753
23.1 Modulation of Radio Waves ................................................................... 753
23.2 Low-Power RF Amplifiers...................................................................... 759
23.3 Stability.................................................................................................. 762
23.4 Linearity................................................................................................. 767
23.5 Noise and Dynamic Range ..................................................................... 771
23.6 Impedances and Gain ............................................................................. 773
23.7 Mixers.................................................................................................... 778
23.8 Demodulators ......................................................................................... 783
23.9 Oscillators .............................................................................................. 787
References .......................................................................................................... 795
Chapter 24: Signal Sources.................................................................797
24.1 Voltage References................................................................................. 797
24.2 NonsinusoidaI Waveform Generators ...................................................... 800
24.3 Sine Wave Generators ............................................................................ 808
24.4 Voltage-Controlled Oscillators And Phase Detectors ............................... 817
References .......................................................................................................... 828
Chapter 25: EDA Design Tools for Analog and RF .................................829
25.1 The Old Pencil and Paper Design Process............................................... 835
25.2 Is Your Simulation Fundamentally Valid?............................................... 838
25.3 Macromodels: What Can They Do?.......................................................... 843
25.4 VHDL-AMS............................................................................................. 849
References .......................................................................................................... 867
Chapter 26: Useful Circuits ................................................................869
26.1 Introduction.............................................................................................. 869
26.2 Boundary Conditions ................................................................................ 873
26.3 Amplifiers ................................................................................................ 873
26.4 Computing Circuits .................................................................................. 891
26.5 Oscillators ................................................................................................ 902
26.6 Some Favorite Circuits ............................................................................. 910
References .......................................................................................................... 915
Chapter 27: Programmable Logic to ASICs............................................917
27.1 Programmable Read-Only Memory (PROM)............................................. 918
27.2 Programmable Logic Arrays (PLAs) ......................................................... 922
27.3 Programmable Array Logic (PALs) .......................................................... 923
27.4 The Masked Gate Array ASIC.................................................................. 929
27.5 CPLDs and FPGAs................................................................................... 931
27.6 Summary.................................................................................................. 932
References .......................................................................................................... 932
Chapter 28: Complex Programmable Logic Devices (CPLDs) ....................933
28.1 CPLD Architectures ................................................................................. 933
28.2 Function Blocks ....................................................................................... 934
28.3 I/O Blocks................................................................................................ 936
28.4 Clock Drivers........................................................................................... 937
28.5 Interconnect ............................................................................................. 938
28.6 CPLD Technology and Programmable Elements ....................................... 940
28.7 Embedded Devices ................................................................................... 940
28.8 Summary: CPLD Selection Criteria .......................................................... 944
References .......................................................................................................... 946
Chapter 29: Field Programmable Gate Arrays (FPGAs) ..........................947
29.1 FPGA Architectures ................................................................................. 947
29.2 Configurable Logic Blocks ....................................................................... 948
29.3 Configurable I/O Blocks........................................................................... 951
29.4 Embedded Devices ................................................................................... 954
29.5 Programmable Interconnect ...................................................................... 955
29.6 Clock Circuitry......................................................................................... 957
29.7 SRAM vs. Antifuse Programming............................................................. 957
29.8 Emulating and Prototyping ASICs ............................................................ 961
29.9 Summary.................................................................................................. 964
References .......................................................................................................... 965
Chapter 30: Design Automation and Testing for FPGAs ..........................967
30.1 Simulation .............................................................................................. 967
30.2 Libraries................................................................................................. 971
30.3 Synthesis ................................................................................................ 974
30.4 Physical Design Flow ............................................................................. 977
30.5 Place and Route ..................................................................................... 977
30.6 Timing Analysis ..................................................................................... 978
30.7 Design Pitfalls ........................................................................................ 978
30.8 VHDL Issues for FPGA Design.............................................................. 979
30.9 Summary................................................................................................ 979
References .......................................................................................................... 980
Chapter 31: Integrating Processors onto FPGAs .....................................981
31.1 Introduction............................................................................................ 981
31.2 A Simple Embedded Processor ............................................................... 982
31.3 Soft Core Processors on an FPGA ........................................................ 1004
31.4 Summary.............................................................................................. 1004
Chapter 32: Implementing Digital Filters in VHDL ...............................1005
32.1 Introduction.......................................................................................... 1005
32.2 Converting S-Domain to Z-Domain ...................................................... 1006
32.3 Implementing Z-Domain Functions in VHDL ....................................... 1008
32.4 Basic Low-Pass Filter Model ................................................................ 1013
32.5 FIR Filters............................................................................................ 1017
32.6 IIR Filters............................................................................................. 1018
32.7 Summary.............................................................................................. 1018
Chapter 33: Microprocessor and Microcontroller Overview .....................1019
33.1 Microprocessor Systems ....................................................................... 1019
33.2 Single-Chip Microcomputers................................................................. 1020
33.3 Microcontrollers ................................................................................... 1020
33.4 Microprocessor Systems ....................................................................... 1020
33.5 Data Types........................................................................................... 1024
33.6 Data Storage......................................................................................... 1024
33.7 The Microprocessor .............................................................................. 1025
33.8 Microprocessor Operation ..................................................................... 1032
33.9 A Microcontroller System..................................................................... 1038
Chapter 34: Microcontroller Toolbox ..................................................1043
34.1 Microcontroller Supply and Reference .................................................. 1043
34.2 Resistor Networks ................................................................................ 1045
34.3 Multiple Input Control.......................................................................... 1046
34.4 AC Control........................................................................................... 1049
34.5 Voltage Monitors and Supervisory Circuits ........................................... 1050
34.6 Driving Bipolar Transistors................................................................... 1051
34.7 Driving MOSFETs ............................................................................... 1054
34.8 Reading Negative Voltages................................................................... 1057
34.9 Example Control System ...................................................................... 1059
Chapter 35: Power Supply Overview and Specifications .........................1071
35.1 Power Supplies..................................................................................... 1071
35.2 Specifications ....................................................................................... 1078
35.3 Off-the-Shelf or Roll Your Own ........................................................... 1078
Chapter 36: Input and Output Parameters ..........................................1081
36.1 Voltage ................................................................................................ 1081
36.2 Current................................................................................................. 1082
36.3 Fuses.................................................................................................... 1082
36.4 Switch-On Surge, or Inrush Current ...................................................... 1084
36.5 Waveform Distortion and Interference .................................................. 1087
36.6 Frequency............................................................................................. 1090
36.7 Efficiency............................................................................................. 1090
36.8 Deriving the Input Voltage from the Output.......................................... 1092
36.9 Low-Load Condition............................................................................. 1094
36.10 Rectifier and Capacitor Selection .......................................................... 1095
36.11 Load and Line Regulation .................................................................... 1097
36.12 Ripple and Noise.................................................................................. 1099
36.13 Transient Response............................................................................... 1101
Chapter 37: Batteries......................................................................1103
37.1 Initial Considerations ............................................................................ 1103
37.2 Primary Cells ....................................................................................... 1108
37.3 Secondary Cells.................................................................................... 1110
37.4 Charging .............................................................................................. 1114
Chapter 38: Layout and Grounding for Analog and Digital Circuits..........1117
38.1 The Similarities of Analog and Digital Layout Practices ....................... 1117
38.2 Where the Domains Differ—Ground Planes Can Be a Problem............. 1121
38.3 Where the Board and Component Parasitics Can Do the Most Damage. 1123
38.4 Layout Techniques that Improve ADC Accuracy and Resolution........... 1131
38.5 The Art of Laying Out Two-Layer Boards ............................................ 1135
38.6 Current Return Paths With or Without a Ground Plane ......................... 1140
38.7 Layout Tricks for a 12-Bit Sensing System........................................... 1142
38.8 General Layout Guidelines—Device Placement..................................... 1144
38.9 General Layout Guidelines—Ground and Power Supply Strategy .......... 1144
38.10 Signal Traces........................................................................................ 1147
38.11 Did I Say Bypass and Use an Anti-Aliasing Filter? ............................... 1148
38.12 Bypass Capacitors ................................................................................ 1148
38.13 Anti-Aliasing Filters ............................................................................. 1149
38.14 PCB Design Checklist .......................................................................... 1150
References ........................................................................................................ 1151
Chapter 39: Safety .........................................................................1153
39.1 The Hazards of Electricity .................................................................... 1154
39.2 Safety Classes ...................................................................................... 1155
39.3 Insulation Types ................................................................................... 1156
39.4 Design Considerations for Safety Protection.......................................... 1156
39.5 Fire Hazard .......................................................................................... 1158
Chapter 40: Design for Production.....................................................1161
40.1 Checklist .............................................................................................. 1162
40.2 The Dangers of ESD ............................................................................ 1164
Chapter 41: Testability ....................................................................1167
41.1 In-Circuit Testing ................................................................................. 1167
41.2 Functional Testing ................................................................................ 1168
41.3 Boundary Scan and JTAG .................................................................... 1170
41.4 Design Techniques ............................................................................... 1174
Chapter 42: Reliability ....................................................................1177
42.1 Definitions............................................................................................ 1177
42.2 The Cost of Reliability ......................................................................... 1179
42.3 Design for Reliability ........................................................................... 1180
42.4 The Value of MTBF Figures ................................................................ 1184
42.5 Design Faults ....................................................................................... 1186
Chapter 43: Thermal Management.....................................................1187
43.1 Using Thermal Resistance .................................................................... 1187
43.2 Heatsinks.............................................................................................. 1193
43.3 Power Semiconductor Mounting ........................................................... 1197
43.4 Placement and Layout .......................................................................... 1201
Appendix A Standards......................................................................1203
A.1 British Standards .................................................................................. 1203
A.2 IEC Standards ...................................................................................... 1206
Index.............................................................................................1207