EasyManua.ls Logo

Microchip Technology dsPIC30F - Page 409

Microchip Technology dsPIC30F
738 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
© 2004 Microchip Technology Inc. DS70064C-page 17-33
Section 17. 10-bit A/D Converter
10-bit A/D
Converter
17
17.15.2 Example: A/D Conversions While Scanning Through All Analog Inputs
Figure 17-15 and Table 17-3 illustrate a very typical setup where all available analog input
channels are sampled by one sample and hold channel, CH0, and converted. The set CSCNA
bit specifies scanning of the A/D inputs to the CH0 positive input. Other conditions are similar to
Subsection 17.15.1.
Initially, the AN0 input is sampled by CH0 and converted. The result is stored in the ADCBUF
buffer. Then the AN1 input is sampled and converted. This process of scanning the inputs
repeats 16 times until the buffer is full and then the module generates an interrupt. The entire
process will then repeat.
Figure 17-15: Scanning Through 16 Inputs/Interrupt
ADCLK
SAMP
ADCBUF0
TSAMP
TCONV
BSET ADCON1,#ASAM
Instruction Execution
ADCBUF1
DONE
ADCBUFE
ADCBUFF
Input to CH0
AN0
TSAMP
TCONV
AN1
TSAMP
TCONV
AN14
TSAMP
TCONV
AN15
ADIF
ASAM
Conversion
Trigger

Table of Contents

Other manuals for Microchip Technology dsPIC30F