EmbeddedRelated.com
Books

Programming Microcontrollers in C

Ted Van Sickle ● 1994

Author shows you how to fully utilize the C language to exploit the power of today's advanced microcontrollers through extensive programming examples drawn from typical applications. Paper.


Why Read This Book

You should read this book if you want a hands-on, example-driven guide to using C as a true systems language for microcontrollers — not just for algorithms but to directly control hardware. You will learn practical idioms, tricks for efficient low-level coding, and real application examples that show how to map C onto timers, interrupts, serial ports, and memory-constrained targets.

Who Will Benefit

Embedded firmware engineers and hobbyists with some C and electronics background who want to write efficient, hardware-near code for 8/16-bit microcontrollers and learn practical application patterns.

Level: Intermediate — Prerequisites: Basic C programming (variables, control flow, functions), elementary digital electronics (logic levels, basic circuits), and some familiarity with microcontroller concepts (I/O pins, datasheets).

Get This Book

Key Takeaways

  • Write portable C that directly controls microcontroller peripherals and memory-mapped I/O.
  • Map data types and memory models to constrained microcontroller architectures for correct, efficient code.
  • Implement interrupt-driven designs and understand interrupt-safety and reentrancy in C.
  • Interface common peripherals (timers, UART, ADC, PWM) using idiomatic C patterns.
  • Optimize for code size and speed through C-level techniques and selective assembly mixing.
  • Debug and structure real application examples drawn from typical embedded tasks (control, sensing, comms).

Topics Covered

  1. Introduction: C for Microcontrollers — goals and constraints
  2. Microcontroller architectures and C data models
  3. C language essentials for embedded systems (types, storage, scope)
  4. Compilers, linkers, and toolchain considerations for cross development
  5. Bitwise operations, I/O mapping, and port manipulation techniques
  6. Timers, counters, and real-time control in C
  7. Interrupts and interrupt-safe programming patterns
  8. Serial communications and peripheral interfaces (UART, SPI, I2C)
  9. Analog I/O, ADC/DAC, and PWM control
  10. Memory: RAM, ROM, EEPROM, and nonvolatile data management
  11. Optimization: code size, speed, and compiler-aware techniques
  12. Mixing C and assembly; startup code and vector tables
  13. Application examples and case studies
  14. Appendices: datasheet reading, example code listings, reference tables

Languages, Platforms & Tools

CAssembly (examples)Generic 8/16-bit microcontrollers (examples relevant to families like 8051, 68HC11, early PICs)Cross-compilers and toolchains (vendor C compilers), assemblers/linkers, in-circuit debuggers, logic analyzers

How It Compares

Compared with Michael J. Pont's Embedded C or Barr & Massa's Programming Embedded Systems, Van Sickle's 1994 title is more example-driven for classical 8/16-bit microcontrollers and focuses tightly on C techniques rather than modern 32-bit ARM or RTOS-heavy designs.

Related Books