摘要
针对PLC主模块可用输入点数少的缺点,提出采用SPI总线和移位寄存器HC165相结合扩展PLC输入点数的方法,并设计了输入扩展电路;根据SPI总线和HC165的时序特点,确定SPI的时钟模式,解决时序的配合问题,并确定输入点数的逻辑顺序;通过在UDTX端接一个上拉电阻,保证其处于高电平状态;SPI2CLK信号取反后输入到HC165,以保证其采样的SPI输出数据是稳定的;滤波电容的作用是提高电路的抗干扰性能;通过编程来实现对扩展输入点数的控制。实际应用结果表明,该设计方案经济、可靠。
In order to provide more available input points for PLC master module and integrate the SPI bus with the shift registers,a new method for extending PLC input points is proposed,and the input expansion circuit is designed.Based on the time serie characteristics of the SPI bus and the shift registers of HC165,the clock mode of SPI is selected,then matching problem of their series and logical input order are solved.A resistance is connected to UDTX port for insuring its high level,SPI2CLK negated is then put into HC165,making sure it gets steady data of SPI,improving the circuit anti-interference performances by filter capacitors.The extended input points are controlled by the programming.Practical application indicates that the design method is eco-nomical and reliable.
出处
《淮阴工学院学报》
CAS
2011年第5期15-19,共5页
Journal of Huaiyin Institute of Technology