PIC18F45K20-I/ML Microchip Technology, PIC18F45K20-I/ML Datasheet - Page 34

IC PIC MCU FLASH 16KX16 44QFN

PIC18F45K20-I/ML

Manufacturer Part Number
PIC18F45K20-I/ML
Description
IC PIC MCU FLASH 16KX16 44QFN
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr

Specifications of PIC18F45K20-I/ML

Program Memory Type
FLASH
Program Memory Size
32KB (16K x 16)
Package / Case
44-QFN
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
Eeprom Size
256 x 8
Ram Size
1.5K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Data Converters
A/D 14x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Processor Series
PIC18F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
1.5 KB
Interface Type
CCP/ECCP/EUSART/I2C/MSSP/SPI
Maximum Clock Frequency
64 MHz
Number Of Programmable I/os
36
Number Of Timers
4
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734, 52712-325, EWPIC18
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
14-ch x 10-bit
Package
44QFN EP
Device Core
PIC
Family Name
PIC18
Maximum Speed
64 MHz
Operating Supply Voltage
2.5|3.3 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
DM240313 - BOARD DEMO 8BIT XLPAC164112 - VOLTAGE LIMITER MPLAB ICD2 VPPDM164124 - KIT STARTER FOR PIC18F4XK20AC164322 - MODULE SOCKET MPLAB PM3 28/44QFN
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PICkit™ 3 Debug Express
DS41370C-page 30
3.4.2
Mechanical switches are frequently encountered in embedded processor applications,
and are inexpensive, simple and reliable. However, such switches are also often very
electrically noisy. This noise is known as switch bounce, whereby the connection
between the switch contacts makes and breaks several, perhaps even hundreds, of
times before settling to the final switch state. This can cause a single switch push to be
detected as several distinct switch pushes by a fast device, especially with an edge-
sensitive input. Think of advancing the TV channel, but instead of getting the next
channel, the selection skips ahead two or three.
Classic solutions to switch bounce involved filtering out the fast switch bounce
transitions with a resistor-capacitor circuit, or using re-settable logic shift registers.
While effective, these methods add additional cost and increase circuit board real
estate. Debouncing a switch in software eliminates these issues.
A simple way to debounce a switch is to sample the switch until the signal is stable.
How long to sample requires some investigation of the switch characteristics, but
usually 5ms is sufficiently long.
This lesson code demonstrates sampling the switch input every 1mS, waiting for 5
consecutive samples of the same value before determining that the switch was
pressed. Note that the switch on the 44-Pin Demo Board doesn’t bounce much, but it
is good practice to debounce all system switches.
FIGURE 3-21:
3.4.3
Open the lesson source code file 04 Switch Input.c in an editor window if it is not
open already.
Switch Debouncing
Exploring the Lesson 4 Source Code
SWITCH DEBOUNCING PROGRAM FLOW
© 2009 Microchip Technology Inc.

Related parts for PIC18F45K20-I/ML