<br />#define Port_Data port8000<br />#define Port_Ale port8004<br />#define Port_Cle port8002<br /><br />extern ioport unsigned int port8000;<br />extern ioport unsigned int port8004;<br />extern ioport unsigned int port8002;<br /><br />void nFlashObj::FlashId(void)<br />{<br /> FlashEnable();//使能FLASH<br /> Port_Cle = 0x90;<br /> __nop();//此处绝对不能少于2个nop()<br /> __nop();<br /> Port_Ale = 0x00;<br /> __nop();//此处绝对不能少于2个nop()<br /> __nop();<br /> FlashSck();//发送时钟信号<br /> MakerId = Port_Data;<br /> FlashSck();//发送时钟信号<br /> DeviceId = Port_Data;<br /> FlashSck();//发送时钟信号<br /> ThirdCyc = Port_Data;<br /> FlashSck();//发送时钟信号<br /> FourthCyc = Port_Data;<br /> FlashDisable();//禁止FLASH<br />//K9F1G08U0A的ID={0xec,0xec,0xf1,0x80,0x15}<br />//K9F1G08U0B的ID={0xec,0xec,0xf1,0x80,0x95}<br /> Active = (MakerId == 0xec) && <br /> (DeviceId == 0xf1) &&<br /> ((ThirdCyc == 0x80) || (ThirdCyc == 0x00)) && <br /> ((FourthCyc == 0x15) || (FourthCyc == 0x95));<br />}<br /> <br /> <br /><table class=ubb cellspacing=0><TR><td class=ubb><B>run_mo </B>发表于 2009-1-10 15:07 <font color=#336699><b>侃单片机</b></font> ←返回版面 <img src="https://bbs.21ic.com/club/bbs/images/profile.gif"> <img src="https://bbs.21ic.com/club/bbs/images/fav.gif"> <img src="https://bbs.21ic.com/club/bbs/images/edit.gif"></td></TR><TR><td class=ubb><br /><font color=#FF0066>楼主:</font> <U>ioport unsigned int port7000 什么意思</U></td></TR><TR><td class=ubb><br /><table class=ubb cellspacing=0><TR><td class=ubb>ioport unsigned int port7000 什么意思<br /><br /><br /><br /><br /><br /><br />您是否还在苦苦寻找更小体积的电源解决方案<br /><br />热门讲座:设计更轻松: 全新SIMPLE SWITCHER® 解决方案及设计工具<br /><br />最快的电路板打样 电路板雕刻加工服务 从一块板做起 24小时交货!</td></TR></table></td></TR></table><img src="https://bbs.21ic.com/club/bbs/Images/blank.gif"><br /><table class=ubb cellspacing=0><TR><td class=ubb><B><img src="https://bbs.21ic.com/club/bbs/images/emote/mood25.gif"> hotpower </B>发表于 2009-1-10 17:24 <font color=#336699><b>侃单片机</b></font> ←返回版面 <img src="https://bbs.21ic.com/club/bbs/images/profile.gif"> <img src="https://bbs.21ic.com/club/bbs/images/fav.gif"> <img src="https://bbs.21ic.com/club/bbs/images/edit.gif"></td></TR><TR><td class=ubb><br /><font color=#FF0066>2楼:</font> <U>DSP CCS下表示IO空间地址为0x7000的uint16型变量</U></td></TR><TR><td class=ubb><br /></td></TR></table>
|