NU32v2: Simple Analog Input
THIS PAGE REFERS TO A PRE-RELEASE VERSION OF THE NU32 PIC32 DEVELOPMENT BOARD. FOR INFORMATION, SAMPLE CODE, AND VIDEOS RELATED TO THE PRODUCTION VERSION (2016 AND LATER), AND TO THE CORRESPONDING BOOK "EMBEDDED COMPUTING AND MECHATRONICS WITH THE PIC32 MICROCONTROLLER," VISIT THE NU32 PAGE.
Analog-to-Digital Conversion (ADC) is a useful capability of many PIC microcontrollers. This ADC produces a digital value based on the supplied analog voltage, which can then be used with the digital logic of the rest of the PIC. The PIC32 converts analog inputs in the range 0-3.3V to digital values between 0 and 1023 (10-bit resolution).
Available Pins
The PIC32MX795F512L has 16 available analog pins denoted ANX on the pin list, where x is from 0 to 15. The pins are broken out to the B port on the NU32v2 board.
Analog Inputs Example
This section uses an example to describe how to set up and read analog inputs using the PIC32MX795F512L on the NU32v2.