Cover image for Interfacing with C++ : programming real-world applications
Title:
Interfacing with C++ : programming real-world applications
Personal Author:
Publication Information:
Berlin : Springer, 2006
Physical Description:
1v + 1 CD-ROM + 1 circuit board
ISBN:
9783540253785
General Note:
Accompanied by compact disc : CP 8189
Added Author:

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010099634 QA76.73.C15 K374 2006 Open Access Book Book
Searching...
Searching...
30000010099638 QA76.73.C15 K374 2006 Open Access Book Book
Searching...

On Order

Summary

Summary

This book is for people who are interested in learning and exploring electronic interfacing as well as C++ programming in a practicable and enjoyable way. Readers will learn to program a PC to do real-world things - not simply number crunching and graphics. They will also master how to write programs that interact with real-world devices. The book and accompanying software incorporate simple and easy-to-understand projects such as digital-to-analog conversion, analog to digital conversion, DC and Stepper motor control, temperature and voltage measurement, PC-based timing, or basic data acquisition. The audience of this innovative and rewarding approach to learn interfacing real-world devices to a computer via C++ are undergraduate and graduate students in engineering and science, practicing engineers/scientists, technical workers, and hobbyists. The types of courses the book complements include control engineering,electronics, computing, and mechatronics.


Reviews 1

Choice Review

Katupitiya (Univ. of New South Wales, Australia) and Bentley designed their book to teach basic C++ programming and basic electronic concepts to engineers/scientists. Book chapters are divided into 13 sections: "Program Development Software," "Parallel Port Basics and Interfacing," "Testing the Parallel Port," "The Object-oriented Approach," "Object-oriented Programming," "Digital-to-analog Conversion," "Driving LEDs," "Driving Motors--DC & Steppers," "Program Development Techniques," "Voltage and Temperature Measurement," "Analog-to-digital Conversion," "Data Acquisition with Operator Overloading," and "The PC Timer." Each chapter contains basic electronic tasks, followed by a bibliography and summary. Each basic electronic task is coupled with C++ programming concepts; e.g., the interfacing to a parallel port task is coupled with C++ I/O, data types, and functions. The C++ programming concepts covered include I/O, data types, flow control, object-orientation, arrays, and pointers. The book includes a circuit board and a detailed list of electronic components that can be used to build the circuits described in the book. ^BSumming Up: Recommended. Lower-division undergraduates; professionals. R. F. Dugan Jr. Stonehill College


Table of Contents

