欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC16F818-I/P 参数 Datasheet PDF下载

PIC16F818-I/P图片预览
型号: PIC16F818-I/P
PDF下载: 下载PDF文件 查看货源
内容描述: 二十零分之一十八引脚增强型闪存微控制器采用纳瓦技术 [18/20-Pin Enhanced Flash Microcontrollers with nanoWatt Technology]
分类和应用: 闪存微控制器和处理器外围集成电路光电二极管PC时钟
文件页数/大小: 176 页 / 2941 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC16F818-I/P的Datasheet PDF文件第28页浏览型号PIC16F818-I/P的Datasheet PDF文件第29页浏览型号PIC16F818-I/P的Datasheet PDF文件第30页浏览型号PIC16F818-I/P的Datasheet PDF文件第31页浏览型号PIC16F818-I/P的Datasheet PDF文件第33页浏览型号PIC16F818-I/P的Datasheet PDF文件第34页浏览型号PIC16F818-I/P的Datasheet PDF文件第35页浏览型号PIC16F818-I/P的Datasheet PDF文件第36页  
PIC16F818/819  
The user must follow the same specific sequence to  
initiate the write for each word in the program block by  
writing each program word in sequence (00, 01, 10,  
11).  
3.7  
Writing to Flash Program Memory  
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 WRT1:WRT0 of  
the device Configuration Word (Register 12-1). Flash  
program memory must be written in four-word blocks.  
A block consists of four words with sequential  
addresses, with a lower boundary defined by an  
address, where EEADR<1:0> = 00. At the same time,  
all block writes to program memory are done as write-  
only operations. The program memory must first be  
erased. The write operation is edge-aligned and cannot  
occur across boundaries.  
There are 4 buffer register words and all four locations  
MUST be written to with correct data.  
After the “BSF EECON1, WR” instruction, if  
EEADR xxxxxx11, then a short write will occur.  
This short write-only transfers the data to the buffer  
register. The WR bit will be cleared in hardware after  
one cycle.  
After the “BSF EECON1, WR” instruction, if  
EEADR = xxxxxx11, then a long write will occur. This  
will simultaneously transfer the data from  
EEDATH:EEDATA to the buffer registers and begin the  
write of all four words. The processor will execute the  
next instruction and then ignore the subsequent  
instruction. The user should place NOPinstructions into  
the second words. The processor will then halt internal  
operations for typically 2 msec in which the write takes  
place. This is not a Sleep mode, as the clocks and  
peripherals will continue to run. After the write cycle,  
the processor will resume operation with the 3rd  
instruction after the EECON1 write instruction.  
To write to the program memory, the data must first be  
loaded into the buffer registers. There are four 14-bit  
buffer registers and they are addressed by the low  
2 bits of EEADR.  
The following sequence of events illustrate how to  
perform a write to program memory:  
• Set the EEPGD and WREN bits in the EECON1  
register  
• Clear the FREE bit in EECON1  
• Write address to EEADRH:EEADR  
• Write data to EEDATH:EEDATA  
• Write 55 to EECON2  
After each long write, the 4 buffer registers will be reset  
to 3FFF.  
• Write AA to EECON2  
• Set WR bit in EECON 1  
FIGURE 3-1:  
BLOCK WRITES TO FLASH PROGRAM MEMORY  
7
5
0
0 7  
EEDATH  
6
EEDATA  
All buffers are  
transferred  
to Flash  
8
automatically  
after this word  
is written  
First word of block  
to be written  
14  
14  
14  
14  
EEADR<1:0> = 01  
EEADR<1:0> = 00  
EEADR<1:0> = 10  
EEADR<1:0> = 11  
Buffer Register  
Buffer Register  
Buffer Register  
Buffer Register  
Program Memory  
DS39598E-page 30  
2004 Microchip Technology Inc.