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

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 24
Headers for the libraries can be found in the MCC18 header directory C:\MCC18\h.
The source code for most of the libraries can be found in C:\MCC18\src, and the
libraries themselves are in C:\MCC18\lib. For more detailed information on the
included library functions see the “MPLAB C18 C Compiler Libraries” document
(DS51297).
The other new line of special interest is a function call to a function in the delays library:
This function creates a time delay with a software of 1000 (1k) instruction cycles (TCY)
times the argument value. In this case, the argument is 50 so this function will delay for
50 x 1,000 = 50,000 instruction cycles. The instruction rate on PIC18FXXXX
microcontrollers is equal to 1/4
execute an instruction. In this case the clock is the internal oscillator at 1 MHz, so the
instruction rate is 250 kHz, or TCY = 4us per instruction. The total delay is 50,000 x 4us
= 200 ms, which is slow enough for the human eye to see the LED turning on and off.
The Lesson 2 program runs this delay inside an indefinite while loop, which sets the
RD7 I/O pin to the complement of its current value (the effect is to switch it back and
forth between high and low) with a 200 ms delay in between each RD7 output level
change. This blinks the demo board LED 7.
3.2.4
Select MPLAB IDE menu, build the Lesson 2 project and program the code into the
demo board PIC18F45K20 using the PICkit 3 Programmer as we did in Lesson 1.
The demo board LED 7 will blink continuously at 200 ms on and 200 ms off.
Delay1KTCYx(50);
Build and Program the Lesson 2 Code
th
the oscillator clock; in other words, it takes 4 clocks to
© 2009 Microchip Technology Inc.

Related parts for PIC18F45K20-I/ML