Skip to Content
Making Embedded Systems, 2nd Edition
book

Making Embedded Systems, 2nd Edition

by Elecia White
March 2024
Intermediate to advanced
428 pages
12h 6m
English
O'Reilly Media, Inc.
Audio summary available
Content preview from Making Embedded Systems, 2nd Edition

Chapter 4. Inputs, Outputs, and Timers

Inputs, outputs, and timers form the basis for almost everything embedded systems do. Even the communication methods to talk to other components are made up of these (see bit-bang drivers in Chapter 7). In this chapter, I’m going to walk through a product development example. The goals will constantly change so it will feel like real life. That also lets us explore how to go from a simple system of a blinking light to debouncing buttons and dimming LEDs. Along the way, we’ll see a lot about timers and how they do much more than measure time.

However, before we get started with world domination, err, I mean product development, you need to know a bit about registers, the interface from your software to the processor.

Handling Registers

To do anything with an I/O line, we need to talk to the appropriate register. As described in “Your Processor Is a Language”, you can think of registers as an API to the hardware. Described in the chip’s user manual, registers come in all flavors to configure the processor and control peripherals. They are memory-mapped, so you can write to a specific address to modify a particular register. Often each bit in the register means something specific, which means we need to start using binary numbers to look at the values of specific bits.

Binary and Hexadecimal Math

Becoming familiar with basic binary and hexadecimal (hex) math will make your career in embedded systems far more enjoyable. Shifting individual ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Making Embedded Systems

Making Embedded Systems

Elecia White

Publisher Resources

ISBN: 9781098151539Errata PageSupplemental Content