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

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
FIGURE 3-48:
© 2009 Microchip Technology Inc.
while
{//
}
Delay1KTCYx(32);
LATD
delayand
(1)
=LED_Count++;
3.9.3
The Lesson 9 program code has a simple background loop in the main() function that
displays a binary count on the demo board LEDs, as shown in Figure 3-46. Each count
increment is delayed by 64,000 instruction cycles. As the clock frequency is changed,
the instruction rate changes and so the total time in seconds of the delay gets shorter
as the clock frequency increases. The effect is that the LED display will count faster as
the clock speed is increased.
At the start of the program, the internal oscillator is running at 250 kHz. Each press of
the demo board switch creates an interrupt that increases the clock frequency by a
factor of 2 up through 64 MHz, after which it returns to 250 kHz.
SOURCE CODE BACKGROUND LOOP
A few other things of interest in the Lesson 9 source code are:
• The interrupts are configured for only a single level of priority, where interrupt pri-
• Instead of using ADCON1 to configure the switch input RB0 as a digital input as
• The Lesson 9 interrupt service function void InterruptService(void) dem-
3.9.4
Build and program the Lesson 9 project, then Run the application in the debugger.
Pressing the demo board switch causes the program to change the oscillator frequency
during execution. As the oscillator frequency increases, the rate at which the LEDs
count increases.
counton
orities are disabled. This differs from the Lesson 8 source code where interrupt
priorities were enabled.
was done in previous lessons, the Lesson 9 source sets the Configuration bit
PBADEN = OFF. This causes all PORTB pins to default to digital, instead of ana-
log, inputs on a Reset.
onstrates calling another function void SetIntOSC(IntOSCFreq *ClockSet)
from within the interrupt service code.
LEDs
Exploring the Lesson 9 Source Code
Build and Run the Lesson 9 Code with PICkit 3 Debug Express
here.Interrupt
PICkit™ 3 Debug Express Lessons
//output
//delay
32,000cycles
handles
countto
switch
PORTD
or
LEDs
about
and
freqchanges
1
secat
125kHz
DS41370C-page 57

Related parts for PIC18F45K20-I/ML