-
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
-
MPU6000
利用SPI总线读取MPU6000的值,传感器数据准备好后产生外部中断进而触发STM32去读取(The SPI bus read MPU6000 value, the sensor data is ready and then generate an external interrupt trigger STM32 to read)
- 2020-11-23 00:19:35下载
- 积分:1
-
led
at89c2051利用74ls164 驱动 共阳极数码管(74ls164 driver to use a total of at89c2051 digital tube anode)
- 2009-05-04 23:01:10下载
- 积分:1
-
granger_cause_BIC
Granger因果检验的程序,用BIC信息准则进行定阶,很实用。(Granger causality test procedures, using BIC information criterion to determine the order, it is practical!)
- 2016-08-20 16:42:54下载
- 积分:1
-
smscphy
This binding is compatible with the simple-panel binding, which is specified in simple-panel.txt in this directory.
- 2015-05-13 12:41:24下载
- 积分:1
-
SPWM_deadtime
适用于MSP430F5529,输出两路带死区的互补的SPWM波(It is suitable for MSP430F5529 and outputs two complementary SPWM waves with dead time.)
- 2018-07-20 18:59:00下载
- 积分:1
-
LPC2138RTC
LPC2138日历时钟,IAR代码+Proteus仿真(LPC2138 calendar clock, IAR code +Proteus simulation)
- 2021-04-07 15:19:01下载
- 积分:1
-
DataAdapter
使用DataAdapter对数据库进行操作
将SQL-search.aspx程序可改为使用DataAdapter对数据库进行操作.
程序使用"Dim objAdapt As New OleDbDataAdapter(strcmd,objCon)"创建了DataAdapter对象。(Use DataAdapter to operate the database
The SQL-search.aspx program can be changed using the DataAdapter to operate the database. The program uses "Dim objAdapt As New OleDbDataAdapter (strcmd, objCon)" Creating a DataAdapter object.
)
- 2013-12-27 21:39:40下载
- 积分:1
-
ad-E31TTL50
单片机ad转换 实时显示在1602上 并通过串口实时发送(Single chip microcomputer for AD conversion, and AD conversion data real-time display on 1602, and through wireless E31TTl50 serial port real-time send to other terminals)
- 2017-07-23 21:43:15下载
- 积分:1
-
k-fold_cross-validation_binary_libsvm
K fold cross validation on svm
- 2016-10-30 00:53:07下载
- 积分:1