PIC18F4520: Analog Inputs

From Mech
Jump to navigationJump to search

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.

Available Pins

The PIC18F4520 has 13 pins that act as ADCs (shown below). The pins in red are analog inputs, while the pins

Analog Input Example (ADC)

Sample Code

Circuit Diagram