Embedded systems interfacing for engineers using the Freescale HCS08 microcontroller. II, Digital and analog hardware interfacing

The vast majority of computers in use today are encapsulated within other systems. In contrast to general-purpose computers that run an endless selection of software, these embedded computers are often programmed for a very specific, low-level and often mundane purpose. Low-end microcontrollers, cos...

Full description

Bibliographic Details
Main Author: Summerville, Douglas H.
Format: Electronic
Language:English
Published: San Rafael, Calif. (1537 Fourth Street, San Rafael, CA 94901 USA) : Morgan & Claypool Publishers, c2009.
Series:Synthesis lectures on digital circuits and systems (Online), # 22.
Subjects:
Online Access:Abstract with links to full text
Table of Contents:
  • Introduction to the MC9S08QG4/8 hardware
  • Input/output basics
  • Pin diagrams
  • Memory-mapped I/O
  • I/O synchronization
  • Device drivers
  • A MC9S08QG4/8 skeleton program
  • System configuration registers
  • Computer operating properly (COP) watchdog
  • Interrupt vector table
  • HCS08 modes of operation
  • Program skeleton for the MC9S08QG4/8
  • General-purpose digital I/O
  • General purpose I/O on the MC9S08QG4/8
  • Electrical specifications
  • Switch input interface
  • Switch bounce
  • LED indicators
  • Emulation of open-drain and tri-state outputs
  • Interrupt synchronization
  • HCS08 CPU interrupt processing
  • IRQ interrupt pin
  • Keyboard interrupt
  • Chapter problems
  • Analog input
  • Analog to digital conversion
  • ADC basics
  • Converting ADC output to fixed-point
  • ADC on the MC9S08QG4/8
  • MC9S08QG4/8 ADC I/O interface registers
  • Driver examples for the MC9S08QG4/8 ADC
  • Basic 8-bit single-pin polled I/O driver
  • Basic 10-Bit Single Conversion with Software Selectable Pin
  • Interrupt-Based 8-Bit Driver
  • Multiple ADC pin scanning using interrupt-based driver
  • Bit polled driver with compare function
  • Bit interrupt-based driver with compare function
  • Bit interrupt-based driver with hysteresis
  • Analog comparator
  • Analog comparator on the MC9S08QG4/8
  • Analog comparator driver examples
  • DC voltage monitoring
  • Analog signal to digital waveform generation
  • Hardware switch debouncing using the analog comparator
  • Chapter problems
  • Serial communication
  • Serial communication interface
  • MC9S08QG8 SCI
  • SCI driver examples
  • Polled-I/O full-duplex SCI driver
  • Interrupt-based ring-buffered SCI simplex (receive-only) driver
  • Interrupt-based ring-buffered SCI simplex (transmit) driver
  • Serial peripheral interface (SPI)
  • MC9S08GQ8 SPI
  • MC9S08QG8 SPI driver examples
  • Full-duplex 8-bit polled-I/O SPI driver
  • Simplex 16-bit polled-I/O SPI driver
  • Inter-integrated circuit (IIC)
  • MC9S08QG8 IIC
  • IIC driver examples
  • Generic IIC driver for devices with simple read/write behavior
  • Driver for an Atmel AT24C02B EEPROM interfaced via the IIC bus
  • Chapter problems
  • Real-time I/O processing
  • Real-time interrupt
  • MC9S08QG4/8 real-time interrupt module
  • Periodic system wakeup using the real time interrupt
  • Modulo timer module (MTIM)
  • Generating delays with the MTIM
  • Non-blocking software delays using the MTIM
  • Pulse width modulation
  • MC9S08QG4/8 TPM
  • TPM variable duty cycle driver
  • Chapter problems.