摘要
目的:基于实时操作系统uCOS-Ⅱ进行ATmega128串行通信驱动程序设计,作为智能化静脉麻醉靶控模块通信的一部分,与药物注射机械控制系统协同运行,以提高整个药代动力学目标控制注射系统的运行效率和实时性。方法:根据ATmega128微处理器USART特点,采用信号量、消息邮箱及环形缓冲队列,设计串口通信驱动模块。结果:串口驱动通信模块采用信号量、消息邮箱及环形缓冲区解决CPU快速处理和外部慢速通信接口的速度配合问题,并利用信号量和消息邮箱,实现串口通信中断服务与数据处理任务间数据传输的同步性和实时性。结论:通过实验验证了在多种不同通信速率下串行通信驱动模块数据传输的可靠性,该传输模块数据传输具有误码率低、传输稳定可靠的特点。
Objective: Based on real-time OS u COS II, to design the serial communication driver module of ATmega128. Methods: Based on the characteristics of microprocessor ATmega128 USART, we use semaphores, message mailbox and circular buffer queue to design serial communication module. Results: serial port driver communication module use semaphores, message mailbox and circular buffer solution to handle the problems of speed matching between CPU and external communication interface, and also use the semaphores, mailbox to realize synchrony and real time between serial communication interrupt service and data processing tasks. Conclusion: Experiments verify the reliability of data transmission of the driver module for serial communication in a variety of different communication rate. The experiment shows that the transmission module with the characteristics of low error rate, stable and reliable transmission of data transmission.
出处
《中国医学装备》
2016年第11期98-103,共6页
China Medical Equipment
基金
广东省科技计划(2012A032200023)“HL7标准三通道静脉麻醉输注系统关键技术研究”
广东省科技计划(2013B090500113)“智能化静脉麻醉靶控输注工作站的研制及产业化”
关键词
实时操作系统uCOS-Ⅱ
信号量
消息邮箱
串行通信
驱动程序
静脉麻醉输注系统
Real time operation system uCOS-Ⅱ
Semaphores
Message mailbox
Serial communication
Driving program
Intravenous anesthesia infusion system