參數(shù)資料
型號(hào): PIC16F873A
廠商: Microchip Technology Inc.
英文描述: 28/40-pin Enhanced FLASH Microcontrollers
中文描述: 28/40-pin增強(qiáng)閃存微控制器
文件頁數(shù): 37/222頁
文件大?。?/td> 4013K
代理商: PIC16F873A
第1頁第2頁第3頁第4頁第5頁第6頁第7頁第8頁第9頁第10頁第11頁第12頁第13頁第14頁第15頁第16頁第17頁第18頁第19頁第20頁第21頁第22頁第23頁第24頁第25頁第26頁第27頁第28頁第29頁第30頁第31頁第32頁第33頁第34頁第35頁第36頁當(dāng)前第37頁第38頁第39頁第40頁第41頁第42頁第43頁第44頁第45頁第46頁第47頁第48頁第49頁第50頁第51頁第52頁第53頁第54頁第55頁第56頁第57頁第58頁第59頁第60頁第61頁第62頁第63頁第64頁第65頁第66頁第67頁第68頁第69頁第70頁第71頁第72頁第73頁第74頁第75頁第76頁第77頁第78頁第79頁第80頁第81頁第82頁第83頁第84頁第85頁第86頁第87頁第88頁第89頁第90頁第91頁第92頁第93頁第94頁第95頁第96頁第97頁第98頁第99頁第100頁第101頁第102頁第103頁第104頁第105頁第106頁第107頁第108頁第109頁第110頁第111頁第112頁第113頁第114頁第115頁第116頁第117頁第118頁第119頁第120頁第121頁第122頁第123頁第124頁第125頁第126頁第127頁第128頁第129頁第130頁第131頁第132頁第133頁第134頁第135頁第136頁第137頁第138頁第139頁第140頁第141頁第142頁第143頁第144頁第145頁第146頁第147頁第148頁第149頁第150頁第151頁第152頁第153頁第154頁第155頁第156頁第157頁第158頁第159頁第160頁第161頁第162頁第163頁第164頁第165頁第166頁第167頁第168頁第169頁第170頁第171頁第172頁第173頁第174頁第175頁第176頁第177頁第178頁第179頁第180頁第181頁第182頁第183頁第184頁第185頁第186頁第187頁第188頁第189頁第190頁第191頁第192頁第193頁第194頁第195頁第196頁第197頁第198頁第199頁第200頁第201頁第202頁第203頁第204頁第205頁第206頁第207頁第208頁第209頁第210頁第211頁第212頁第213頁第214頁第215頁第216頁第217頁第218頁第219頁第220頁第221頁第222頁
2001 Microchip Technology Inc.
Advance Information
DS39582A-page 35
PIC16F87XA
3.6
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 14-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 erase-
and-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 3-1). 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 exe-
cuted:
1.
Set the EEPGD control bit (EECON1<7>)
2.
Write 55h, then AAh, to EECON2 (FLASH pro-
gramming sequence)
3.
Set the WR control bit (EECON1<1>)
All four buffer register locations
MUST
be written to with
correct data. If only one, two, or three words are being
written to in the block of four words, then a read from
the program memory location(s) not being written to
must be performed. This takes the data from the pro-
gram 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 four-word block (EEADR<1:0> =
11
’). Then the following sequence of events must be
executed:
1.
Set the EEPGD control bit (EECON1<7>)
2.
Write 55h, then AAh, to EECON2 (FLASH pro-
gramming sequence)
3.
Set control bit WR (EECON1<1>) to begin the
write operation
The user must follow the same specific sequence to ini-
tiate the write for each word in the program block, writ-
ing each program word in sequence (
00,01,10,11
).
When the write is performed on the last word
(EEADR<1:0> = ‘
11
’)
,
the block of four words are
automatically erased, and the contents of the buffer
registers are written into the program memory.
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 three 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
four-word block). This is not SLEEP mode, as the
clocks and peripherals will continue to run. After the
write cycle, the processor will resume operation with
the third instruction after the EECON1 write instruction.
If the sequence is performed to any other location, the
action is ignored.
FIGURE 3-1:
BLOCK WRITES TO FLASH PROGRAM MEMORY
7
5
14
14
14
14
Program Memory
Buffer Register
EEADR<1:0>
= ‘
00
Buffer Register
EEADR<1:0>
= ‘
01
Buffer Register
EEADR<1:0>
= ‘
10
Buffer Register
EEADR<1:0>
= ‘
11
EEDATA
EEDATH
0 7
0
6
8
First word of block
to be written
Four words of FLASH
are erased, then
all buffers are
to FLASH
automatically
after this word
is written
transferred
相關(guān)PDF資料
PDF描述
PIC16F874A 28/40-pin Enhanced FLASH Microcontrollers
PIC16F876A 28/40-pin Enhanced FLASH Microcontrollers
PIC16F87XA 28/40-pin Enhanced FLASH Microcontrollers
PIC16F877A 40-Pin 8-Bit Enhanced FLASH Microcontroller(40引腳、8位增強(qiáng)型FLASH微控制器)
PIC16F882 28/40/44-Pin, Enhanced Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
PIC16F873A-E/ML 功能描述:8位微控制器 -MCU 7KB 192 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F873A-E/SO 功能描述:8位微控制器 -MCU 7KB 192 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F873A-E/SP 功能描述:8位微控制器 -MCU 7KB 192 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F873A-E/SS 功能描述:8位微控制器 -MCU 7KB 192 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F873A-I/ML 功能描述:8位微控制器 -MCU 7KB 192 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT