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

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 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.

Related parts for PIC18F45K20-I/ML