登录
首页 » c » 串口通信课程设计

串口通信课程设计

于 2022-08-22 发布 文件大小:16.86 MB
0 78
下载积分: 2 下载次数: 1

代码说明:

#include     //52系列单片机头文件#define uchar unsigned char#define uint unsigned int sbit cs1=P2^3; //数码管段选信号sbit cs2=P2^2; //数码管段选信号sbit cs3=P2^1; //数码管段选信号sbit cs4=P2^0; //数码管段选信号sbit RE=P1^6; //低电平收数据,高电平发数据sbit DE=P1^7;   //低电平收数据,高电平发数据sbit key0=P1^0;   //主机用两个拨码开关sbit key1=P1^1; //主机用两个拨码开关uchar show_code[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x83,0xf8,0x80,0x98}; //数字0-9的显示码,更改数码管显示程序。uchar temp1=0,temp2=0;uchar count=0,sum=0;//void delayms(uint); //延时函数声明//void decide (void);void send_byte(uchar t)   //发送一个字节  发送一个数据后立马变成收数据的状态{ RE=1;  //高电平发    DE=1;  //高电平发         ES=0;    SBUF=t; while(!TI);   TI=0;ES=1; RE=0;  //低电平收    DE=0;  //低电平收}void delayms(uint xms) //延时

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Rle8Codec
    Rle8的解码程序(Rle8 decoding procedures)
    2021-03-29 21:59:10下载
    积分:1
  • RunExitProg
    VC++ source code, you can run new process or kill any running process.
    2014-08-12 08:32:07下载
    积分:1
  • HotKey
    通过VS2010建立一个MFC对话框程序,通过这个对话框程序来体现热键的开发过程,简单易懂(By establishing a VS2010 MFC dialog procedures, through this dialog box to reflect the hotkey program development process, easy to understand)
    2013-11-03 15:56:22下载
    积分:1
  • a
    说明:  算法实验指导书算法实验指导书算法实验指导书算法实验指导书(Experimental test algorithm instructions guide book algorithm algorithm algorithm for experimental experimental instructions guide book)
    2009-11-09 14:36:59下载
    积分:1
  • regshot_1.8.2_src_bin
    Regshot is a small,free and open-source registry compare utility that allows you to quickly take a snapshot of your registry and then compare it with a second one - done after doing system changes or installing a new software product.(Regshot is a small,free and open-source registry compare utility that allows you to quickly take a snapshot of your registry and then compare it with a second one- done after doing system changes or installing a new software product.)
    2009-07-30 18:20:00下载
    积分:1
  • -NCC
    说明:  此代码实现的功能是匹配—增加灰度处理,是一个NCC近似算法。(failed to translate)
    2010-04-18 21:25:39下载
    积分:1
  • 一种提高轻松添加Macromedia Flash电影的能力自定义控件…
    A custom webcontrol enhancing the ability to easily add a Macromedia flash movie to your webforms.
    2022-01-25 23:55:56下载
    积分:1
  • TCPARMCortexM3
    TCP_ARM Cortex-M3.rar
    2009-08-18 16:42:48下载
    积分:1
  • 读取短信并根据短信内容回复短信
    stm32与sim900A短可识别短信指令并回复用户
    2023-01-04 21:05:03下载
    积分:1
  • 无线模块
    说明:  基于stm8l151开发的lora模块,批量出货的产品。非常稳定。(Based on the Lora module developed by stm8l151, the products are shipped in batches. Very stable.)
    2020-08-28 17:52:27下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载