Introduction

Author: Ioan Pop, Microchip Technology Inc.

The Analog-to-Digital Converter with Computation (ADCC) peripheral converts an analog voltage value into a 10-bit numerical value and offers different computational actions that can be performed on the result such as averaging or low-pass filtering. The code examples in this technical brief also apply to other PIC18 families of devices that feature a 12-bit ADCC.

For each use case, there are two different implementations which have the same functionalities: one code generated with MPLAB® Code Configurator (MCC) and one bare metal code. The MCC-generated code offers hardware abstraction layers that ease the use of the code across different devices from the same family. The bare metal code is easier to follow, allowing a fast ramp-up on the use case associated code.

This technical brief describes the application area, the modes of operation and the hardware and software requirements of the Analog-to-Digital Converter with Computation. It covers the following use cases:

Note: The examples in this technical brief have been developed using the PIC18F47Q10 Curiosity Nano development board. The PIC18F47Q10 pin package present on the board is QFN.