1 Getting Startedp. 1
1.1 Introductionp. 2
1.2 Program Development Softwarep. 2
1.3 A C++ Programp. 6
1.4 Use of Functionsp. 10
1.5 Fundamental Data Typesp. 15
1.6 Functions with Parameters and Return Valuesp. 18
1.7 Summaryp. 21
1.8 Bibliographyp. 22
2 Parallel Port Basics and Interfacingp. 23
2.1 Introductionp. 24
2.2 What is the Parallel Port?p. 24
2.3 Data Representationp. 30
2.4 Program Demonstrating Hexadecimal to Decimalp. 32
2.5 Summaryp. 33
2.6 Bibliographyp. 33
3 Testing the Parallel Portp. 35
3.1 Introductionp. 36
3.2 Interface Board Power Supplyp. 36
3.3 Parallel Port Interfacep. 39
3.4 Basic Output Using the Parallel Portp. 43
3.5 Basic Input Using the Parallel Portp. 46
3.6 Compensating for Internal Inversionsp. 50
3.7 Summaryp. 55
3.8 Bibliographyp. 56
4 The Object-Oriented Approachp. 57
4.1 Introductionp. 58
4.2 Conceptual and Physically Realisable Objectsp. 58
4.3 Real Objectsp. 59
4.4 Object Classesp. 61
4.5 Encapsulationp. 63
4.6 Abstract Classesp. 64
4.7 Class Hierarchiesp. 64
4.8 Inheritancep. 65
4.9 Multiple Inheritancep. 66
4.10 Polymorphismp. 66
4.11 An Example Object Hierarchyp. 67
4.12 Advantages of Object-Oriented Programmingp. 72
4.13 Disadvantages of Object-Oriented Programmingp. 72
4.14 Summaryp. 73
4.15 Bibliographyp. 73
5 Object-Oriented Programmingp. 75
5.1 Introductionp. 76
5.2 Naming Conventionp. 76
5.3 Developing an Object Classp. 77
5.4 Parallel Port Class - Stage Ip. 82
5.5 Using Class Objects in Programsp. 87
5.6 Parallel Port Class - Stage IIp. 94
5.7 Parallel Port Class - Stage IIIp. 99
5.8 Summaryp. 103
5.9 Bibliographyp. 103
6 Digital-to-Analog Conversionp. 105
6.1 Introductionp. 106
6.2 Digital-to-Analog Conversionp. 106
6.3 Programming the Digital-to-Analog Converterp. 117
6.4 Derivation of Object Classesp. 121
6.5 Adding Members to Derived Classesp. 129
6.6 Summaryp. 145
6.7 Bibliographyp. 146
7 Driving Ledsp. 147
7.1 Introductionp. 148
7.2 Iterative Loopsp. 148
7.3 Branchingp. 152
7.4 Arraysp. 157
7.5 Pointersp. 160
7.6 Using Pointersp. 175
7.7 Macrosp. 184
7.8 Dynamic Memory Allocationp. 185
7.9 Exception Handlingp. 189
7.10 Summaryp. 194
7.11 Bibliographyp. 195
8 Driving Motors - DC & Stepperp. 197
8.1 Introductionp. 198
8.2 DC Motorsp. 198
8.3 Stepper Motorsp. 202
8.4 A Class Hierarchy for Motorsp. 211
8.5 Virtual Functions - An Introductionp. 212
8.6 Virtual Functions - Applicationp. 233
8.7 Keyboard Controlsp. 256
8.8 Summaryp. 270
8.9 Bibliographyp. 271
9 Program Development Techniquesp. 273
9.1 Introductionp. 274
9.2 Efficient Coding Techniquesp. 274
9.3 Modular Programsp. 282
9.4 Case Study - Motor Driver Programp. 289
9.5 Summaryp. 302
9.6 Bibliographyp. 302
10 Voltage and Temperature Measurementp. 303
10.1 Introductionp. 304
10.2 Converting a Voltage to a Digital Pulse-trainp. 304
10.3 Temperature Measurementp. 305
10.4 The Object Class VCOp. 306
10.5 Measuring Voltages Using the VCOp. 311
10.6 Graphics Programming - Square Wave Displayp. 318
10.7 Temperature Measurementp. 324
10.8 Summaryp. 328
10.9 Bibliographyp. 329
11 Analog-to-Digital Conversionp. 331
11.1 Introductionp. 332
11.2 Analog-to-Digital Conversionp. 332
11.3 Conversion Techniquesp. 334
11.4 Measuring Voltages with an ADCp. 341
11.5 An Object Clas sfor the ADCp. 347
11.6 Measuring Voltage Using the ADCp. 356
11.7 Measuring Temperature Using the ADCp. 359
11.8 Summaryp. 362
11.9 Bibliographyp. 362
12 Data Acquisition with Operator Overloadingp. 363
12.1 Introductionp. 364
12.2 Operator Overloadingp. 364
12.3 Data Acquisitionp. 393
12.4 Summaryp. 397
12.5 Bibliographyp. 397
13 The PC Timerp. 399
13.1 Introductionp. 400
13.2 PC Timer Systemp. 400
13.3 Programming the Timerp. 408
13.4 The Object Class PCTimerp. 409
13.5 Measurement of Timep. 415
13.6 Reflex Measurementp. 417
13.7 Generating a Time-Basep. 419
13.8 Data Acquisition with Timestampp. 423
13.9 Summaryp. 430
13.10 Bibliographyp. 430
Appendix A Hardwarep. 431
Circuit Constructionp. 432
Interface Board Bill of Materialsp. 476
Appendix B Softwarep. 479
C++ Keywordsp. 480
Operator Precedencep. 481
ASCII Character Setp. 482
Indexp. 483