PIC18F45K20-E/P Microchip Technology, PIC18F45K20-E/P Datasheet - Page 57

32KB, Flash, 1536bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 PDIP .600in TUBE

PIC18F45K20-E/P

Manufacturer Part Number
PIC18F45K20-E/P
Description
32KB, Flash, 1536bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 PDIP .600in TUBE
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr

Specifications of PIC18F45K20-E/P

Core Processor
PIC
Core Size
8-Bit
Speed
48MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
35
Program Memory Size
32KB (16K x 16)
Program Memory Type
FLASH
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 ~ 125°C
Package / Case
40-DIP (0.600", 15.24mm)
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 PIC18F4XK20
Lead Free Status / RoHS Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F45K20-E/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
FIGURE 3-44:
© 2009 Microchip Technology Inc.
LESSON 8 INTERRUPT SFRS
In the Lesson 8 source code, all the statements to change the rotation direction are in
the INT0 switch interrupt function, and the statements to rotate the LED display are in
the TMR0 interrupt function. All that remains in the main program is a while() loop
that updates the PORTD register with LED_Display. This statement could have also
been placed in the TMR0 interrupt function, but is left in the main program to illustrate
how the main program runs continuously and interacts with the interrupts.
Single Priority Interrupts
If only a single level of interrupts were used (RCON bit IPEN = 0), then it is only
necessary to define the interrupt vector at 0x0008, and a single Interrupt Service
Routine function with #pragma interrupt. All priority bit settings are ignored. The
function of the INTCON bits GIEH and GIEL become GIE and PEIE, respectively, with
the following functions:
3.8.3
Build and program the Lesson 8 project, then Run the application in the debugger.
Turning the demo board potentiometer will affect the rotation speed of the LEDs. The
switch may be pressed to reverse the rotation. Use breakpoints to explore the
interrupting functions.
INTCONbits.GIE
Build and Run the Lesson 8 Code with PICkit 3 Debug Express
PICkit™ 3 Debug Express Lessons
0
0
1
1
INTCONbits.PEIE Interrupt Functions
0
1
0
1
No Interrupts; all interrupts disabled.
No Interrupts; all interrupts disabled.
Only interrupts enabled in INTCONx
enabled.
All PIEx interrupts remain disabled.
All interrupts, including those enabled in
PIEx registers, are enabled.
DS41370C-page 53

Related parts for PIC18F45K20-E/P