-
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
-
ir-Lignt
红外遥控LED灯程序,三级调光。已做板过,可行。
使用PIC12F508芯片,汇编语言,懂行的请下吧。本人手机158 5770 1256 姜工。(Infrared remote control LED light program, three levels of dimming. Board has been done before, is feasible. Using the PIC12F508 chip, assembly language, knows the business to the next bar. I work phone 15857701256 Jiang.)
- 2011-06-09 23:38:38下载
- 积分:1
-
sketch_dec12a
说明: sketch_dec12a是arduino文件 读到上位机输出的字符串输出SD卡里面的语音信息。
sketch_dec12a是arduino文件 读到上位机输出的字符串输出SD卡里面的语音信息。(Sketch_dec12a is a string read from Arduino file to output from PC and output voice information in SD card.)
- 2018-12-25 10:36:42下载
- 积分:1
-
51子程序库
单片机汇编代码,有大部的多字节运算,通信和字符变换程序(MCU code compilation, the most multi-byte computing, communications and characters transform procedures)
- 2005-07-31 15:20:56下载
- 积分:1
-
1602huibian
1602LCD液晶秒表,实现的C语言源程序(1602LCD LCD stopwatch to achieve the C language source code)
- 2011-09-13 20:39:31下载
- 积分:1
-
LCD--FSMC
fsmc控制LCD液晶屏,通过外部sram(fsmc control LCD and adopt inside sram)
- 2018-05-05 13:57:06下载
- 积分:1
-
Blanket
用MSP430F203微控制器为核心构建的控温电热毯。以一个Pt1000热电阻作为传感器,用PID算法以PWM的方式控制加热输出,并通过一个共阳RGB LED显示多种设定和测试温度。通过Timer_A2构建了一个全双工串口与PC通讯。(A heat-blanket application by MSP430F2013 microcontroller. Sensor RTD Pt1000 measure the temperature, and a PWM output control heating power. Just one key is engaged to set the temperature. A common anode RGB three-color LED is used to indicate the setting temperature and the measured temperature. A full duplex serial port module is fulfilled by the Timer_A2.)
- 2014-11-30 17:03:06下载
- 积分:1
-
dianziqin
单片机开发学习资料,对学习单片机开发的人员有一定的帮助。(SCM learning materials, learning microcontroller development personnel have some help.)
- 2013-06-05 17:31:37下载
- 积分:1
-
jisuanqi
单片机计算机设计,实现加减乘除,包括小数点的运算,用的是4*4的键盘(Single chip computer design, realization add, subtract, multiply and divide, including the operations of the decimal point, with 4* 4 is the keyboard)
- 2011-08-31 18:50:05下载
- 积分:1
-
buzzer
应用51单片机写的蜂鸣器的祝福歌,里面有详细的代码(51 microcontroller blessing song written by buzzer)
- 2013-08-04 20:23:56下载
- 积分:1