pic32mx320f064h Microchip Technology Inc., pic32mx320f064h Datasheet - Page 436

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
PIC32MX FAMILY
22.3.1
The AD1PCFG register and the TRISB register control
the operation of the ADC port pins.
AD1PCFG specifies the configuration of device pins to
be used as analog inputs. A pin is configured as an
analog input when the corresponding PCFGn bit
(AD1PCFG<n>) = 0. When the bit = 1, the pin is set to
digital control. When configured for analog input, the
associated port I/O digital input buffer is disabled so it
does not consume current. The AD1PCFG register is
cleared at Reset, causing the ADC input pins to be
configured for analog input by default at Reset.
TRIS registers control the digital function of the port
pins. The port pins that are desired as analog inputs
must have their corresponding TRIS bit set, specifying
the pin as an input. If the I/O pin associated with an
ADC input is configured as an output, the TRIS bit is
cleared and the ports digital output level (V
will be converted. After a device Reset, all TRIS bits are
set.
22.3.2
The AD1CHS register is used to select which analog
input pin is connected to MUX A and MUX B. Each
MUX has two inputs referred to as the positive and the
negative input. The positive input to MUX A is con-
trolled by CH0SA<4:0> and the negative input is con-
trolled by CH0NA. The positive input for MUX B is
controlled by CH0SB<4:0> and the negative input is
controlled by CH0NB.
The positive input can be selected from any one of the
available analog input pins. The negative input can be
selected as the ADC negative reference or AN0. The
use of AN0 as the negative input allows the ADC to be
used in a Unipolar Differential mode. Refer to the
device data sheet for AN0 input voltage restrictions
when used as a negative reference.
DS61143A-page 434
Notes:
sampling, as described in Section 22.3.14 “Ini-
tiating Sampling”.
CONFIGURING ANALOG PORT
PINS
When reading a PORT register that
shares pins with the ADC, any pin config-
ured as an analog input reads as a ‘0’
when the PORT latch is read.
Analog levels on any pin that is defined as
a digital input (including the AN15:AN0
pins), but is not configured as an analog
input, may cause the input buffer to con-
sume current that is out of the device’s
specification.
SELECTING THE ANALOG INPUTS
TO THE ADC MUXS
OH
Advance Information
or V
OL
)
22.3.3
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 can select
from integer, signed integer, fractional or signed
fractional as a 16-bit or 32-bit result.
22.3.3.1
It is often desirable to synchronize the end of sampling
and the start of conversion with some other time event.
The ADC module may use one of four sources as a
conversion trigger. The selection of the conversion trig-
ger
(AD1CON1<7:5>) bits.
22.3.3.2
To configure the ADC to end sampling and start a con-
version when SAMP is cleared (= 0), SSRC is set to
‘000’.
22.3.3.3
The ADC is configured for this Trigger mode by setting
SSRC<2:0> = 010. When a period match occurs for
the 32-bit timer, TMR3/TMR2, or the 16-bit Timer3, a
special A/D converter trigger event signal is generated
by Timer3.
source
SELECTING THE FORMAT OF THE
ADC RESULT
Selecting the Sample Clock Source
Manual Conversion
Timer Compare Trigger
is
controlled
© 2007 Microchip Technology Inc.
by
the
SSRC<2:0>

Related parts for pic32mx320f064h