摘要
针对PLC主模块可用输出点数少的缺点,提出了采用SPI总线和移位寄存器HC595相结合扩展PLC输出点数,并设计了输出扩展电路;根据SPI总线及HC595的时序特点,确定了SPI的时钟模式,解决了时序的配合问题,并确定了输出点数的逻辑顺序;UDTY端接一下拉电阻,保证其处于高电平,SPI2CLK信号取反后输入到HC595,保证其采样到稳定的SPI输出数据,滤波电容,提高了电路抗干扰性能;编程实现对扩展输出点数的控制。实际应用表明,该设计方案经济、可靠。
In order to provide more available output points for PLC master module and integrate the SPI bus with the shift registers, a new method for extending PLC output points is proposed, and the output expansion circuit is designed. Based on the time serie characteristics of the SPI bus and the shift registers of HC595, select the clock mode of SPI, then matching problem of their series and logical output order are solved. A resistance is connected to UDTY port for insuring it high level, SPI2CLK negated then put into HC595, making sure it get steady data of SPI, improving the circuit anti-interference performances by filter capacitors, the extended output points is controlled by the programming. Practical application indicates that the design method is economic and reliable.
出处
《微计算机信息》
2012年第6期52-53,66,共3页
Control & Automation