|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2011-2-13 22:37:31
|
显示全部楼层
回复【2楼】millwood0
"按上述步骤为何写不进去呀"
read the @#@#%@#% datasheet.
-----------------------------------------------------------------------
![](http://cache.amobbs.com/bbs_upload782111/files_36/ourdev_615875MHK7KB.GIF)
(原文件名:1.GIF)
手册上也是这么说的,看了好多遍这地方,仍没有发现问题所在,这么个简单的问题搞了一整天+一个晚上了
//写状态REG
void IO_Write_StatusReg(unsigned char byte)
{
IO_Write_Enable();//write enable
while((IO_Read_StatusReg()&0x03)!=0x02)//wait WEL=1 BUSY=0
;
_cs = 0; /* enable device */
IO_Send_Byte(W25P_WriteStatusReg); /* select write to status register */
IO_Send_Byte(byte); /* data that will change the status(only bits 2,3,7 can be written) */
_cs = 1; /* disable the device */
IO_Wait_Busy(1000);//1S 最大等待时间
} |
|