PIC18F25J11-I/PT MICROCHIP [Microchip Technology], PIC18F25J11-I/PT Datasheet - Page 379

no-image

PIC18F25J11-I/PT

Manufacturer Part Number
PIC18F25J11-I/PT
Description
28/44-Pin, Low-Power, High-Performance Microcontrollers with nanoWatt XLP Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
24.3.2
There is a small amount of capacitance from the inter-
nal A/D Converter sample capacitor as well as stray
capacitance from the circuit board traces and pads that
affect the precision of capacitance measurements. A
measurement of the stray capacitance can be taken by
making sure the desired capacitance to be measured
has been removed. The measurement is then
performed using the following steps:
1.
2.
3.
4.
5.
6.
where I is known from the current source measurement
step, t is a fixed delay and V is measured by performing
an A/D conversion.
This measured value is then stored and used for
calculations of time measurement or subtracted for
capacitance measurement. For calibration, it is
expected that the capacitance of C
approximately known. C
© 2009 Microchip Technology Inc.
Initialize the A/D Converter and the CTMU.
Set EDG1STAT (= 1).
Wait for a fixed delay of time t.
Clear EDG1STAT.
Perform an A/D conversion.
Calculate the stray and A/D sample capacitances:
C
OFFSET
CAPACITANCE CALIBRATION
=
C
STRAY
AD
is approximately 4 pF.
+
C
AD
=
(
I t ⋅
STRAY
) V ⁄
+ C
AD
is
PIC18F46J11 FAMILY
An iterative process may need to be used to adjust the
time, t, that the circuit is charged to obtain a reasonable
voltage reading from the A/D Converter. The value of t
may be determined by setting C
value, then solving for t. For example, if C
theoretically calculated to be 11 pF, and V is expected
to be 70% of V
or 63 μs.
See Example 24-3 for a typical routine for CTMU
capacitance calibration.
(4 pF + 11 pF) • 2.31V/0.55 μA
DD
, or 2.31V, then t would be:
OFFSET
DS39932C-page 379
to a theoretical
STRAY
is

Related parts for PIC18F25J11-I/PT