Skip to Content
Embedded C Programming
book

Embedded C Programming

by Mark Siegesmund
September 2014
Beginner to intermediate
424 pages
10h 4m
English
Newnes
Content preview from Embedded C Programming
Chapter 16

Discrete Input and Output

Abstract

This chapter teaches the reader how to perform basic level-based digital I/O from C on a microcontroller. This essentially is setting an output pin to a high or low state or reading the state of an input pin.

In addition to the functions needed in C, some basic electronic concepts are covered such as voltages and drive current. Debouncing and filtering inputs are shown, with code examples and diagrams. TTL, Schmitt trigger, and open collector I/O pins are all described. An example is also included that shows mapping an entire I/O port to a C structure.

Examples and exercises are for the popular PIC® microcontroller manufactured by Microchip.

Keywords

Discrete I/O

Debouncing

Filtering

TTL

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

Practical C Programming

Practical C Programming

B. M. Harwani

Publisher Resources

ISBN: 9780128013144