PIC18F45K20-I/PT Microchip Technology, PIC18F45K20-I/PT Datasheet - Page 27

IC PIC MCU FLASH 16KX16 44TQFP

PIC18F45K20-I/PT

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

Specifications of PIC18F45K20-I/PT

Program Memory Type
FLASH
Program Memory Size
32KB (16K x 16)
Package / Case
44-TQFP, 44-VQFP
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
44TQFP
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 PIC18F4XK20AC164305 - MODULE SKT FOR PM3 44TQFP
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F45K20-I/PT
Manufacturer:
SIEMENS
Quantity:
32
Part Number:
PIC18F45K20-I/PT
Manufacturer:
MICROCHI
Quantity:
18 600
Part Number:
PIC18F45K20-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18F45K20-I/PT
Manufacturer:
MICR0CHIP
Quantity:
20 000
FIGURE 3-15:
© 2009 Microchip Technology Inc.
/**
#include "p18f45k20.h"
#include "delays.h"
/**
void
{
}
I
D
main
TRISD
while
{
}
N
E
C
C
(void)
L
L
=
(1)
LATDbits.LATD7
Delay1KTCYx(50);//
U
A
0b01111111;//
The Configuration bit settings that are important for this lesson project and are different
from the default values are:
Even though all other bit settings are left as default, it is strongly recommended to
define them all in the source as is done in the Lesson 2 source code. This ensures that
the program memory image in the .hex file built by the compiler contains all the
configuration settings intended for the target application. The one exception is the
DEBUG bit, as this is defined by the MPLAB IDE environment depending on whether
the target microcontroller is running in Debug mode or not.
3.2.3
Open the Lesson 2 source code file 02 Blink LED.c in an MPLAB IDE editor window
if it is not open already.
LESSON 2 “BLINK LED” SOURCE CODE
This source code contains a couple of new lines of interest. The first is a new include
file:
This is the header file for the MCC18 “delays” library, which provides functions used to
create program delays of a certain number of processor cycles. The MPLAB C compiler
comes with a number of useful libraries. These include the standard C libraries stdio
and stdlib, and function libraries such as ctype, delays, math, and string.
There are also libraries for using hardware peripheral functions such as adc, i2c, pwm,
spi, usart, and timers as well as for software emulation of peripherals like sw_i2c,
sw_uart, and sw_spi.
FOSC = INTIO67
WDTEN = OFF
LVP = OFF
D
R
E
A
#include
S
T
**************************************************/
I
Exploring the Lesson 2 Source Code
=
O
PORTD
~LATDbits.LATD7;
N
Delay
PICkit™ 3 Debug Express Lessons
S
bit
"delays.h"
*******************************************/
50
7
This sets the PIC18F45K20 to run using the internal oscillator, so
no crystal or external oscillator is needed. The default frequency is
1 MHz. The oscillator is covered in more detail in Lesson 9. It also
sets OSC1 and OSC2 pins to be used as the RA6 and RA7 I/O
port pins as the OSC pin functions are not needed.
This turns off the Watchdog Timer, as it is not used in this lesson.
When the Watchdog Timer is enabled, it must be cleared periodi-
cally in the code or it will reset the microcontroller.
This turns off Low-Voltage-Programming, and frees the PGM pin to
be used as the RB5 I/O port pin. (LVP mode is not used by the
PICkit 3 programmer.)
x
to
1000
output
//
=
toggle
50,000
(0)
;
LATD
cycles;
bits
6:0
200ms
are
@
inputs
1MHz
(1)
DS41370C-page 23

Related parts for PIC18F45K20-I/PT