⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ce109_readme.txt

📁 关于PIC的一些常用例程
💻 TXT
字号:

		Readme File for Code Example:
              CE109 - Flash RTSP code example 
             ----------------------------------------

This file contains the following sections:
1. Code Example Description
2. Folder Contents
3. Suggested Development Resources
4. Reconfiguring the project for a different dsPIC33F device
5. Revision History


1. Code Example Description:
----------------------------
In this example, a page of Flash memory (512 instructions or 8 rows of 64 instruction) is read first.
Then the page is erased fully. One row of the page is modified and written back to the flash.

Following RTSP Application Program Interface (APIs) are used to perform the operation.

// Flash Memory is organised into ROWs of 64 instructions or 192 bytes
// RTSP allows the user to erage a PAGE of memory which consists of EIGHT ROWs (512 instructions or 1536byts) at a time.
// RTSP allows the user to program a ROW (64 instructions or 192 bytes) at a time

;-------------------------------------
/*
 * FLASH PAGE READ
 *
 * Parameters Definition:
 * nvmAdru:	Selects the upper 8bits of the location to read in program flash memory
 * nvmAdr:  Selects the location to read in program flash memory
 *          It must be aligned to 512 instruction boundary, LSB 10bits of address must be zero
 * pageBufPtr: Pointer to the data array in which read data will be stored

 
 * Return Value:
 * Function returns ERROREE (or -1), if it is not successful
 * Function return ZERO, if successful
*/

extern int flashPageRead(u16 nvmAdru, u16 nvmAdr, i16 *pageBufPtr);
;----------------------------------------

;----------------------------------------
/*
 * FLASH PAGE MODIFY
 *
 * Parameters Definition:
 * row:		Selects the row in the the Flash page that will be modified
 * rowBuf:  Selects the location to read in program flash memory
 * pageBufPtr: Pointer to the page data array, that will be modified
 
 * Return Value:
 * Function returns ERROREE (or -1), if it is not successful
 * Function return ZERO, if successful
*/

extern int flashPageModify(u16 row, u16 size, i16 *rowBuf, i16 *pageBufPtr);
;----------------------------------------

;----------------------------------------
/*
 * FLASH PAGE ERASE
 *
 * Parameters Definition:
 * nvmAdru:	Selects the upper 8bits of the location to program or erase in program flash memory
 * nvmAdr:  Selects the location to program or erase in program flash memory
*           It must be aligned to 512 instruction boundary, LSB 10bits of address must be zero
 
 * Return Value:
 * Function returns ERROREE (or -1), if it is not successful
 * Function return ZERO, if successful
*/
extern int flashPageErase(u16 nvmAdru, u16 nvmAdr);
;----------------------------------------

;----------------------------------------
/*
 * FLASH PAGE WRITE
 *
 * Parameters Definition:
 * nvmAdru:	Selects the upper 8bits of the location to program or erase in program flash memory
 * nvmAdr:  Selects the location to program or erase in program flash memory
 *          It must be aligned to 512 instruction boundary, LSB 10bits of address must be zero
 * pageBufPtr: Pointer to the data array that needs to be programmed 


 * Return Value:
 * Function returns ERROREE (or -1), if it is not successful
 * Function return ZERO, if successful
*/
extern int flashPageWrite(u16 nvmAdru, u16 nvmAdr, i16 *pageBufPtr);
;----------------------------------------


2. Folder Contents:
-------------------
This folder contains the following sub-folders:
a. C:\Program Files\Microchip\MPLAB C30\support\gld
        This folder will have the device GLD file, it is used for building the project. 
	This file was provided with the MPLAB

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -