Chapter 7

Digital Input and Output

Abstract

This chapter covers digital inputs and outputs on the PIC32, including open-drain outputs and change-notification digital inputs that generate interrupts when the input transitions from low to high or vice-versa. The chapter describes the special function registers (SFRs) that control the digital input and output peripherals. Sample code is given that implements a change notification interrupt and that configures some pins as digital inputs, some as analog inputs, some as digital outputs, and some as open-drain digital outputs.

Keywords

Digital input

Digital output

Change notification interrupt

Open drain

Digital inputs and outputs (DIO) are the simplest interfaces between the PIC32 and other electronics, ...

Get Embedded Computing and Mechatronics with the PIC32 Microcontroller now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.