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

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
3.2
© 2009 Microchip Technology Inc.
LESSON 2: BLINK LED
This lesson discusses the Configuration bits of the PIC18FXXXX microcontrollers and
how to set them in an MPLAB C source file. It also presents using a library function and
shows how delays can be used to blink an LED on the demo board.
3.2.1
This and the remaining lessons already have a project and workspace defined. To open
the workspace for Lesson 2, select menu File > Open Workspace… in the MPLAB IDE.
Browse to the directory C:\Lessons\PICkit 3 Debug Express Lessons\02
Blink LED and open the 02 Blink LED.mcw file.
Before opening the new workspace, the MPLAB IDE will prompt you to save the current
workspace. It is generally a good idea to click Yes. Afterwards, the new workspace and
project for Lesson 2 will open.
3.2.2
Configuration bits are fuses in the PIC18FXXXX microcontrollers that are programmed
along with the application code to set up or “configure” different microcontroller
operating modes and enable or disable certain microcontroller features. For example,
in the PIC18F45K20 the Configuration bits select such features as which oscillator
option to use, whether the processor runs in Traditional or Extended mode; whether to
use the Brown-out Reset circuit and which voltage to trip at; whether the Watchdog
Timer is enabled or disabled and which options to use, and if the Flash memory
code-protect feature is enabled, among many other options.
Note that some features, such as the Watchdog Timer, can be configured so that it may
be enabled or disabled by software in the Special Function Registers while the
application code is executing. For detailed descriptions and information on the
PIC18F45K20 Configuration bits, see Section 23.1 “Configuration Bits” in the data
sheet, under the section heading 23.0 “Special Features of the CPU”.
In the Lesson 2 source code, all Configuration bits are defined at the top of the 02
Blink LED.c file, as shown in Figure 3-12.
Key Concepts
- Open existing project work spaces by selecting File > Open Workspace…
- Configuration bits are special purpose fuse bits that set PIC microcontroller
- A number of libraries are included with the MPLAB C compiler with
- Delays can be created to time events by using software loops.
in the MPLAB IDE.
modes of operation and enable or disable microcontroller features.
predefined and compiled functions. The “MPLAB C18 C Compiler Libraries”
document (DS51297) provides detailed information on all included libraries.
Opening the Lesson 2 Project and Workspace in the MPLAB
IDE
Defining Configuration Bit Settings in the Source Code
PICkit™ 3 Debug Express Lessons
DS41370C-page 21

Related parts for PIC18F45K20-I/ML