本帖最后由 David_ming 于 2010-2-9 16:09 编辑
发一个读的例程参考,8952的得改下IAP地址
void main(void)
{
IFADRH = 0x80; //address high byte
IFADRL = 0x01; //address low byte
IFMT = 0x01; //write command("read" command)
ISPCR = 0x00; //waiting time set
ISPCR |= 0x83; //enable ISP
SCMD = 0x46;
SCMD = 0xb9; //start to operate
_nop_();
SCMD = 0; //disable the isp
P0 = IFD;
while(1);
} |