PIC18F45K22-I/P Microchip Technology Inc., PIC18F45K22-I/P Datasheet - Page 325

no-image

PIC18F45K22-I/P

Manufacturer Part Number
PIC18F45K22-I/P
Description
40 PDIP .600in TUBE, 32KB, Flash, 1536bytes-RAM, 8-bit Family, nanoWatt XLP
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC18F45K22-I/P

A/d Inputs
28-Channel, 10-Bit
Comparators
2
Cpu Speed
16 MIPS
Eeprom Memory
256 Bytes
Input Output
35
Interface
I2C/SPI/UART/USART
Memory Type
Flash
Number Of Bits
8
Package Type
40-pin PDIP
Programmable Memory
32K Bytes
Ram Size
1.5K Bytes
Speed
64 MHz
Temperature Range
–40 to 125 °C
Timers
3-8-bit, 4-16-bit
Voltage, Range
1.8-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F45K22-I/P
Manufacturer:
MICROCHIP
Quantity:
3 400
Part Number:
PIC18F45K22-I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F45K22-I/PT
Manufacturer:
SST
Quantity:
3 400
Part Number:
PIC18F45K22-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18F45K22-I/PT
Manufacturer:
MIC
Quantity:
20 000
Part Number:
PIC18F45K22-I/PT
0
Company:
Part Number:
PIC18F45K22-I/PT
Quantity:
20 400
19.4
There are two separate methods of measuring
capacitance with the CTMU. The first is the absolute
method, in which the actual capacitance value is
desired. The second is the relative method, in which
the actual capacitance is not needed, rather an
indication of a change in capacitance is required.
19.4.1
For absolute capacitance measurements, both the
current and capacitance calibration steps found in
Section 19.3 “Calibrating the CTMU Module”
should be followed. Capacitance measurements are
then performed using the following steps:
1.
2.
3.
4.
5.
6.
7.
8.
 2010 Microchip Technology Inc.
Initialize the A/D Converter.
Initialize the CTMU.
Set EDG1STAT.
Wait for a fixed delay, T.
Clear EDG1STAT.
Perform an A/D conversion.
Calculate the total capacitance, C
where I is known from the current source
measurement step (see
Source
measured by performing an A/D conversion.
Subtract the stray and A/D capacitance
(C
Calibration”) from C
measured capacitance.
OFFSET
Measuring Capacitance with the
CTMU
ABSOLUTE CAPACITANCE
MEASUREMENT
Calibration”), T is a fixed delay and V is
from
Section 19.3.2 “Capacitance
TOTAL
Section 19.3.1 “Current
to determine the
TOTAL
= (I * T)/V,
Preliminary
19.4.2
An application may not require precise capacitance
measurements. For example, when detecting a valid
press of a capacitance-based switch, detecting a rela-
tive change of capacitance is of interest. In this type of
application, when the switch is open (or not touched),
the total capacitance is the capacitance of the combi-
nation of the board traces, the A/D Converter, etc. A
larger voltage will be measured by the A/D Converter.
When the switch is closed (or is touched), the total
capacitance is larger due to the addition of the
capacitance of the human body to the above listed
capacitances, and a smaller voltage will be measured
by the A/D Converter.
Detecting capacitance changes is easily accomplished
with the CTMU using these steps:
1.
2.
3.
4.
5.
The voltage measured by performing the A/D
conversion is an indication of the relative capacitance.
Note that in this case, no calibration of the current
source or circuit capacitance measurement is needed.
See
capacitive touch switch.
PIC18(L)F2X/4XK22
Initialize the A/D Converter and the CTMU.
Set EDG1STAT.
Wait for a fixed delay.
Clear EDG1STAT.
Perform an A/D conversion.
Example 19-4
RELATIVE CHARGE
MEASUREMENT
for a sample software routine for a
DS41412D-page 325

Related parts for PIC18F45K22-I/P