EasyManua.ls Logo

Microchip Technology dsPIC30F - Page 454

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...
dsPIC30F Family Reference Manual
DS70065C-page 18-24 © 2004 Microchip Technology Inc.
18.14.2 Example: A/D Conversions While Scanning Through All Analog Inputs
Figure 18-10 and Table 18-2 illustrate a typical setup, where all available analog input channels
are sampled and converted. The set CSCNA bit specifies scanning of the A/D inputs to the CH0
positive input. Other conditions are similar to Subsection 18.14.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 18-10: Scanning Through 16 Inputs/Interrupt
Conversion
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
Trigger

Table of Contents

Other manuals for Microchip Technology dsPIC30F