Book description
Interfacing with C is about interfacing personal computers using C. Anyone who is interested in ports, transducer interfacing, analog to digital conversion, convolution, filters or digital/analog conversion will benefit from reading Interfacing with C. Students will also find this a practical introduction to real-time programming with a generous collection of tried and tested programs.The pace of the book is such that the reader is encouraged to run the programs and experiment with C. The principles precede the applications in most cases in an attempt to provide genuine understanding and encourage further development. Readers will gain much from the hands-on experience the authors' approach provides, an approach designed to enable readers to climb steep learning curves with the minimum amount of assistance. The many programs included in the text provide the essential hands-on experience. Some of the programs inevitably become rather lengthy, so the source code used is available as a free download from the Newnes website. The aim of the book, however, is to give the reader enough confidence to rewrite and improve these programs.In the second edition Mike James has thoroughly updated all aspects relating to software, operating systems and graphical interfaces. He has also increased the scope of the book to include current forms of C++. Material on data acquisition has been thoroughly updated and the section on peripherals increased.- A practical and painless way of becoming an expert C programmer
- New edition also covers C++ and the Windows environment
- Get up to speed with the essential maths needed for C without having to buy a university maths text!
Table of contents
- Cover image
- Title page
- Table of Contents
- Copyright
- Preface
- Preface to second edition
-
Chapter 1: An introduction to C
- Properties and background
- Fundamental interfacing
- Programmable input–output devices
- 8255 programmable peripheral interface
- Programming the 8255
- IBM PC bus
- Accessing specific memory locations with C
- Reading the contents of I/O space using pointers
- C program development
- Variables
- Data type
- Qualifiers
- Reading the status of an input port
- Controlling printf()
- The coercion operator: cast
- Writing from keyboard to output port
- Entering data using scanf()
-
Chapter 2: Loops and data conversion
- Repetition: unconditional jumps
- Named constants #define
- Infamous goto
- For-loops in greater detail – in a binary counter
- Port monitoring with a do-while construction
- Light chaser effect
- Communicating with peripherals
- Successive approximation
- Flash conversion
- Dual and quad slope conversion
- Synchronization and software control
- 12-bit A-to-D conversion
- IBM-PC AD574A interface
-
Chapter 3: Data acquisition using C
- Data capture using CGA graphics
- Controlling the coordinate
- Data capture with EGA graphics
- Background and foreground colour
- Building a Windows Application
- Transducer interfacing with C/C++
- Conditioning the signal voltage
- Simplifying program development
- Displaying temperature using EGA graphics
- Introducing random noise
- A linear transducer
- Measurement of light intensity
- Statement of the problem
- Chapter 4: Essential mathematics
-
Chapter 5: Convolution
- Matching analogue signals and systems
- Frequency-shifting rule
- Convolution
- Graphical interpretation of the convolution integral
- Obtaining the digital output recursively
- Digital feedback
- Obtaining the digital output by convolution
- Reconciling time-domain and frequency-domain processes
- Computerized convolution
- System response testing
- Applying the program
- Sophisticated applications
- Chapter 6: Digital filters
-
Chapter 7: Fourier transforms
- Fourier transforms using a PC
- Discrete Fourier transform DFT
- Developing and explaining the program
- Graphical spectral analysis
- Understanding the logical system of coordinates
- Applying the DFT program
- Streamlining the arithmetic using the fast Fourier transform
- How many multiplications?
- FFT with real-time data capture and graphics
- Control of the peripheral board and data capture
- Signal truncation and spectral leakage
- Reducing spectral spreading with a Hanning window
-
Chapter 8: Correlation
- Correlation methods using a PC
- Linear systems and random inputs
- Wiener–Khintchine theorem
- Autocorrelation
- Effect of finite observation time
- Calculating discrete autocorrelation functions
- Computing the autocorrelation function
- Anatomy of the program
- Graphical autocorrelation
- Applying the program
- ACF of sampled sine wave
- ACF of decaying exponential
- White noise
- Generating random noise and computing the ACF
- Anatomy of the program
- Using autocorrelation to detect noise-corrupted signals
- ACF with real-time data capture and graphics
- Autocorrelation in the real world
- The cross-correlation function
- System testing and characterization using random noise
- Order out of chaos
- Chapter 9: Kalman filters
-
Chapter 10: Data conversion
- Digital-to-analogue conversion
- A primitive digitally controlled potentiometer
- Buffering a binary-weighted resistor network
- R-2R ladder network
- Analog devices AD7226 D-to-A converter
- Waveform generation using a D-to-A and C
- Generating sine waves – real-time and playback digital synthesis
- Waveform synthesis
- Software-based random-noise generator
- Digital transfer functions and waveform modification
- Generating echo and reverberation
- Historical records and circular buffers
- Anti-aliasing filters and filtering the D-to-A output
- Quantization noise
- Simulating audio reverberation
- Special audio effects
- Chapter 11: Investigating the spectral and time-domain performance of z-transforms using computer-managed instruction
- Chapter 12: Introduction to digital signal processing
-
Chapter 13: Standard programming structures
- Introduction
- Modular design
- The internal structure of modules
- Standard programming structures
- Eight different ways to convert temperature in Celsius to Fahrenheit using C-based code
- The sequence construct
- Using the pre-processor directive
- The repetition construct
- Branching and looping
- Writing functions in C
- Commentary
- Using purpose-built I/O functions – Peeking and Poking
- Using the functions peek() and peekb()
- Using the functions poke() and pokeb()
- Port-mapped data transfer
- Input circuit
- Output circuit
- Computer part of the problem
- Microsoft C I/O calls
- Turbo C I/O calls
- Appendix 1
- Appendix 2: Listings of programs described in Chapter 11
- Glossary
- Index
Product information
- Title: Interfacing with C, 2nd Edition
- Author(s):
- Release date: December 2000
- Publisher(s): Newnes
- ISBN: 9780080574356
You might also like
book
Signal Processing in C
Signal Processing in C Written by experts in the field, this invaluable guide provides you with …
book
C Recipes: A Problem-Solution Approach
Solve your C programming problems with practical and informative recipes. This book covers various aspects of …
book
Intermediate C Programming for the PIC Microcontroller: Simplifying Embedded Programming
Delve into the exciting world of embedded programming with PIC microcontrollers in C. The key to …
book
Pointers in C: A Hands on Approach
Pointers in C provides a resource for professionals and advanced students needing in-depth but hands-on coverage …