-
UART_TXaRX
单片机接收从电脑串口发送出来的一串字符串,却只能接收到第一个字符,其他的都丢失了或者是接收到的是乱码,却不知道是什么原因。其实,那是因为,虽然单片机的是全双工串口,但是串口的缓冲区(SBUF)却一般只有一个字节,即1Byte,远没有像电脑串口的缓冲区以KB计算那么大,并且,单片机的处理速度是很有限的,试想一下,假如要求一串字符串以9600bps的速率,一个起始位,一个结束位,无校正位,相当于960Byte/s传输到单片机,单片机要是能够全部接收的话,那么单片机接收和处理一个字节的时间仅为约1ms的时间。这说明了,如果单片机的处理速度不够快,还没有将接收到的上一帧数据及时转送到单片机的RAM中,而电脑串口又传输过来一帧新的数据,这帧新的数据就会把单片机的串口输入缓冲区的SBUF给刷新掉,或者说单片机压根就没有接收到新的一帧数据,造成了数据的丢失或接收到乱码。
如果需要单片机接收到从串口发送过来的一段很长的字符串,并且能够都正常接收和显示(TX&RX FUNCATION between PC and MCU)
- 2013-10-20 08:35:17下载
- 积分:1
-
ad9854扫频-8051
说明: ad9854,具备扫频功能,适合8051(AD9854, sweep function, suitable for 8051)
- 2020-03-12 23:35:00下载
- 积分:1
-
Sonoff-Tasmota-development
说明: Sonoff-Tasmota ESP8266 源码文件(Sonoff-Tasmota ESP8266)
- 2020-06-17 16:40:02下载
- 积分:1
-
final
基于stm32的水质自动采样器设计的源代码,里面包含了整个水质采样系统的运行代码。本项目是srtp国创优秀项目,之前还申请了专利。(Stm32 based automatic water quality sampling design source code, which includes the entire water sampling system to run code. This project is srtp Guochuang outstanding projects, also applied for a patent before.)
- 2016-01-17 16:56:47下载
- 积分:1
-
chinawiserv-oc-electricpowersystemplugin-7.3.1
modus进行智能电表DCS采集数据,实现pluginserver接口服务(modbus ing collect the some data of the mechine for ACurev-table)
- 2020-06-16 05:20:02下载
- 积分:1
-
ATK-ESP8266 WIFI用户手册_V1.3
说明: ATK-ESP8266 WIFI用户手册_V1.3(Atk-esp8266 WiFi user manual)
- 2020-04-15 20:31:07下载
- 积分:1
-
Light-cube
这是一个基于51单片机的光立方程序,可以实现多种LED显示功能(This is a light cube program based on 51 single chip microcomputer, can realize many kinds of LED display function
)
- 2014-04-25 21:24:02下载
- 积分:1
-
130110
控制蜂鸣器pic18单片机程序,测试通过,已批量生产。(Pic18 microcontroller program to control the buzzer)
- 2014-01-24 10:44:16下载
- 积分:1
-
connection-two-methods
connection的两种连通域方法,上传上去大家应该能看懂的,我从基础学的是能够看得懂,不懂得翻下书(The connection of the two methods of connected domain, uploaded you should be able to understand, I the foundation to learn is to be able to read, not understand through books)
- 2016-03-09 17:19:33下载
- 积分:1
-
User(IIC SUART3)
用stm8硬件 I2C 中断方式 发送/接收数据,
经过查阅手册和反复验证,已经完成了,话不多说,上代码。(With stm8 hardware I2C interrupt mode to send / receive data,
After reviewing the manual and repeated verification, has been completed, then not much on the code.)
- 2017-08-26 19:27:00下载
- 积分:1