PIC18LF24K22-I/SS Microchip Technology, PIC18LF24K22-I/SS Datasheet - Page 325

IC PIC MCU 16KB FLASH 28SSOP

PIC18LF24K22-I/SS

Manufacturer Part Number
PIC18LF24K22-I/SS
Description
IC PIC MCU 16KB FLASH 28SSOP
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr
Datasheets

Specifications of PIC18LF24K22-I/SS

Core Size
8-Bit
Program Memory Size
16KB (8K x 16)
Core Processor
PIC
Speed
64MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
24
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
768 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Data Converters
A/D 19x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-SSOP (0.200", 5.30mm Width)
Controller Family/series
PIC18
No. Of I/o's
25
Eeprom Memory Size
256Byte
Ram Memory Size
768Byte
Cpu Speed
64MHz
No. Of Timers
7
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 PIC18LF24K22-I/SS