文件名称:Serial-Print
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 32kb
- 下载次数:
- 0次
- 提 供 者:
- 张**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
本程序实现了以下功能:
单片机上电后等待从上位机串口发送来的命令,同时在数码管的前四位以十进制 显示
AD采集来的数值。
1)当收到以十六进制发送来的01后,向上位机发送字符串“Turn off ad!”,同时间隔
一秒读取AD的值,然后把AD转换过来的数表示成实际电压值(浮点数),并且从串口发
送给上位机,形式如“The voltage is 3.398438V”发送周期也是一秒一次。
2)当收到02时,向上位机发送“Turn off ad!”并停止发送电压值
3)收到其他数时显示“Error!”
本例模仿了《新概念》中例6.6.1。
但不相同的是:本程序用到了译码器数码显示、PCF8591_AD转换、串口发送与接收、I2C总线
等知识点!融合度高-This program the following functions: waiting for commands from the host computer serial port to send to the microcontroller is powered on, the top four in the digital control AD acquisition to the value displayed in decimal. 1) Upon receipt of the hexadecimal sent 01 up-bit machine to send the string " Turn off an ad!" At the same time interval of one second to read the value of AD, then the number of AD conversion over into the actual voltage value (float), and from the serial port to send to the host computer, forms such as the voltage is 3.398438V send cycle is also, once every second. 2) received 02, the upward-bit machine to send " Turn off ad!" And stop sending voltage 3) received a number of other shows the " Error" in this case mimic the " new concept" in the case of 6.6.1. But not identical: the procedures used in the decoder digital display PCF8591_AD conversion, send and receive serial port, I2C bus, and knowledge! Integrati
单片机上电后等待从上位机串口发送来的命令,同时在数码管的前四位以十进制 显示
AD采集来的数值。
1)当收到以十六进制发送来的01后,向上位机发送字符串“Turn off ad!”,同时间隔
一秒读取AD的值,然后把AD转换过来的数表示成实际电压值(浮点数),并且从串口发
送给上位机,形式如“The voltage is 3.398438V”发送周期也是一秒一次。
2)当收到02时,向上位机发送“Turn off ad!”并停止发送电压值
3)收到其他数时显示“Error!”
本例模仿了《新概念》中例6.6.1。
但不相同的是:本程序用到了译码器数码显示、PCF8591_AD转换、串口发送与接收、I2C总线
等知识点!融合度高-This program the following functions: waiting for commands from the host computer serial port to send to the microcontroller is powered on, the top four in the digital control AD acquisition to the value displayed in decimal. 1) Upon receipt of the hexadecimal sent 01 up-bit machine to send the string " Turn off an ad!" At the same time interval of one second to read the value of AD, then the number of AD conversion over into the actual voltage value (float), and from the serial port to send to the host computer, forms such as the voltage is 3.398438V send cycle is also, once every second. 2) received 02, the upward-bit machine to send " Turn off ad!" And stop sending voltage 3) received a number of other shows the " Error" in this case mimic the " new concept" in the case of 6.6.1. But not identical: the procedures used in the decoder digital display PCF8591_AD conversion, send and receive serial port, I2C bus, and knowledge! Integrati
(系统自动生成,下载前可以参看下载内容)
下载文件列表
串口通信打印程序\打印机的串口调试
................\打印机的串口调试.c
................\打印机的串口调试.hex
................\打印机的串口调试.lnp
................\打印机的串口调试.LST
................\打印机的串口调试.M51
................\打印机的串口调试.OBJ
................\打印机的串口调试.Opt
................\打印机的串口调试.plg
................\打印机的串口调试.Uv2
................\打印机的串口调试.__i
................\打印机的串口调试_Opt.Bak
................\打印机的串口调试_Uv2.Bak
................\说明.txt
串口通信打印程序
................\打印机的串口调试.c
................\打印机的串口调试.hex
................\打印机的串口调试.lnp
................\打印机的串口调试.LST
................\打印机的串口调试.M51
................\打印机的串口调试.OBJ
................\打印机的串口调试.Opt
................\打印机的串口调试.plg
................\打印机的串口调试.Uv2
................\打印机的串口调试.__i
................\打印机的串口调试_Opt.Bak
................\打印机的串口调试_Uv2.Bak
................\说明.txt
串口通信打印程序