Difference between revisions of "PIC18F4520: Analog Inputs"

From Mech
Jump to navigationJump to search
Line 1: Line 1:
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.
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==
==Available Pins==
The PIC18F4520 has 13 pins that act as ADCs (shown below). The pins in red are analog inputs, while the pins
The PIC18F4520 has 13 pins that act as ADCs (shown below). The red pins can be used as analog inputs, while the grey are usually committed to communication or power.
<br><br>
[[Image:4520pindiagramADC.jpg|center]]


==Analog Input Example (ADC)==
==Analog Input Example (ADC)==

Revision as of 11:59, 27 June 2007

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 red pins can be used as analog inputs, while the grey are usually committed to communication or power.

4520pindiagramADC.jpg

Analog Input Example (ADC)

Sample Code

Circuit Diagram