摘要
在分析了单片机涵义和串口通信工作方式的基础上,结合前期采用汇编语言编写的单片机应用系统程序可读性差、可移植性不好,且程序编写周期长、调试比较困难等问题,文中倡导以C语言作为编写单片机应用系统的编程语言,从而使得单片机能巧妙利用C语言实现单片机之间的多机高效通信,充分展示出单片机使用寿命长、运行速度快、低噪音、技术可靠的特征。实验结果表明,单片机应用系统中使用C语言编写的程序可读性、可移植性、稳健性更强,能使串口通信更加高效、便捷、可靠。同时使得价格低、稳定性强、功能好、功耗小等这些单片机的特点得到更充分的发挥。
After analyzing the meaning of Single Chip Microcomputer( SCM) and the manner of work in serial port communication,combined the problem of poor readability and portability,long programming cycle and difficult debugging for single chip application system written by assembly language,it advocates to C language as programming language to write single-chip microcomputer application system in this paper and makes SCMto realize the efficient connection in many SCMs by C language,which fully shows the characteristics of SCM,such as long service life,fast operation,lownoise,and reliable technique. The experiment shows that the program which made in C language is better in readability,transportability and stability. It makes serial port communication more efficient,easy and reliable and the characteristics of SCMto get more sufficient play,including lowprices,strong stability,good function,and lowconsumption and so on.
出处
《计算机技术与发展》
2016年第7期160-163,共4页
Computer Technology and Development
基金
2012年陕西省科技计划项目(2012JM8048)
陕西省渭南市科技创新扶持资金(2012KYJ-6)
关键词
单片机
C语言应用
程序编写
串口通信
single chip microcomputer
application of C language
program writing
serial port communication