一线总线器件异步读写实现方法  被引量:1

Implementing Method of Asynchronous Read-write for 1-wire Device

在线阅读下载全文

作  者:于志豪[1] 常龙[1] 肖林京[1] 张瑞雪[1] 槐瑞托[2] 

机构地区:[1]山东科技大学机械电子工程学院,山东青岛266590 [2]山东科技大学信息与电气工程学院,山东青岛266590

出  处:《自动化仪表》2014年第1期88-91,共4页Process Automation Instrumentation

基  金:山东省科技发展计划基金资助项目(编号:2012GSF11606);山东省教育厅课题基金资助项目(编号:J10LG17);青岛市关键技术攻关计划基金资助项目(编号:12-4-1-31-gx)

摘  要:针对一线总线读写时序过多占用微控制器(MCU)运算资源的问题,对一线总线器件异步读写方法进行了研究。以MCU作为一线总线器件的主控器,通过一个定时器的四个中断实现一线总线器件的读写时序。在进行一线总线数据读写前,MCU程序将读写内容译成相应的时序信息后以指令队列的形式存储。在一线总线读写过程中,定时器中断程序按事先存储于指令队列中的时序信息顺序修改定时器的计数器值,从而完成一线总线的异步读写。该方法将主要的延时工作交由定时器实现,最大程度地减少了CPU的占用率。Aiming at the problem of read/write timing of 1-wire bus excessively occupies operational resources of microcontroller; the asynchronous read-write method of the 1-wire bus devices is researched. With MCU as the main controller of the 1-wire bus device, the read/ write time sequence of 1-wire bus device is implemented through four interrupts of one timer. Before performing data read/write of 1-wire bus, the contents of read/write are translated into corresponding timing information, and stored as instruction queue form by MCU program. During the read/write process of 1 -wire bus, the timing information sequence pre-stored in instruction queue is modified into counting value of the timer by the interrupt program in timer, thus the asynchronous read-write of 1-wire bus is completed. With this method, the major time delay is implemented by the timer, so the occupation rate of the CPU is minimized.

关 键 词:一线总线 定时器中断 异步读写 指令队列 CPU占用率 

分 类 号:TP212.9[自动化与计算机技术—检测技术与自动化装置]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象