| 数据搜索系统,热门电子元器件搜索 |
|
DVR 数据表(PDF) 78 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
DVR 数据表(HTML) 78 Page - Microchip Technology |
|
78 / 416 page ![]() PIC24FJ256GA705 FAMILY DS30010118D-page 78 2016-2018 Microchip Technology Inc. EXAMPLE 6-3: PROGRAMMING A DOUBLE WORD OF FLASH PROGRAM MEMORY (‘C’ LANGUAGE CODE) // C example using MPLAB XC16 unsigned long progAddr = 0xXXXXXX; // Address of word to program unsigned int progData1L = 0xXXXX; // Data to program lower word of word 1 unsigned char progData1H = 0xXX; // Data to program upper byte of word 1 unsigned int progData2L = 0xXXXX; // Data to program lower word of word 2 unsigned char progData2H = 0xXX; // Data to program upper byte of word 2 //Set up NVMCON for word programming NVMCON = 0x4001; // Initialize NVMCON TBLPAG = 0xFA; // Point TBLPAG to the write latches //Set up pointer to the first memory location to be written NVMADRU = progAddr>>16; // Initialize PM Page Boundary SFR NVMADR = progAddr & 0xFFFF; // Initialize lower word of address //Perform TBLWT instructions to write latches __builtin_tblwtl(0, progData1L); // Write word 1 to address low word __builtin_tblwth(0, progData1H); // Write word 1 to upper byte __builtin_tblwtl(1, progData2L); // Write word 2 to address low word __builtin_tblwth(1, progData2H); // Write word 2 to upper byte asm(“DISI #5”); // Block interrupts with priority <7 for next 5 // instructions __builtin_write_NVM(); // XC16 function to perform unlock sequence and set WR |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |