Functional Overview
write_program_eeprom(address, value)
erase_program_eeprom(address)
Writes value to program memory location address.
Erases FLASH_ERASE_SIZE bytes in program memory.
write_program_memory(address,dataptr,count) Writes count bytes to program memory from dataptr to address.
When address is a mutiple of FLASH_ERASE_SIZE an erase i s
performed.
read_program_memory(address,dataptr,count) Read count bytes from program memory at address to dataptr.
Relevant Preprocessor:
#ROM address={list}
#DEVICE(WRITE_EEPROM=ASYNC)
Can be used to put program memory data into the hex file.
Can be used with #DEVICE to prevent the write function from
hanging. When this is used make sure the eeprom is not written
inside and outside the ISR.
Relevant Interrupts:
INT_EEPROM
Relevant Include Files:
None, all functions built-in
Relevant getenv() parameters
PROGRAM_MEMORY
READ_PROGRAM
FLASH_WRITE_SIZE
FLASH_ERASE_SIZE
Interrupt fires when eeprom write is complete.
Size of program memory
Returns 1 if program memory can be read
Smallest number of bytes written in flash
Smallest number of bytes erased in flash
Example Code:
For 18F452 where the write size is 8 bytes and erase size is 64 bytes
#rom 0xa00={1,2,3,4,5}
erase_program_eeprom(0x1000);
write_program_eeprom(0x1000,0x1234);
value=read_program_eeprom(0x1000);
write_program_memory(0x1000,data,8);
read_program_memory(0x1000,value,8);
erase_program_eeprom(0x1000);
write_program_memory(0x1010,data,8);
read_program_memory(0x1000,value,8);
//inserts this data into the hex file.
//erases 64 bytes strting at 0x1000
//writes 0x1234 to 0x1000
//reads 0x1000 returns 0x1234
//erases 64 bytes starting at 0x1000 as 0x1000 is a multiple
//of 64 and writes 8 bytes from data to 0x1000
//reads 8 bytes to value from 0x1000
//erases 64 bytes starting at 0x1000
//writes 8 bytes from data to 0x1000
//reads 8 bytes to value from 0x1000
49
相关PDF资料
PCI-EXP-T42G5-N1 IP CORE PCI EXPRESS ORCA 4
PCM18XH2 PROCESSOR MODULE MPLAB-ICE 2000
PCM18XN0 PROCESSOR MODULE FOR ICE2000
PDA-B-24-615-E-2B1-1-C CIRCUIT BREAKER MAG 1P 15A
PFMF.260.2 PFMF PTC FUSE SMT 2.6A 1812
PFNF.200.2 PFNF PTC FUSE SMT 2A 1206
PFRY.375 PTC-FUSE RADIAL 72 VDC
PFSM.150.33.2 FUSE PTC 8A 15V FST-TRIP SMD
相关代理商/技术参数
PCD_09 制造商:MACOM 制造商全称:Tyco Electronics 功能描述:Low Profile PCB Relay PCD
PCD-00173-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0E 制造商:Molex 功能描述:Ethernet Cable Assembly
PCD-00173-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0K 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00174-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Red; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet ;RoHS Compliant: NA
PCD-00174-0E 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Grey; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet;RoHS Compliant: NA
PCD-00174-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY