/* ×Ö½Ú±à³Ì */ INT8U byte_program(INT16U byte_addr, INT8U original_data) { ISP_ADDRH = (INT8U)(byte_addr >> 8); ISP_ADDRL = (INT8U)(byte_addr & 0x00ff);
ISP_CMD = ISP_CMD & 0xf8; /* 1111,1000 */ ISP_CMD = ISP_CMD | PROGRAM_AP_and_Data_Memory_Command; /* 0000,0010 */ ISP_DATA = original_data;
ISP_IAP_enable(); ISP_TRIG = 0x46; /* ´¥·¢ISP_IAPÃüÁî */ ISP_TRIG = 0xb9; /* ´¥·¢ISP_IAPÃüÁî */ _nop_();
ISP_IAP_disable(); return OK; } |