把单片机串口通讯改造为SPI通讯接口源程序.rar

  • 软件商
    了解作者
  • C/C++
    开发工具
  • 3KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 76
    下载次数
  • 2005-09-17 20:48
    上传日期
把单片机串口通讯改造为SPI通讯接口源程序,使用C51语言编写,可以用于MCS8051单片机
把单片机串口通讯改造为SPI通讯接口源程序.rar
  • 把单片机串口通讯改造为SPI通讯接口源程序.doc
    26KB
  • www.pudn.com.txt
    218B
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/622b3000ff7f9c46a6912385/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/622b3000ff7f9c46a6912385/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#25226;&#21333;&#29255;&#26426;&#20018;&#21475;&#36890;&#35759;&#25913;&#36896;&#20026;<span class="ff2 sc1">SPI</span>&#36890;&#35759;&#25509;&#21475;&#28304;&#31243;&#24207;</div><div class="t m0 x2 h4 y3 ff3 fs1 fc0 sc1 ls0 ws0">SPI<span class="_ _0"> </span><span class="ff1">&#21453;&#24207;&#25509;&#25910;</span>/<span class="ff1">&#21457;&#36865;&#23376;&#31243;&#24207;</span>:</div><div class="t m0 x2 h4 y4 ff3 fs1 fc0 sc1 ls0 ws0">RECEIVE:<span class="_ _1"> </span>;<span class="ff1">&#25509;&#25910;&#19968;&#20010;&#23383;&#33410;&#25968;&#25454;</span>,<span class="ff1">&#37319;&#29992;&#26597;&#35810;&#25509;&#25910;&#26041;&#24335;</span></div><div class="t m0 x3 h4 y5 ff3 fs1 fc0 sc1 ls0 ws0">SETB REN<span class="_ _2"> </span>;<span class="ff1">&#20801;&#35768;&#25509;&#25910;</span></div><div class="t m0 x3 h4 y6 ff3 fs1 fc0 sc1 ls0 ws0">CLR RI<span class="_ _3"> </span>;<span class="ff1">&#28165;&#38500;&#25509;&#25910;&#20013;&#26029;&#35831;&#27714;&#26631;&#24535;&#20301;</span></div><div class="t m0 x3 h4 y7 ff3 fs1 fc0 sc1 ls0 ws0">JNB R1,$<span class="_ _4"> </span>;<span class="ff1">&#31561;&#24453;&#25509;&#25910;</span></div><div class="t m0 x3 h4 y8 ff3 fs1 fc0 sc1 ls0 ws0">MOV A,SBUF<span class="_ _5"> </span>;<span class="ff1">&#24320;&#22987;&#25509;&#25910;</span></div><div class="t m0 x3 h4 y9 ff3 fs1 fc0 sc1 ls0 ws0">CALL CHANGE<span class="_ _6"> </span>;<span class="ff1">&#21453;&#24207;&#25490;&#21015;&#25968;&#25454;</span></div><div class="t m0 x3 h5 ya ff3 fs1 fc0 sc1 ls0 ws0">RET</div><div class="t m0 x2 h4 yb ff3 fs1 fc0 sc1 ls0 ws0">SEND:<span class="_ _7"> </span>;<span class="ff1">&#21457;&#36865;&#19968;&#20010;&#23383;&#33410;&#25968;&#25454;&#23376;&#31243;&#24207;</span></div><div class="t m0 x3 h4 yc ff3 fs1 fc0 sc1 ls0 ws0">CALL CHANGE<span class="_ _6"> </span>;<span class="ff1">&#21453;&#24207;&#25490;&#21015;&#25968;&#25454;</span></div><div class="t m0 x3 h4 yd ff3 fs1 fc0 sc1 ls0 ws0">CLR TI<span class="_ _8"> </span>; <span class="ff1">&#28165;&#38500;&#21457;&#36865;&#20013;&#26029;&#35831;&#27714;&#26631;&#24535;&#20301;</span></div><div class="t m0 x3 h4 ye ff3 fs1 fc0 sc1 ls0 ws0">MOV SBUF,A<span class="_ _5"> </span>;<span class="ff1">&#24320;&#22987;&#21457;&#36865;</span></div><div class="t m0 x3 h4 yf ff3 fs1 fc0 sc1 ls0 ws0">JNB TI,$<span class="_ _9"></span>;<span class="ff1">&#31561;&#24453;&#21457;&#36865;&#23436;&#27605;</span></div><div class="t m0 x3 h5 y10 ff3 fs1 fc0 sc1 ls0 ws0">RET</div><div class="t m0 x2 h4 y11 ff3 fs1 fc0 sc1 ls0 ws0">CHANGE:<span class="_ _a"> </span>;<span class="ff1">&#29992;&#20110;&#21453;&#24207;&#25490;&#21015;&#19968;&#20010;&#23383;&#33410;</span></div><div class="t m0 x4 h4 y12 ff3 fs1 fc0 sc1 ls0 ws0">;<span class="ff1">&#23558;&#25968;&#25454;&#20174;&#26368;&#39640;&#20301;&#24320;&#22987;&#19968;&#20301;&#19968;&#20301;&#24038;&#31227;&#20986;&#26469;</span>,<span class="ff1">&#20877;&#21491;&#31227;&#23384;&#20837;<span class="_ _0"> </span></span>R2<span class="_ _0"> </span><span class="ff1">&#20013;</span></div><div class="t m0 x3 h4 y13 ff3 fs1 fc0 sc1 ls0 ws0">MOV R1,A<span class="_ _b"> </span>;<span class="ff1">&#23558;&#25968;&#25454;&#25918;&#20837;&#26242;&#23384;&#23492;&#23384;&#22120;&#20013;</span></div><div class="t m0 x3 h4 y14 ff3 fs1 fc0 sc1 ls0 ws0">MOV R2,#00H<span class="_ _c"> </span>;<span class="ff1">&#28165;&#38646;&#26242;&#23384;&#23492;&#23384;&#22120;</span></div><div class="t m0 x3 h4 y15 ff3 fs1 fc0 sc1 ls0 ws0">MOV R7,#08H<span class="_ _c"> </span>;<span class="ff1">&#35774;&#23450;&#24490;&#29615;&#27425;&#25968;</span></div><div class="t m0 x2 h5 y16 ff3 fs1 fc0 sc1 ls0 ws0">LOOP1:</div><div class="t m0 x3 h5 y17 ff3 fs1 fc0 sc1 ls0 ws0">MOV A,R1<span class="_ _b"> </span>;</div><div class="t m0 x3 h4 y18 ff3 fs1 fc0 sc1 ls0 ws0">CLR C<span class="_ _d"> </span>;<span class="ff1">&#23558;<span class="_ _0"> </span></span>C<span class="_ _0"> </span><span class="ff1">&#28165;&#38646;</span></div><div class="t m0 x3 h4 y19 ff3 fs1 fc0 sc1 ls0 ws0">RLC A<span class="_ _d"> </span>;<span class="ff1">&#23558;<span class="_ _0"> </span></span>A<span class="_ _0"> </span><span class="ff1">&#20013;&#25968;&#25454;&#24038;&#31227;&#19968;&#20301;</span></div><div class="t m0 x3 h5 y1a ff3 fs1 fc0 sc1 ls0 ws0">MOV R1,A<span class="_ _b"> </span>;</div><div class="t m0 x3 h4 y1b ff3 fs1 fc0 sc1 ls0 ws0">MOV A,R2<span class="_ _b"> </span>;<span class="ff1">&#23558;&#26242;&#23384;&#23492;&#23384;&#22120;&#20013;&#25968;&#25454;&#25918;&#20837;<span class="_ _0"> </span></span>A<span class="_ _0"> </span><span class="ff1">&#20013;&#36827;&#34892;&#21491;&#31227;&#19968;&#20301;</span></div><div class="t m0 x3 h5 y1c ff3 fs1 fc0 sc1 ls0 ws0">RRC A</div><div class="t m0 x3 h5 y1d ff3 fs1 fc0 sc1 ls0 ws0">MOV R2,A</div><div class="t m0 x3 h5 y1e ff3 fs1 fc0 sc1 ls0 ws0">DJNZ R7,LOOP1</div><div class="t m0 x3 h5 y1f ff3 fs1 fc0 sc1 ls0 ws0">MOV A,R2</div><div class="t m0 x3 h5 y20 ff3 fs1 fc0 sc1 ls0 ws0">RET</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • LIS3DH 串口输出 C51.zip
      串口输出测试代码SPI读写代码全部编写完成
    • DIY-MP3-51单片机
      通过CH375模块读取U盘内容,由51单片机作为控制芯片,VS1003进行音频解码。实现了自制的MP3。 (按键可进行音量,上下一曲等调节;内附CH375的单独并行程序) 实物制作成果过~效果不错哦亲
    • c51各种总线源代码
      51单片机 232接口 I2C总线 485总线 SPI接口,1WIRE总线接口源代码
    • 单片机系统实验指导书
      TD-51单片机系统实验指导书 ,内容比较详细,有数码转换、运算、定时器、中断、A/D、步进电机等内容。
    • 单片机开发板资料.rar
      这里讲叙的是单片机开发板的一些相关资料,和一些图片说明。
    • C8051单片机学习资料!
      这是C8051F系列单片机学习的经典资料!大家有需要的可以看一看啦!
    • 51单片机轻松入门
      本书以最新流行的不需要外部晶振与复位电路的可仿真的高速 STC15 系列单片机为核心,详细介绍了单片机内部功能模块,比如定时器、中断、串口SPI 接口、片内比较器、ADC 转换器、可编程计数器阵列(CCP/PCA/PWM)等。...
    • C51驱动DAC7612数模转换
      51单片机串口接收数据,然后通过SPI方式控制DAC7612输出转换成模拟信号。
    • 单片机串口MODBUS-RTU通讯
      利用单片机串口,实现MODBUS-RTU协议通讯的方法。
    • Proteus7.12.rar
      Proteus7.12完美破解版.rar电路仿真软件很好用可以仿真单片数字模拟电路