EmbeddedRelated.com
Books

Programming Microcontrollers in C

VanSickle, Ted ● 2001

Ted Van Sickle spent over fifteen years at Motorola as a microcontroller specialist. He now consults and teaches classes on software design and programming for microcontroller systems. He holds a MSEE from the University of Michigan.

Introduces microcontrollers and describes their programming environment, offering tips on coding for microcontrollers
Describes techniques to get maximum performance from your code
Discusses the differences between 8-bit and larger microcontrollers, giving application examples and providing details on using different compilers


Why Read This Book

You will get a practical, no-nonsense guide to writing efficient C for microcontrollers from an author with decades of Motorola experience. The book emphasizes real-world techniques — compiler quirks, performance tricks, and differences between 8-bit and larger MCUs — so you can write firmware that actually fits timing, memory, and cost constraints.

Who Will Benefit

Embedded software engineers and firmware developers with basic C knowledge who need pragmatic guidance on programming small microcontrollers, squeezing performance from constrained hardware, and choosing compiler/toolchain approaches.

Level: Intermediate — Prerequisites: Basic C programming, familiarity with digital logic and basic electronics, and a general understanding of microcontroller concepts (I/O, memory, interrupts).

Get This Book

Key Takeaways

  • Write idiomatic, memory- and CPU-efficient C that suits small microcontroller architectures
  • Optimize critical routines and understand trade-offs between speed, size, and maintainability
  • Interface C code with device registers, peripherals, and assembly when needed
  • Distinguish practical differences between 8-bit and larger 16/32-bit microcontrollers and choose appropriate patterns
  • Select and use common embedded toolchain components (compilers, assemblers, debuggers) effectively
  • Apply debugging and testing strategies tailored to resource-constrained embedded systems

Topics Covered

  1. 1. Introduction to Microcontrollers and the Embedded Environment
  2. 2. The C Programming Environment for Microcontrollers
  3. 3. Data Types, Memory Models, and Compiler Choices
  4. 4. I/O, Memory-Mapped Registers, and Peripheral Access
  5. 5. Timing, Delays, and Low-Level Hardware Control
  6. 6. Interrupts and Real-Time Programming Patterns
  7. 7. Interfacing and Embedded I/O (A/D, D/A, UART, SPI, I2C)
  8. 8. Optimization Techniques: Code Size, Speed, and Power
  9. 9. 8-bit vs 16/32-bit MCUs: Architectural Differences and Case Studies
  10. 10. Mixed C and Assembly Programming
  11. 11. Toolchains, Debugging, and In-Circuit Emulation
  12. 12. Example Applications, Porting, and Practical Tips

Languages, Platforms & Tools

CAssembly (examples and interfacing)8-bit microcontrollers (e.g., Motorola 68HC11/HC12-style architectures)16/32-bit microcontrollers (discussed conceptually; migration/porting guidance)General embedded hardware (memory-mapped I/O, common peripherals)Embedded C compilers (vendor compilers such as Keil/IAR and generic compilers like GCC)Assemblers and linkersDebuggers, in-circuit emulators (ICE), and logic analyzers

How It Compares

Compared with Michael J. Pont's Embedded C (more recent practical patterns) and Michael Barr's Programming Embedded Systems (broader system-level coverage), VanSickle's book is more focused on low-level C techniques and 8-bit-to-larger MCU pragmatic trade-offs.

Related Books