登录
首页 » SCM » 1. 本程序使用一个定时器和任意 2 个 I/O 口模拟一个串行口。 2. 1位起始位,8位数据位,1位停止位。发数据位时先发低位。 3. 支持半双...

1. 本程序使用一个定时器和任意 2 个 I/O 口模拟一个串行口。 2. 1位起始位,8位数据位,1位停止位。发数据位时先发低位。 3. 支持半双...

于 2022-06-19 发布 文件大小:4.09 kB
0 125
下载积分: 2 下载次数: 1

代码说明:

1. 本程序使用一个定时器和任意 2 个 I/O 口模拟一个串行口。 2. 1位起始位,8位数据位,1位停止位。发数据位时先发低位。 3. 支持半双工通讯。收、发波特率相同。 4. 应把定时器中断优先级设置为最高级。 5. 本程序每接收一个字节后就把它放到一个队列缓冲区中(也可使用环行缓冲区), 待缓冲区满后,将缓冲区中的内容原样发回。这是为了测试多字节连续收发的 能力和简化程序。实际应用中应防止缓冲区溢出。 6. 由接收转换到发送时要先调用 soft_send_enable (); 由发送转换到接收时要先调用 soft_receive_enable ()。 7. 发送最后一个字节后如果要立刻转为接收,必须等待最后一个字节后发送完毕 while ( rs_f_TI == 0) // 等待最后一个字节发送完毕-err

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

发表评论

0 个回复

  • 16位单片机对AD9854控制的实现,主要用于凌阳16位单片机
    16位单片机对AD9854控制的实现,主要用于凌阳16位单片机
    2022-03-23 19:33:33下载
    积分:1
  • 采用proteus仿真环境 可实现数控恒压电源的数控功能
    采用proteus仿真环境 可实现数控恒压电源的数控功能-Proteus simulation environment can be used to achieve constant voltage power supply NC NC function
    2022-03-22 20:57:28下载
    积分:1
  • 单片机proteus仿真,可以做成实例的仿真文件的
    单片机proteus仿真,可以做成实例的仿真文件的-protues
    2022-06-29 14:50:12下载
    积分:1
  • 两篇很好的论文,论文中就已经包括(c51编写)源码。很不容易从内网上获得。...
    两篇很好的论文,论文中就已经包括(c51编写)源码。很不容易从内网上获得。-Two very good papers, papers have been included (c51 prepared) source. Easy online access from the inside.
    2023-06-24 14:25:03下载
    积分:1
  • 万年历+温度+12864LCD,51单片机程序,proteus仿真,很好的
    万年历+温度+12864LCD,51单片机程序,proteus仿真,很好的-Calendar+ Temperature+ 12864LCD, 51 single-chip program, proteus simulation, good
    2022-07-19 05:55:51下载
    积分:1
  • ds2482
    ds2482-100是IIC协议转1-wire协议的接口芯片。本程序包利用ds2482-100操作温度传感器ds18s20。注意:ds18s20初始化后温度值为85摄氏度,必须多读几次温度以便其显示稳定。另外,文件中包含的一些头文件可以顾名思义,都是比较通用的(如IIC软件包),为节省篇幅,没有包含进来。请在 编译时自己根据接口函数添加。-ds2482-100 is IIC agreement to 1-wire agreement interface chip. The packages use ds2482-100 ds18s20 operating temperature sensor. Note : After initialization ds18s20 temperature of 85 degrees Celsius, to be read several times the temperature to show its stability. Also, the document contains a number of header files can name suggests, are relatively common (eg IIC package), To save space, are not included come. Please compiled under its own interface function was added.
    2022-08-23 23:28:31下载
    积分:1
  • Simulation of I2C bus interface, the realization of I2C devices send and receive...
    模拟I2C总线接口,实现I2C器件的发送和接受数据-Simulation of I2C bus interface, the realization of I2C devices send and receive data
    2022-02-03 13:11:13下载
    积分:1
  • PIC microcontroller
    PIC单片机驱动TCS230 TCS230可以辨别颜色,广泛用于各种领域-PIC microcontroller-driven TCS230
    2023-01-28 14:50:03下载
    积分:1
  • C8051f020 is based on the 51 nuclear industry eight most high
    C8051f020是基于51核的业界8位单片机最高速的,指令执行速度25MIPS。这个程序包是新华龙公司提供的,需要购买900元的开发系统才会赠送此文件包,先上传。可以用keil软件打开或者去www.xhl.com.cn下载IDE软件打开工程ps---c文件直接用记事本就ok啦^_^,里面有温度传感,步进电机等等源代码,方面移植!^_^-C8051f020 is based on the 51 nuclear industry eight most high-speed microcontroller, instruction execution speed MIPs. This package is a new company providing the Hualong, you need to buy 900 yuan development system will give this package, the first upload. Keil software can be used to open or download IDE www.xhl.com.cn open software engineering-- c ps documents directly on the notebook ok-- ^ _ ^, inside temperature sensor, stepper motors, etc. source code, area transplant! ^ _ ^
    2022-05-24 20:47:41下载
    积分:1
  • 使用PROTEUS仿真的推箱子游戏,全汇编格式,通过按钮操作,1602显示...
    使用PROTEUS仿真的推箱子游戏,全汇编格式,通过按钮操作,1602显示-PROTEUS simulation using the Sokoban game, the entire compilation format, through the button operation, 1602 show
    2022-12-23 20:05:03下载
    积分:1
  • 696516资源总数
  • 106446会员总数
  • 9今日下载