English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (510/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
22.3.15 500 KSPS CONFIGURATION
GUIDELINE
The configuration for 500 ksps operation is dependent
on whether a single input pin or multiple pins will be
sampled.
22.3.15.1 500 ksps Configuration Procedure
The following configuration items are required to
achieve a 500 ksps conversion rate.
• Connect external VREF+ and VREF- pins following
the recommended circuit shown in Figure 22-4.
• Set SSRC<2:0> = 111 in the AD1CON1 register
to enable the auto convert option.
• Enable automatic sampling by setting the ASAM
control bit in the AD1CON1 register.
• Configure the ADC clock period by writing an
ADCS value = 2 to the ADCS<5:0> control bits in
the AD1CON3 register. Use the following formula:
FIGURE 22-3:
500 KSPS SAMPLE RATE CALCULATIONS
System clock of 80MHz and PBDIV = 2
TPB = ⎝⎛8---0----M-1----H-----z-⎠⎞ • 2 = 25ns
----1----ksps = 2us period
500
Calculate number clocks required:
sample clocks = 2 (See Table 22-3)
therefore SAMPC = 1
convert = 12 ADC clock periods (See
Section 22.2.1)
sample clocks + convert clocks = adclks = 14
Calculate ADC clock period:
2----u---s- = 143ns = TAD (ADC clock period)
14
-----1---4---3----n---s----- = 5.71 (Desired ADC clock divisor)
⎛
⎝
4----0---M-1----H-----z-⎠⎞
Calculate desired ADCS value from result
5.71 = (ADCS + 1) • 2 results in 1.85
closest higher value = 2
closest lower value 1
Calculate Actual sample rate:
ADC Clock divisor • adclks • TPB
Using ADCS = 1:
(---(--(---A----D-----C----S----+-----1----)---•---1--2---)---•-----1---4---)----•----2---5---n----s---) = 714ksps
(exceeds device specifications)
Using ADCS = 2: results = 476 ksps
Conclusion: Select ADCS of 2
• Configure the sampling time to be 2 TAD by
writing: SAMC<4:0> = 00010.
DS61143E-page 508
Preliminary
© 2008 Microchip Technology Inc.