下面是AT89S8252内部EEPROM的读写程序 (网上下载的) 我想是否把08H改成#08H 0F7H改成#0F7H
读程序: MOV DPTR,#100H /*要访问的EEPROM地址*/ MOV A,08H /*置位EEMEN ORL 96H,A MOVX A,@DPTR /*读数据*/ MOV A,0F7H ANL 96H,A /*清除EEMEN*/ 写程序: MOV DPTR,#100H /*要访问的EEPROM地址*/ MOV A,18H /*置位EEMEN和EEMWE*/ ORL 96H,A MOV A,77H MOVX @DPTR,A /*写数据77H*/ HERE: MOV A,96H JNB ACC.1,HERE /*等待编程结束*/ MOV A,0E7H ANL 96H,A /*清除EEMEN和EEMWE*/ |