想请教大家一个EEPROM的擦写问题,我的芯片是S12DP256B
- UID
- 145509
- 性别
- 男
|
想请教大家一个EEPROM的擦写问题,我的芯片是S12DP256B
下面是我写的程序:
ECLKDIV=0x4B; any=(volatile unsigned int*)(0x0800); while(!(ECLKDIV & 0x80)){} while(!(ESTAT & 0x80)){} while(!(EPROT & 0x80)){} *any=0xff; ECMD=0x41; ESTAT|=0x80; while(!(ESTAT & 0x40)){} eear=(volatile unsigned int*)(0x0405); while(!(ECLKDIV & 0x80)){} while(!(ESTAT & 0x80)){} while(!(EPROT & 0x80)){} *eear=0x0302; ECMD=0x20; ESTAT|=0x80; while(!(ESTAT & 0x40)){}
我怎么老是写进去没有什么作用啊? 在地址0x0405里面总是FF,根本没有写进去,想请教一下是什么原因? |
|
|
|
|
|
- UID
- 158087
- 性别
- 男
|
http://bbs.eccn.com/dispbbs.asp?boardID=3&RootID=117778&ID=117778
看看这个可能有帮助, |
|
|
|
|
|