0% found this document useful (0 votes)
9 views8 pages

Lec2 DC Shortcut

The document discusses the Analog-to-Digital Converter (ADC) in the PIC 18F452 microcontroller, detailing its function of converting analog signals into digital numbers for CPU processing. It explains the setup of registers ADCON0 and ADCON1 for channel selection and conversion speed, as well as the successive approximation method used in the conversion process. Additionally, it highlights the importance of acquisition time for optimal conversion accuracy and the format of the conversion result.

Uploaded by

Noora Kamal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views8 pages

Lec2 DC Shortcut

The document discusses the Analog-to-Digital Converter (ADC) in the PIC 18F452 microcontroller, detailing its function of converting analog signals into digital numbers for CPU processing. It explains the setup of registers ADCON0 and ADCON1 for channel selection and conversion speed, as well as the successive approximation method used in the conversion process. Additionally, it highlights the importance of acquisition time for optimal conversion accuracy and the format of the conversion result.

Uploaded by

Noora Kamal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Lecture 2

PIC Controller Analog Module


By: Assist. Lec. Noora Nazar
PIC ADC
• Analog-to-Digital Converter (ADC) is a circuit that transforms continuous signals into
digital numbers. It converts analog values, like voltages, into binary numbers, sending them
to the CPU for processing. This conversion process, involves:

1) complex resistor networks

2) dividing input voltages into discrete levels

3) providing the result as a digital number.


PIC 18F452 ADC
• The PIC 18F452 microcontroller has 8
channels (AN0-AN7). for taking in
analog signals.

• The pins handling these signals are also


used for other tasks, so we need to set
certain registers to make them work as
analog inputs.

• These registers enable the


microcontroller to measure voltage on
the pin and turn it into a digital value.
ADC Process
• How ADC work in this microcontroller?

1) Setting registers ADCON0 & ADCON1


which are multiplexed for data pin selection.
A
D
2) Successive approximation method used C
O
in A/D converter changes an analog signal 0
&
into a 10-bit binary 1

3) The converted data is stored in ADC


ADCON0 & ADCON1 Registers
• The ADCON0 register selects two main things:

1) which channel or pin to use to sample the analog signal.

2) the speed of conversion.


ADCON0

Determine the TAD Chanel Select are three bits which Activate the ADC
(Acquisition time ). select the I/O pin to sample. module

Setting bit to 1 initiates the ADC conversion, and it stays at 1 during the
conversion. After the conversion is complete, and the data saved in ADRESH/L
registers, the bit is 0

**Acquisition time is the necessary delay (20 microseconds), required to ensure optimal conversion accuracy
after selecting or changing the analog input. It depends on the source impedance.
ADCON1

Determine the TAD Determine which pins are programmed


(Acquisition time ). for analog use.
• The ADFM bit of the ADCON1 register determines the format of conversion result, In order
to deal with this value easier, it can appear in two formats- left justified and right justified.

A
D
C
O
0
&
1

You might also like