Table of contents for Interfacing with C++ : programming real-world applications / Jayantha Katupitiya, Kim Bentley.


Bibliographic record and links to related information available from the Library of Congress catalog
Note: Electronic data is machine generated. May be incomplete or contain other coding.


Counter
1     GETTING   STARTED .................................................................................... 1
1.1  INTRODUCTION      ....................................................................... ................. 2
1.2 PROGRAM DEVELOPMENT SOFTWARE.......................................................    ...2
1.3  A  C++  PROGRAM     .......................................................................................   6
1.4 USE OF FUNCTIONS ............................................................................... 10
1.5 FUNDAMENTAL DATA TYPES.............................................................. 15
1.6 FUNCTIONS WITH PARAMETERS AND RETURN VALUES ........................... 18
1.7  SUMMARY  ............................................................ .......................................21
1.8  BIBLIOGRAPHY      .......................................................................... .............22
2     PARALLEL PORT BASICS AND INTERFACING ................................23
2.1  INTRODUCTION   ............................................................................................24
2.2 WHAT IS THE PARALLEL PORT? .................................................................24
2.3 DATA REPRESENTATION ............................................................................30
2.4 PROGRAM DEMONSTRATING HEXADECIMAL  TO DECIMAL .....................  32
2.5  SUMMARY  ............................................................ ....................................... 33
2.6  BIBLIOGRAPHY      .............................. ............................................ .............33
3     TESTING THE PARALLEL PORT .....................................          ................35
3.1  INTRODUCTION      ........................................................................................  36
3.2 INTERFACE BOARD POWER SUPPLY ............................................................ 36
3.3 PARALLEL PORT INTERFACE.............................................................. ...39
3.4 BASIC OUTPUT USING THE PARALLEL PORT ..............................................43
3.5 BASIC INPUT USING THE PARALLEL PORT....................................................46
3.6 COMPENSATING FOR INTERNAL INVERSIONS.............................................. 50
3.7  SUMMARY  ........................................................... ....................................... 55
3.8  BIBLIOGRAPHY     .................................. .......................................... ..............  56
4    THE OBJECT-ORIENTED APPROACH ................................................. 57
4.1  IN TRODUCTION     ...... .................................................................................. 58
4.2 CONCEPTUAL AND PHYSICALLY REALISABLE OBJECTS............................... 58
4.3  REAL OBJECTS   ............................... ....... ...... ..... ............................59
4.4  OBJECT  CLASSES  ............................................................ ...................... ....61
4.5 ENCAPSULATION ...............................................................63
4.6 ABSTRACT CLASSES ..........................................................             64
4.7 CLASS HIERARCHIES ...............................   .....................     .......64
4.8 INHERITANCE ............................................. .....................65
4.9 MULTIPLE INHERITANCE ..............................................   ..    .......... 66
4.10 POLYMORPHISM .........................................................................66
4.11 AN EXAMPLE OBJECT HIERARCHY...........................................................67
4.12 ADVANTAGES OF OBJECT-ORIENTED PROGRAMMING .............................                72
4.13 DISADVANTAGES OF OBJECT-ORIENTED PROGRAMMING..........................72
4.14  SUMMARY  ...................................................................................................73
4.15  BIBLIOGRAPHY ........................................................................................... 73
5    OBJECT-ORIENTED PROGRAMMING ........................................       ..........   75
5.1  INTRODUCTION  ..................................................................... ....................... 76
5.2 NAMING CONVENTION...............      .................................. ................... ........76
5.3 DEVELOPING AN OBJECT CLASS................................................................... 77
5.4 PARALLEL PORT CLASS - STAGE I............................................................. ... 82
5.5 USING CLASS OBJECTS IN PROGRAMS ....................................... ........... . 87
5.6 PARALLEL PORT CLASS - STAGE II ............................................................94
5.7 PARALLEL PORT CLASS - STAGE III.............................................................99
5.8  SUMMARY  ................................................................................................... 103
5.9  BIBLIOGRAPHY  ............................................................................................   103
6    DIGITAL-TO-ANALOG CONVERSION ............................................... 105
6.1  INTRODUCTION    .......................................................................................  106
6.2 DIGITAL-TO-ANALOG CONVERSION ......................................            106
6.3 PROGRAMMING THE DIGITAL-TO-ANALOG CONVERTER ........................ 117
6.4 DERIVATION OF OBJECT CLASSES ............................................................. 121
6.5 ADDING MEMBERS TO DERIVED CLASSES...................................................... 129
6.6  SUMMARY  ........................................................................................  145
6.7  BIBLIOGRAPHY    ......................................................................................  146
7    DRIVING LEDS ........................................................... 147
7.1  INTRODUCTION ............................................................................................ 148
7.2  ITERATIVE  LOOPS.......................................................................................   148
7.3  BRANCHING............................................................. ............................... 152
7.4  ARRAYS................. ............... ............................................................. 157
7.5  POIN TERS................................................................... ................................ 160
7.6  USING  POINTERS  ........................................................................................ 175
7.7  MACROS  ...................................................................................................... 184
7.8 DYNAMIC MEMORY ALLOCATION ......................................................... 185
7.9 EXCEPTION HANDLING ............................................................................... 189
7.10  SUMMARY     ....... ......... ......... ......... ........................................ .............   194
7.11  BIBLIOGRA PHY .......................................................................................... 195
8    DRIVING MOTORS - DC & STEPPER.................................................. 197
8.1  INTRODUCTION  ............................................................................................ 198
8.2  DC MOTORS................................................................................... ........   198
8.3 STEPPER MOTORS ..............         ....................... .................... 202
8.4 A CLASS HIERARCHY FOR MOTORS .........................................................211
8.5 VIRTUAL FUNCTIONS - AN INTRODUCTION ............................................212
8.6 VIRTUAL FUNCTIONS - APPLICATION ..................................................... 233
8.7 KEYBOARD CONTROLS ............................................................ 256
8.8  SUMMARY  ................................................................................................... 270
8.9  BIBLIOGRAPHY............................................................................................. 271
9     PROGRAM         DEVELOPMENT TECHNIQUES................................... 273
9.1  INTRODUCTION     ............................................................................ ...........274
9.2 EFFICIENT CODING TECHNIQUES .............................................................. 274
9.3 MODULAR PROGRAMS ........................................................................282
9.4 CASE STUDY - MOTOR DRIVER PROGRAM ...............................................289
9.5  SUMMARY  ...............................................................................................  302
9.6 BIBLIOGRAPHY ...................................................................................... 302
10    VOLTAGE AND TEMPERATURE MEASUREMENT........................ 303
10.1  INTRODUCTION      ......... ........................................................................... .... 304
10.2 CONVERTING A VOLTAGE TO A DIGITAL PULSE-TRAIN...................... 304
10.3 TEMPERATURE MEASUREMENT .............................................................. 305
10.4 THE OBJECT CLASS VCO ............................................................... ....306
10.5 MEASURING VOLTAGES USING THE VCO ................................................311
10.6 GRAPHICS PROGRAMMING - SQUARE WAVE DISPLAY ...........                     ............318
10.7 TEMPERATURE MEASUREMENT .............................................................. 324
10.8  SUMMARY   ..............................................................................................328
10.9  BIBLIOGRAPHY      ........................................................................... ..........329
11    ANALOG-TO-DIGITAL CONVERSION................................................331
11.1  INTRODUCTION.......................................................................... ...........332
11.2 ANALOG-TO-DIGITAL CONVERSION ....................................................... 332
11.3 CONVERSION TECHNIQUES ...................................................................334
11.4 MEASURING VOLTAGES WITH AN ADC...................................................341
11.5 AN OBJECT CLASS FOR THE ADC...........................................................  347
11.6 MEASURING VOLTAGE USING THE ADC ...................................................356
11.7 MEASURING TEMPERATURE USING THE ADC.......................................359
11.8  SUMMARY  ................................................................................................. 362
11.9  BIBLIOGRAPHY     ................................................... .................................... 362
12 DATA ACQUISITION WITH OPERATOR OVERLOADING............363
12.1  INTRODUCTION.............     ............................................................. ............ 364
12.2 OPERATOR OVERLOADING.....................................................................364
12.3  DATA   A CQUISITION    ................................................................................... 393
12.4  SUMMARY  ................................................................................................. 397
12.5  BIBLIOGRAPHY     ................................................. ....................................397
13    THE PC TIMER............................................................             399
13.1  INTRODUCTION     ....................................................................................  400
13.2  PC TIMER  SYSTEM    ................................................................................   400
13.3 PROGRAMMING THE TIMER....................................................................408
13.4 THE OBJECT CLASS PCTIMER .................................................................409
13.5 MEASUREMENT OF TIME........................................................................415
13.6 REFLEX MEASUREMENT .......................................................       .417
13.7 GENERATING A TIME-BASE ...............................................   .......419
13.8 DATA ACQUISITION WITH TIMESTAMP ...................................................423
13.9 SUMMARY ..............................................................................430
13.10  BIBLIOGRAPHY      ................................................................... ...............430
APPENDIX A - HARDWARE ........................................................................... 431
CIRCUIT CONSTRUCTION ................................................................................432
INTERFACE BOARD BILL OF MATERIALS,........................................................476
APPENDIX B - SOFTWARE .......................................................................... 479
C++ KEYWORDS............................................................... ...............................480
OPERATOR PRECEDENCE ...............................................................................481
ASCII CHARACTER SET ................................................................................482
INDEX  ............................. ..................... . ........................................................ 483



Library of Congress subject headings for this publication: C++ (Computer program language)Interface circuits