PIC18F45K20-I/P Microchip Technology, PIC18F45K20-I/P Datasheet - Page 30
![IC PIC MCU FLASH 16KX16 40DIP](/photos/6/61/66192/150-40-dip_sml.jpg)
PIC18F45K20-I/P
Manufacturer Part Number
PIC18F45K20-I/P
Description
IC PIC MCU FLASH 16KX16 40DIP
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr
Datasheets
1.PIC18F25K20T-ISS.pdf
(42 pages)
2.PIC18F25K20T-ISS.pdf
(12 pages)
3.PIC18F25K20T-ISS.pdf
(14 pages)
4.PIC18F25K20T-ISS.pdf
(456 pages)
5.PIC18F45K20-IPT.pdf
(78 pages)
6.PIC18F26K20-ISO.pdf
(430 pages)
Specifications of PIC18F45K20-I/P
Program Memory Type
FLASH
Program Memory Size
32KB (16K x 16)
Package / Case
40-DIP (0.600", 15.24mm)
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
Through Hole
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
40PDIP
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 PIC18F4XK20
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC18F45K20-I/P
Manufacturer:
NEC
Quantity:
2 110
Company:
Part Number:
PIC18F45K20-I/PT
Manufacturer:
SIEMENS
Quantity:
32
Company:
Part Number:
PIC18F45K20-I/PT
Manufacturer:
MICROCHI
Quantity:
18 600
Company:
Part Number:
PIC18F45K20-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18F45K20-I/PT
Manufacturer:
MICR0CHIP
Quantity:
20 000
PICkit™ 3 Debug Express
DS41370C-page 26
For a list of data types supported by MPLAB C, their sizes and limits, see Section 2.1
of the “MPLAB C18 C Compiler User’s Guide” (DS51288).
3.3.2
Program memory will most often be used for program instructions and constant data.
The source code for Lesson 3 includes examples of both, as shown in Figure 3-17.
FIGURE 3-17:
There are two basic directives for defining program memory sections:
In this lesson, we use a constant array LED_LookupTable to convert a number
representing LEDs 0-7 to a bit pattern for setting the appropriate PORTD pin to turn on
the corresponding LED. This constant is declared in a romdata section and uses the
rom keyword so it will be placed in program memory. As the program never needs to
change these array values, this saves file registers to be used for true variables.
Note that the romdata section was also declared with a section name and absolute
address:
#pragma
These optional attributes will force the compiler to place the 8 – byte char array at
program memory address 0x0180. If an address is not specified, the code or romdata
section may not always be placed at a deterministic address by the linker.
Select MPLAB IDE menu Project > Build All to build the Lesson 3 code, then select
View > Program Memory to display the compiled contents of program memory. The
instructions to execute the lesson program code are contained within addresses
0x0000 and 0x0146. Note that the array values have been compiled to program
memory starting at the specified address of 0x180 through address 0x186 as shown in
Figure 3-18.
/**
// declare constant data in program memory starting at address 0x180
#pragma romdata Lesson3_Table = 0x180
const rom unsigned char LED_LookupTable[8] = {0x01, 0x02, 0x04, 0x08,
#pragma
void
{
D
code
romdata
main
E
code//
Allocating Program Memory
romdata
C
(void)
L
A
declare executable instructions
LESSON 3 CONSTANT DATA AND PROGRAM CODE
R
Lesson3_Table
Program memory Instructions. Compiles all subsequent instructions
into the program memory space of the target PIC18FXXXX.
Data stored in program memory. Used in conjunction with the rom
keyword, the following constant data is compiled into the program
memory space.
A
T
I
O
N
S
=
*******************************************/
0x180
0x10, 0x20, 0x40, 0x80};
© 2009 Microchip Technology Inc.