📄 spi.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0062)http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1397003 -->
<!--
- 21ic技术社区
- Based on Active BBS 5.0 By stars@21ic.com
- Last Updated: 2001-6-11
--><HTML><HEAD><TITLE>21ICBBS讨论</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type><LINK
href="spi.files/style.css" rel=STYLESHEET type=text/css>
<META content=0 http-equiv=Expires>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR></HEAD>
<BODY><IFRAME height=0 id=wFrameSpamReport name=wFrameSpamReport
src="about:blank" width=0></IFRAME>
<TABLE align=center cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD align=middle><IMG border=0 height=4 src="spi.files/blank.gif"
width=1><BR></TD></TR></TBODY></TABLE>
<SCRIPT language="" src="spi.files/dcookie.js"></SCRIPT>
<SCRIPT>
var maxLenth=60;
function showTitle(str){
document.write((str.length>(maxLenth+35)?str.substr(0,(maxLenth+35)-1)+"...":str))
}
function showRelateTopic(){
document.write((str.length>maxLenth?str.substr(0,maxLenth-1)+"...":str))
}
</SCRIPT>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD class=text9 vAlign=top width="100%"><IMG height=1
src="G:\hardwave\RF\RF905\spi.files\blank(1).gif" width=190><BR>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD class=pagehead noWrap>阅读帖子</TD></TR></TBODY></TABLE><IMG height=5
src="G:\hardwave\RF\RF905\spi.files\blank(1).gif"
width=1><BR></TD></TR></TBODY></TABLE>
<TABLE cellPadding=1 cellSpacing=2 width="100%">
<TBODY>
<TR>
<TD bgColor=#003399><FONT color=white>nrf905的SPI读写一体化函数</FONT></B></TD></TR>
<TR>
<TD bgColor=#e6f4ff><IMG align=absMiddle src="spi.files/mood.gif">
hotpower 发表于 2004-10-14 22:42 <FONT
color=#336699><STRONG>通信技术</STRONG></FONT> <A
href="http://www.21icbbs.com/club/bbs/list.asp?boardid=5"><FONT
color=red>←返回版面</FONT></A> <A
href="http://www.21icbbs.com/club/bbs/queryInfo.asp?key=&txtname=hotpower"
target=_blank><IMG alt=按此察看该网友的资料 border=0
src="spi.files/profile.gif"></A> <A
href="http://www.21icbbs.com/club/bbs/info/addToBookMark.asp?type=announce&boardID=5&id=1397003&topic=nrf905%B5%C4SPI%B6%C1%D0%B4%D2%BB%CC%E5%BB%AF%BA%AF%CA%FD&author=hotpower"><IMG
alt=按此把文章加入收藏夹 border=0 src="spi.files/fav.gif"></A> <A
href="http://www.21icbbs.com/club/bbs/ownerEditAnnounce.asp?v=&id=1397003"><IMG
alt=按此编辑本帖 border=0 src="spi.files/edit.gif"></A></TD></TR>
<TR>
<TD bgColor=#e6f4ff><BR>
<TABLE align=center cellPadding=3 cellSpacing=1 width="95%">
<TBODY>
<TR>
<TD
style="FONT-SIZE: 12px; LINE-HEIGHT: 18px">/*------------------------------------------------<BR> SPI读写一体化函数SpiReadWrite()<BR>入口参数:<BR> val 写入命令或数据<BR>出口参数:<BR> R7 读出数据<BR>------------------------------------------------*/<BR>unsigned
char SpiReadWrite(unsigned char val) using 0<BR>{<BR>unsigned char
i;<BR> ACC = val;<BR> for (i = 8; i > 0; i
--)<BR> {<BR> CY =
MISO;//取数据SO<BR> _rlca_();//存数据ACC.0读数据ACC.7同时进行<BR> MOSI
= CY;//送数据SI<BR> SCK =
1;//上升沿打入数据<BR> _nop_();<BR> SCK =
0;//下降沿读入数据(首次为假动作)<BR> }<BR> return
ACC;<BR>}<BR><BR>
<P align=center>
<CENTER></CENTER>
<P></P></TD></TR></TBODY></TABLE><BR></TD></TR></TBODY></TABLE><IMG height=5
src="G:\hardwave\RF\RF905\spi.files\blank(1).gif" width=1><BR>
<CENTER>
<TABLE align=center border=0 cellPadding=0 cellSpacing=3>
<TBODY>
<TR>
<TD>
<SCRIPT language=javascript src="spi.files/ShowBoardAd.htm"></SCRIPT>
</TD>
<TD width=119><!--放置站内通告开始 -->
<MARQUEE direction=up onmouseout="if (document.all!=null){this.start()}"
onmouseover="if (document.all!=null){this.stop()}" scrollAmount=4
scrollDelay=400 style="HEIGHT: 60px"><A
href="http://www.analog.com/bold/21icbanner"
target=_blank>好去处:Blackfin在线学习与开发(BOLD)</A> <BR><A
href="http://www.tidcasia.com/simp_registration.asp" target=_blank>TI开发商大会
---实际操作培训会</A>
<BR><!--放置站内通告结束 --></MARQUEE></TD></TR></TBODY></TABLE></CENTER>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD class=pagehead noWrap>相关帖子</TD></TR></TBODY></TABLE>
<UL></UL>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1396979"
target=_self>nrf905杂谈 </A>- hotpower <EM>2004-10-14 22:28:23</EM> <FONT
color=darkblue>[ID:1396979 点击:1618]</FONT> (7036 Bytes) <FONT
color=red>(24)</FONT> </SPAN>
<UL>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1500051"
target=_self>有没有人用过nRF2401? </A>- jinzhao <EM>2005-1-6 9:32:26</EM> <FONT
color=darkblue>[ID:1500051 点击:173]</FONT> (120 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood16.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1499206"
target=_self>要是之前看到这文章就好了。 </A>- lqnjerry <EM>2005-1-5 15:01:40</EM> <FONT
color=darkblue>[ID:1499206 点击:233]</FONT> (85 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1496354"
target=_self>遥控的问题 </A>- along1957 <EM>2005-1-3 15:30:45</EM> <FONT
color=darkblue>[ID:1496354 点击:161]</FONT> (102 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1495272"
target=_self>等着玩CELL吧,CELL将终结X86 </A>- cherrychip <EM>2005-1-1 22:56:01</EM>
<FONT color=darkblue>[ID:1495272 点击:156]</FONT> (33 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1494656"
target=_self>本想多玩玩...现在放弃51了...在玩AVR... <无内容></A> - hotpower
<EM>2004-12-31 20:29:16</EM> <FONT color=darkblue>[ID:1494656 点击:178]</FONT>
(0 Bytes) <FONT color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1493154"
target=_self>hotpower的头文件就是经典 </A>- tg.liu <EM>2004-12-30 18:55:28</EM> <FONT
color=darkblue>[ID:1493154 点击:260]</FONT> (75 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1492990"
target=_self>正在看NRF905 datasheet..... </A>- yuzhuju <EM>2004-12-30
16:56:26</EM> <FONT color=darkblue>[ID:1492990 点击:355]</FONT> (50 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1492459"
target=_self>怎么又喝上酒了? </A>- cherrychip <EM>2004-12-30 11:54:56</EM> <FONT
color=darkblue>[ID:1492459 点击:169]</FONT> (2 Bytes) <FONT color=red>(0)</FONT>
</SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1492124"
target=_self>?? </A>- OQOQ <EM>2004-12-30 9:22:28</EM> <FONT
color=darkblue>[ID:1492124 点击:173]</FONT> (86 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1490814"
target=_self>看你的作业写的怎么好,年底了要评三好学生,也补补课了 </A>- cherrychip <EM>2004-12-29
10:27:00</EM> <FONT color=darkblue>[ID:1490814 点击:220]</FONT> (138 Bytes)
<FONT color=red>(1)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1490363"
target=_self>cherrychip什么时候对此感兴趣了??? <无内容></A> - hotpower <EM>2004-12-28
21:22:07</EM> <FONT color=darkblue>[ID:1490363 点击:220]</FONT> (0 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1490351"
target=_self>麻烦告诉我一下这个NRF401是个啥东东? </A>- cherrychip <EM>2004-12-28
21:11:57</EM> <FONT color=darkblue>[ID:1490351 点击:186]</FONT> (12 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1402641"
target=_self>不敢谦虚... </A>- hotpower <EM>2004-10-19 22:24:39</EM> <FONT
color=darkblue>[ID:1402641 点击:366]</FONT> (164 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1402630"
target=_self>楼主好强,这种程序写的太象教学语言了,一丝不苟 </A>- 12864 <EM>2004-10-19 22:17:50</EM>
<FONT color=darkblue>[ID:1402630 点击:419]</FONT> (34 Bytes) <FONT
color=red>(1)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1402427"
target=_self>这里没人喜欢的... </A>- hotpower <EM>2004-10-19 19:06:15</EM> <FONT
color=darkblue>[ID:1402427 点击:337]</FONT> (28 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1402183"
target=_self>re </A>- hit100 <EM>2004-10-19 15:12:48</EM> <FONT
color=darkblue>[ID:1402183 点击:333]</FONT> (28 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1400369"
target=_self>今天彻底清除了讯通公司的错误演示程序,nRF905玩完了! </A>- hotpower <EM>2004-10-18
12:22:00</EM> <FONT color=darkblue>[ID:1400369 点击:731]</FONT> (67 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1397014"
target=_self>配置nRF905 </A>- hotpower <EM>2004-10-14 22:50:06</EM> <FONT
color=darkblue>[ID:1397014 点击:851]</FONT> (945 Bytes) <FONT
color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> nrf905的SPI读写一体化函数 -
hotpower <EM>2004-10-14 22:42:00</EM> <FONT color=darkblue>[ID:1397003
点击:828]</FONT> (540 Bytes) <FONT color=red>(0)</FONT> </SPAN>
<LI><SPAN class=text9><IMG src="spi.files/mood25.gif"> <A
href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&ID=1396997"
target=_self>ptr8000管脚定义及nrf905命令控制字 </A>- hotpower <EM>2004-10-14
22:39:44</EM> <FONT color=darkblue>[ID:1396997 点击:821]</FONT> (1074 Bytes)
<FONT color=red>(0)</FONT> </SPAN></LI></UL>
<UL></UL>
<UL></UL>最新100贴和BBS阅读方式目前只提供浏览功能;需要回复请 <A
href="http://www.21icbbs.com/club/bbs/list.asp?boardid=5"><FONT
color=red>先进入本版版面</FONT></A><BR><BR><!--<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td nowrap class="pagehead">转发帖子</td>
</tr>
</table><img src="Images/blank.gif" width="1" height="5"><br>-->
<SCRIPT language=javascript>
parent.parent.bLoad=false;
function doLogin(){
if (confirm('您只要登录社区就可以传图片\n你要现在登录吗?')){
if (document.all!=null){
var ret=showModalDialog("dialogLogin.asp?"+Math.random(),null,"center:yes;dialogWidth:300px;dialogHeight:150px")
if (ret!=null){
var Arr=new Array();
Arr=ret.split("|")
document.forms[1].username.value=Arr[0]
document.forms[1].userpwd.value=Arr[1]
// document.forms[1].ValidateCode.value=Arr[2]
document.forms[1].submit()
}
}
else{
window.location.href="../default.asp"
}
}
}
</SCRIPT>
<TABLE align=center cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD align=middle><IMG border=0 height=4 src="spi.files/blank.gif"
width=1><BR></TD></TR></TBODY></TABLE></LI></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -