EasyManua.ls Logo

Microchip Technology dsPIC30F - Conversion Sequence Examples

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. DS70065C-page 18-21
Section 18. 12-bit A/D Converter
12-bit A/D
Converter
18
18.14 Conversion Sequence Examples
The following configuration examples show the A/D operation in different sampling and buffering
configurations. In each example, setting the ASAM bit starts automatic sampling. A conversion
trigger ends sampling and starts conversion.
18.14.1 Example: Sampling and Converting a Single Channel Multiple Times
Figure 18-9 and Table 18-1 illustrate a basic configuration of the A/D. In this case, one A/D input,
AN0, will be sampled and converted. The results are stored in the ADCBUF buffer. This process
repeats 16 times until the buffer is full and then the module generates an interrupt. The entire
process will then repeat.
With ALTS clear, only the MUX A inputs are active. The CH0SA bits and CH0NA bit are specified
(AN0-V
REF-) as the input to the sample/hold channel. All other input selection bits are not used.
Figure 18-9: Converting One Channel 16 Times/Interrupt
Conversion
ADCLK
SAMP
ADCBUF0
TSAMP
TCONV
BSF ADCON1,ASAM
Instruction Execution
ADCBUF1
DONE
ADCBUFE
ADCBUFF
Input to CH0
AN0
TSAMP
TCONV
AN0
TSAMP
TCONV
AN0
TSAMP
TCONV
AN0
ADIF
ASAM
Trigger

Table of Contents

Other manuals for Microchip Technology dsPIC30F