登录
首页 » 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 76
下载积分: 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 个回复

  • 生成SSE/SSE2分形
    Generating Fractals with SSE/SSE2 You probably have heard about fractals before. They are beautiful pictures such as the one shown above. Any fractal can be described using iterative formulas. So you can generate a fractal by evaluating these formulas and finding the color of each pixel. That is a large computational task, and drawing a fractal needs a fast CPU and a carefully optimized program.
    2022-04-23 12:16:57下载
    积分:1
  • C51 microcontroller applications, DS18B20 temperature measurement routines, temp...
    C51单片机应用,DS18B20测温应用例程,显示测量温度!-C51 microcontroller applications, DS18B20 temperature measurement routines, temperature measurements show!
    2023-07-13 14:10:03下载
    积分:1
  • IC卡燃气表设计.pdf(73页的论文)
    IC卡燃气表设计.pdf(73页的论文)----本文设 计了一个以预付为目的的IC卡燃气表。设计的题目来源于和一家苏州燃气表生产企业的项目合作,该项目主要包括IC卡燃气表、IC卡写卡器及售气管理系统三个部分。本人作为开发小组的成员之一,负责了IC卡燃气表的开发工作。-IC card gas meter design. Pdf (73 pages of paper )---- This article is designed for the purpose of a prepaid IC card gas meter. The title comes from the design, and a gas meter manufacturing enterprises in Suzhou project cooperation, the project mainly include IC card gas meter, IC card smart card device and the sale of gas management system in three parts. As a member of the development team is responsible for the IC card gas meter of the development.
    2023-06-25 15:40:03下载
    积分:1
  • 用单片机控制AD9852芯片生成信号的C程序
    用单片机控制AD9852芯片生成信号的C程序-AD9852 chip with MCU control signals generated C program
    2022-05-23 13:03:44下载
    积分:1
  • DS18B20 集成温度数字传感器 PDF资料文档
    DS18B20 集成温度数字传感器 PDF资料文档-DS18B20 integrated temperature digital sensor information on PDF documents
    2023-03-08 08:05:03下载
    积分:1
  • 89C52单片机12M晶振下DS18B20温度传感器测量温度应用子程序源码...
    89C52单片机12M晶振下DS18B20温度传感器测量温度应用子程序源码-89C52 microcontroller 12M under DS18B20 crystal temperature sensor temperature measurement applications subroutine FOSS
    2023-04-14 08:20:04下载
    积分:1
  • C8051F340/1/2/3/4/5/6/7/8/9/A/B devices are fully integrated mixed
    C8051F340/1/2/3/4/5/6/7/8/9/A/B devices are fully integrated mixed-signal System-on-a-Chip MCUs designed specifically for USB applications.-C8051F340/1/2/3/4/5/6/7/8/9/A/B devices are fully integrated mixed-signal System-on-a-Chip MCUs designed specifically for USB applications.
    2023-03-26 07:10:03下载
    积分:1
  • 时钟芯片H1380控制程序,实现单片机时钟功能
    时钟芯片H1380控制程序,实现单片机时钟功能-Clock Chip H1380 control procedures, to achieve single-chip clock function
    2022-02-06 13:52:22下载
    积分:1
  • 单片机用串口控制LED的C程序。相信大家看了后会有收获的
    单片机用串口控制LED的C程序。相信大家看了后会有收获的-Single-chip LED with Serial Control of C procedures. I believe everyone will be harvested after reading
    2022-02-13 22:14:03下载
    积分:1
  • 温湿度传感器驱动函数,IIC总线的,提供直接调用接口
    温湿度传感器驱动函数,IIC总线的,提供直接调用接口-Temperature and humidity sensor-driven function, IIC Bus, to provide direct call interface
    2022-03-01 04:13:39下载
    积分:1
  • 696518资源总数
  • 104569会员总数
  • 24今日下载