/* STC89C54RD+的flash 空间从0x4000~0xf3ff 共90 个扇区,每扇区512 字节 */ // #define BaseAddr 0x1000 /* 51rc */ // #define EndSectoraddr 0x3d00 /* 51rc */ // #define EndAddr 0x3fff /* 51rc 12K eeprom */ #define BaseAddr 0x4000 #define EndSectoraddr 0xf200 #define EndAddr 0xf3ff #define UseAddr 0x1000 /* ------------- 定义扇区大小 ------------- */ #define PerSector 512 /* 用户程序需要记忆的数组, 用户实际使用了n-1 个数据,数组长度规整到 2 4 8 16 32 64 上 */ uchar Ttotal[16] = { 0x55, /* 作为判别引导头使用,用户程序请不要修改它 */ /* 用户保存记忆的数据 */ 0x01, /* 用途说明
*/ 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, }; uint timerForDelay, /* 专供延时用的变量 */ i, /* 循环变量 */ EepromPtr; /* eeprom 读写指针 */ /* --------------- 命令定义 --------------- */ #define RdCommand 0x01 /* 字节读 */ #define PrgCommand 0x02 /* 字节写 */ #define EraseCommand 0x03