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

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
PICkit™ 3 Debug Express
DS41370C-page 60
For more information on the data EEPROM memory see Section 7.0 of the
PIC18F45K20 Data Sheet (DS41303).
FIGURE 3-51:
3.10.3
The Lesson 10 program writes all 256 bytes of the data EEPROM memory, writing each
location with value = 255 – address. For example, the EEPROM byte at address 0x09
is written with value 0xF6 = 246.
Once all locations have been written, the program ends in an infinite while(1) loop.
3.10.4
Build and program the Lesson 10 project, then Run the application in the debugger.
The EEPROM memory may be viewed in the MPLAB IDE by selecting view >
EEPROM.
As the EEPROM memory window does not update with changed EEPROM byte values
during debugging, it is necessary to select Debugger > Read to see the current
contents of the data EEPROM memory. However, doing so will cause a program Reset.
void
{
Note:
//
//
EECON1bits.EEPGD
EECON1bits.CFGS
EEDATA
EEADR
EECON1bits.WREN
INTCONbits.GIE
EECON2
EECON2
EECON1bits.WR
INTCONbits.GIE
while
{
};
EECON1bits.WREN
}
EEPROM_Write(unsigned
location
writes
Exploring the Lesson 10 Source Code
Build and Run the Lesson 10 Code with PICkit 3 Debug Express
The EEPROM window in the MPLAB IDE does not update with new
EEPROM values during debugging.
//
=
(EECON1bits.WR
=
=
=
wait
the
address;
databyte;
0x55;
0xAA;
in
DATA EEPROM WRITE
for
"databyte"
=
"address".
=
=
=
=
=
=
1;
0;
1;
write
0;
1;
0;
0;
==
char
//
//
//
//
//
//
//
//
//
//
to
value
1)
Set
Do
Load
Load
Enable
Disable
Begin
Set
re-enable
Disable
address,
complete.
not
to
to
WR
EEDATA
EEADR
Write
writing
EEPROM
access
access
interrupts
bit
writing
unsigned
interrupts
with
with
sequence
to
at
EEPROM
Config
begin
as
address
byte
char
the
a
© 2009 Microchip Technology Inc.
memory
registers
EEPROM
precaution.
address
to
databyte)
of
be
location
write
written
given
to
write.

Related parts for PIC18F45K20-E/P