pic32mx320f064h Microchip Technology Inc., pic32mx320f064h Datasheet - Page 435

no-image

pic32mx320f064h

Manufacturer Part Number
pic32mx320f064h
Description
64/100-pin General Purpose, 32-bit Flash Microcontrollers
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
pic32mx320f064h-40V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064hT-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
The start time for sampling can be controlled in soft-
ware by setting the SAMP control bit. The start of the
sampling time can also be controlled automatically by
the hardware. When the A/D converter operates in the
Auto-Sample mode, the SHA is reconnected to the
analog input pin at the end of the conversion in the
sample/convert sequence. The auto-sample function is
controlled by the ASAM control bit (AD1CON1<2>).
The conversion trigger source ends the sampling time
and begins an A/D conversion or a sample/convert
sequence. The conversion trigger source is selected by
the control bits SSRC<2:0> (AD1CON1<7:5>). The
conversion trigger can be taken from a variety of hard-
ware sources, or can be controlled manually in soft-
ware by clearing the SAMP control bit. One of the
conversion trigger sources is an auto-conversion. The
time between auto-conversions is set by a counter and
the ADC clock. The Auto-Sample mode and auto-con-
version trigger can be used together to provide endless
automatic conversions without software intervention.
An interrupt may be generated at the end of each sam-
ple sequence or multiple sample sequences as deter-
mined
(AD1CON2<5:2>). The number of sample sequences
between interrupts can vary between 1 and 16. The
user should note that the A/D conversion buffer holds
the results of a single conversion sequence. The next
sequence starts filling the buffer from the top even if the
number of samples in the previous sequence was less
than 16. The total number of conversion results
between interrupts is the SMPI value. The total number
of conversions between interrupts cannot exceed the
physical buffer length.
22.3
Operation of the ADC module is directed through bit
settings in the appropriate registers. The following
instructions summarize the actions and the settings.
Options and details for each configuration step are
provided in subsequent sections.
1.
© 2007 Microchip Technology Inc.
To configure the ADC module, perform the
following steps:
A-1. Configure analog port pins in
B-1. Select the analog inputs to the ADC MUXs in
C-1. Select the format of the ADC result using
ADC Module Configuration
by
AD1PCFG<15:0>, as described in Section
22.3.1 “Configuring Analog Port Pins”.
AD1CHS<32:0>, as described in Section
22.3.2 “Selecting the Analog Inputs to the
ADC MUXs”.
FORM<2:0> (AD1CON1<10:8>), as
described in Section “The data in the ADC
Result register can be read as one of eight
formats. The format is controlled by
FORM<2:0> (AD1CON1<10:8>). The user
the
value
of
the
SMPI<3:0>
Advance Information
2.
3.
Note:
C-2. Select the sample clock source using
D-1. Select the voltage reference source using
D-2. Select the Scan mode using CSCNA
D-3. Set the number of conversions per interrupt
D-4. Set Buffer Fill mode using BUFM
D-5. Select the MUX to be connected to the ADC
E-1. Select the ADC clock source using ADRC
E-2. Select the sample time using SAMC<4:0>
E-3. Select the ADC clock prescaler using
F.
To configure ADC interrupt (if required).
A-1. Clear AD1IF bit (IFS1<1>), as described in
A-2. Select ADC interrupt priority AD1IP<2:0>
Start the conversion sequence by initiating
PIC32MX FAMILY
Turn on ADC module using AD1CON1<15>,
can select from integer, signed integer,
fractional or signed fractional as a 16-bit
or 32-bit result.”.
SSRC<2:0> (AD1CON1<7:5>), as described
in Section 22.3.3.1 “Selecting the Sample
Clock Source”.
VCFG<2:0> (AD1CON2<15:13>), as
described in Section 22.3.6 “Selecting the
Voltage Reference Source”.
(AD1CON2<10>), as described in Section
22.3.7 “Selecting the Scan Mode”.
SMPI<3:0> (AD1CON2<5:2>), if interrupts
are to be used, as described in Section
22.3.8 “Setting the Number of Conver-
sions per Interrupt”.
(AD1CON2<1>), as described in Section
22.3.9 “Buffer Fill Mode”.
in ALTS (AD1CON2<0>), as described in
Section 22.3.10 “Selecting the MUX to be
Connected to the ADC (Alternating Sam-
ple Mode)”.
(AD1CON3<15>), as described in Section
22.3.11 “Selecting the ADC Conversion
Clock Source and Prescaler”.
(AD1CON3<12:8>), if auto-convert is to be
used, as described in Section 22.3.12
“Acquisition Time Considerations”.
ADCS<7:0> (AD1CON3<7:0>), as described
in Section 22.3.11 “Selecting the ADC
Conversion Clock Source and Prescaler”.
as described in Section 22.3.13 “Turning
the ADC On”.
Section 9.0 “Interrupts”.
(IPC<28:26>) and sub priority AD1IS<1:0>
(IPC<24:24>), as described in Section 9.0
“Interrupts”, if interrupts are to be used.
Steps A through E, above, can be per-
formed in any order, but Step F must be
the final step in every case.
DS61143A-page 433

Related parts for pic32mx320f064h