參數資料
型號: DM164134
廠商: Microchip Technology
文件頁數: 88/116頁
文件大?。?/td> 0K
描述: KIT DEV PIC18F4XK22
標準包裝: 1
系列: PIC® 18F
類型: MCU
適用于相關產品: PIC18F4XK22,PIC18F2XK22
所含物品: 板,文檔
2006 Microchip Technology Inc.
DS41159E-page 71
PIC18FXX8
6.5
Writing to Flash Program Memory
The minimum programming block is 4 words or 8 bytes.
Word or byte programming is not supported.
Table writes are used internally to load the holding
registers needed to program the Flash memory. There
are 8 holding registers used by the table writes for
programming.
Since the Table Latch (TABLAT) is only a single byte,
the TBLWT instruction has to be executed 8 times for
each programming operation. All of the table write
operations will essentially be short writes, because only
the holding registers are written. At the end of updating
8 registers, the EECON1 register must be written to, to
start the programming operation with a long write.
The long write is necessary for programming the inter-
nal Flash. Instruction execution is halted while in a long
write cycle. The long write will be terminated by the
internal programming timer.
The EEPROM on-chip timer controls the write time.
The write/erase voltages are generated by an on-chip
charge pump rated to operate over the voltage range of
the device for byte or word operations.
6.5.1
FLASH PROGRAM MEMORY WRITE
SEQUENCE
The sequence of events for programming an internal
program memory location should be:
1.
Read 64 bytes into RAM.
2.
Update data values in RAM as necessary.
3.
Load Table Pointer with address being erased.
4.
Do the row erase procedure.
5.
Load Table Pointer with address of first byte
being written.
6.
Write the first 8 bytes into the holding registers
using the TBLWT instruction, auto-increment
may be used.
7.
Set the EECON1 register for the write operation:
set the EEPGD bit to point to program memory;
clear the CFGS bit to access program memory;
set the WREN to enable byte writes.
8.
Disable interrupts.
9.
Write 55h to EECON2.
10. Write AAh to EECON2.
11. Set the WR bit. This will begin the write cycle.
12. The CPU will stall for duration of the write (about
2 ms using internal timer).
13. Re-enable interrupts.
14. Repeat steps 6-14 seven times to write
64 bytes.
15. Verify the memory (table read).
This procedure will require about 18 ms to update one
row of 64 bytes of memory. An example of the required
code is given in Example 6-3.
FIGURE 6-5:
TABLE WRITES TO FLASH PROGRAM MEMORY
Note:
Before setting the WR bit, the Table
Pointer address needs to be within the
intended address range of the 8 bytes in
the holding registers.
Holding Register
TABLAT
Holding Register
TBLPTR = xxxxx7
Holding Register
TBLPTR = xxxxx1
Holding Register
TBLPTR = xxxxx0
8
Write Register
TBLPTR = xxxxx2
Program Memory
相關PDF資料
PDF描述
AIUR-07-221K INDUCTOR POWER 220UH 10% T/H
MAX8903CETI+ IC DC/DC CHARGER LI+ 2A 28-TQFN
MAX11080GUU/V+T IC LI/BATTERY MANAGEMENT 38TSSOP
MAX11081GUU+T IC FAULT MON BATT 12CH 38-TSSOP
MAX11081GUU/V+T IC FAULT MON BATT 12CH 38TSSOP
相關代理商/技術參數
參數描述
DM164135 制造商:Microchip Technology Inc 功能描述:KIT, ONEPIC DEMO BOARD, PLUS PICKIT 3 制造商:Microchip Technology Inc 功能描述:KIT, ONEPIC DEMO BOARD, PLUS PICKIT 3; SVHC:No SVHC (19-Dec-2012) ;RoHS Compliant: Yes 制造商:Microchip Technology Inc 功能描述:One PIC MCU Platform Board with PICkit 3
DM164135 制造商:Microchip Technology Inc 功能描述:PICKIT 3 IN-CIRCUIT DEBUGGER
DM173001 功能描述:開發(fā)板和工具包 - PIC / DSPIC PICDEM 17 PIC17CXX RoHS:否 制造商:Microchip Technology 產品:Starter Kits 工具用于評估:chipKIT 核心:Uno32 接口類型: 工作電源電壓:
DM180021 功能描述:開發(fā)板和工具包 - PIC / DSPIC PIC18 Starter Kit RoHS:否 制造商:Microchip Technology 產品:Starter Kits 工具用于評估:chipKIT 核心:Uno32 接口類型: 工作電源電壓:
DM1800-434MB 功能描述:射頻模塊 DM1800 Base Station 433.92 MHz RoHS:否 制造商:Linx Technologies 產品:Transceiver Modules 頻帶:902 MHz to 928 MHz 輸出功率:- 15.5 dBm to + 12.5 dBm 接口類型:UART 工作電源電壓:- 0.3 VDC to + 5.5 VDC 傳輸供電電流:38.1 mA 接收供電電流:22.7 mA 天線連接器類型:U.FL 最大工作溫度:+ 85 C 尺寸:1.15 mm x 0.63 mm x 0.131 mm