摘 要:隨著人們生活水平的日益提高,工業控制的對象數量也與日俱增,對I/O模塊的開發需進一步加強。為了滿足工業控制方面的I/O數量多,操作方便,使用靈活,可靠性高等方面的較高要求,實現了一種基于STD總線,以工業控制計算機為主控制器,應用Xilinx公司的CPLD開發平臺,面向工業控制的多路數字I/O設計。工業控制計算機通過多路數字I/O板,實現了多達 128 位I/O被控對象的讀、寫控制,并且速度快、性能穩,能夠充分滿足工業控制的要求。
關鍵詞:STD總線; I/O; CPLD; 工業控制
中圖分類號:TP316 文獻標識碼:A
文章編號:1004-373X(2010)11-0200-03
Design of Multi-channel Digital I/O Based on STD Bus
SUN De-tian
(Shenyang Ligong University, Shenyang 110168, China)
Abstract: A design of multi-channel digital I/O interface module for industrial control is completed to meet the requirements of industrial control charactristics such as large number of multi-channel I/O interfaces, easy operation, flexible application, high reliability, which is based on STD bus, industrial control computer-based controller and CPLD(complex programmable logic device)development platform of Xilinx Corporation. The reading and writing control of 128-bit I/O controlled object was achieved with the technology by an industrial control computer.
Keywords: STD bus; I/O; CPLD; industrial control
在工業控制領域,數字I/O以其簡單、靈活的特性,得到了廣泛的應用。以往對于數字I/O的應用和數量增加的方法通常用GAL和專用I/O芯片采用譯碼擴展等方式來實現[1],這種方式盡管能夠滿足一定程度上的要求,但對于更大數量的I/O應用,比如幾十甚至上百路的數字I/O,就勉為其難了。為了滿足這種要求,并且進一步提高數字I/O的使用效率,專門針對多路數字I/O進行了基于STD總線的設計,應用Xilinx公司的CPLD進行編程開發,實現了64位數字輸入DIN 0~DIN 31和 64 位數字輸出DOUT 0~DOUT 31,同時每一路I/O可以獨立編程,既可以作為輸入又可以作為輸出。
1 STD總線
目前,STD標準[3]總線已成為工業控制領域內最流行的標準總線之一[4],主要用于8位微處理機和單片機工業控制系統。STD總線的典型結構如圖1所示。
在工業控制系統的實際應用中,上位機、主控模塊等往往需要通過STD總線,根據STD總線的協議、特性[5]訪問其他的單片機系統[1]。例如,在……