PIC16F887-I/PT Microchip Technology Inc., PIC16F887-I/PT Datasheet - Page 119

no-image

PIC16F887-I/PT

Manufacturer Part Number
PIC16F887-I/PT
Description
MCU, 8-Bit, 8KW Flash, 368 RAM, 36 I/O, TQFP-44
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC16F887-I/PT

A/d Inputs
14-Channel, 10-Bit
Comparators
2
Cpu Speed
5 MIPS
Eeprom Memory
256 Bytes
Frequency
20 MHz
Input Output
35
Interface
I2C/SPI/USART
Memory Type
Flash
Number Of Bits
8
Package Type
44-pin TFQP
Programmable Memory
14K Bytes
Ram Size
368 Bytes
Resistance, Drain To Source On
Bytes
Serial Interface
MSSP or EUSART
Speed
20 MHz
Timers
2-8-bit, 1-16-bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F887-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16F887-I/PT
Manufacturer:
Microchip
Quantity:
600
Part Number:
PIC16F887-I/PT
Manufacturer:
MICROCHIP
Quantity:
12 506
Part Number:
PIC16F887-I/PT
0
Company:
Part Number:
PIC16F887-I/PT
Quantity:
1 600
Company:
Part Number:
PIC16F887-I/PT
Quantity:
6 400
Company:
Part Number:
PIC16F887-I/PT
Quantity:
3 200
10.2
Flash program memory may only be written to if the
destination address is in a segment of memory that is
not write-protected, as defined in bits WRT<1:0> of the
Configuration Word Register 2. Flash program memory
must be written in eight-word blocks (four-word blocks
for 4K memory devices). See Figures 10-2 and 10-3 for
more details. A block consists of eight words with
sequential addresses, with a lower boundary defined by
an address, where EEADR<2:0> = 000. All block writes
to program memory are done as 16-word erase by
eight-word write operations. The write operation is
edge-aligned and cannot occur across boundaries.
To write program data, it must first be loaded into the
buffer registers (see Figure 10-2). This is accomplished
by first writing the destination address to EEADR and
EEADRH and then writing the data to EEDATA and
EEDATH. After the address and data have been set up,
then the following sequence of events must be
executed:
1.
2.
3.
All eight buffer register locations should be written to
with correct data. If less than eight words are being writ-
ten to in the block of eight words, then a read from the
program memory location(s) not being written to must
be performed. This takes the data from the program
location(s) not being written and loads it into the
EEDATA and EEDATH registers. Then the sequence of
events to transfer data to the buffer registers must be
executed.
To transfer data from the buffer registers to the program
memory, the EEADR and EEADRH must point to the last
location in the eight-word block (EEADR<2:0> = 111).
Then the following sequence of events must be
executed:
1.
2.
3.
The user must follow the same specific sequence to
initiate the write for each word in the program block,
writing each program word in sequence (000, 001,
010, 011, 100, 101, 110, 111). When the write is
performed on the last word (EEADR<2:0> = 111), a
block of sixteen words is automatically erased and the
content of the eight word buffer registers are written
into the program memory.
© 2007 Microchip Technology Inc.
Set the EEPGD control bit of the EECON1
register.
Write 55h, then AAh, to EECON2 (Flash
programming sequence).
Set the WR control bit of the EECON1 register.
Set the EEPGD control bit of the EECON1
register.
Write 55h, then AAh, to EECON2 (Flash
programming sequence).
Set control bit WR of the EECON1 register to
begin the write operation.
Writing to Flash Program Memory
PIC16F882/883/884/886/887
Preliminary
After the “BSF EECON1,WR” instruction, the processor
requires two cycles to set up the erase/write operation.
The user must place two NOP instructions after the WR
bit is set. Since data is being written to buffer registers,
the writing of the first seven words of the block appears
to occur immediately. The processor will halt internal
operations for the typical 4 ms, only during the cycle in
which the erase takes place (i.e., the last word of the
sixteen-word block erase). This is not Sleep mode as
the clocks and peripherals will continue to run. After the
eight-word write cycle, the processor will resume oper-
ation with the third instruction after the EECON1 write
instruction. The above sequence must be repeated for
the higher eight words.
DS41291D-page 117

Related parts for PIC16F887-I/PT