基于KL25 MCU,研究并探讨海明码校验技术在该类芯片中UART通信的应用实现方式,将海明码校验技术与UART通信一起组合并形成构件,由UART通信的初始化、接收和发送三种基本操作封装成三个独立对外的功能函数.加强UART通信的校验纠错性能,使得通信更稳定更可靠,并进行构件化,使得UART这种简洁通信方式有一个更好的应用前景.为了检测PC机与KL25 MCU以海明码校验技术通信的可行性,利用C#语言,运用海明码技术和串口控件进行编写PC端的程序,然后与KL25 MCU的评估板联机测试,完成了测试任务.该测试实例有利于辅助学生理解掌握海明码技术概念,所以该测试实例还被应用在硬件实验课上.
The paper presents a study of Hamming code checking technology in the application of UART communication based on KL25 MCU.The Hamming code checking technology is combined with UART communication to form a component.UART realizes the initialization,and sending and receiving.The three basic operations are encapsulated into three independent external functions.Strengthening the error correction performance of UART communication makes the communication more stable and reliable This communication forms a component,so that to make this simple means of UART communication have a better application prospect.In order to detect the feasibility of PC and KL25 MCU communication by Hamming code checking technology,a program is designed by using C# language and Hamming code,as well as the serial port control for PC side,then it completes the on-line test task with the KL25 MCU evaluation board.The test example helps students understanding the concept of Hamming code technology,and it is also used in hardware experiment class.