文件名称: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
(系统自动生成,下载前可以参看下载内容)

下载文件列表

串口通信打印程序\打印机的串口调试

................\打印机的串口调试.c

................\打印机的串口调试.hex

................\打印机的串口调试.lnp

................\打印机的串口调试.LST

................\打印机的串口调试.M51

................\打印机的串口调试.OBJ

................\打印机的串口调试.Opt

................\打印机的串口调试.plg

................\打印机的串口调试.Uv2

................\打印机的串口调试.__i

................\打印机的串口调试_Opt.Bak

................\打印机的串口调试_Uv2.Bak

................\说明.txt

串口通信打印程序

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org