PIC18F46K22-I/MV Microchip Technology, PIC18F46K22-I/MV Datasheet - Page 325

64KB, Flash, 3968bytes-RAM,8-bit Family,nanoWatt XLP 40 UQFN 5x5x0.5mm TUBE

PIC18F46K22-I/MV

Manufacturer Part Number
PIC18F46K22-I/MV
Description
64KB, Flash, 3968bytes-RAM,8-bit Family,nanoWatt XLP 40 UQFN 5x5x0.5mm TUBE
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr
Datasheet

Specifications of PIC18F46K22-I/MV

Core Processor
PIC
Core Size
8-Bit
Speed
64MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
35
Program Memory Size
64KB (32K x 16)
Program Memory Type
FLASH
Eeprom Size
1K x 8
Ram Size
3.8K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 30x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
40-UFQFN Exposed Pad
Processor Series
PIC18F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
4 KB
Number Of Programmable I/os
36
Number Of Timers
3 x 8-bit. 4 x 16-bit
Operating Supply Voltage
1.8 V to 5.5 V
Mounting Style
SMD/SMT
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
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 PIC18F46K22-I/MV