TW201138305A - RS-422/485 dual-use signal converter having function of automatically determining interface configuration - Google Patents

RS-422/485 dual-use signal converter having function of automatically determining interface configuration Download PDF

Info

Publication number
TW201138305A
TW201138305A TW99112474A TW99112474A TW201138305A TW 201138305 A TW201138305 A TW 201138305A TW 99112474 A TW99112474 A TW 99112474A TW 99112474 A TW99112474 A TW 99112474A TW 201138305 A TW201138305 A TW 201138305A
Authority
TW
Taiwan
Prior art keywords
receiving
data
control unit
interface
logic unit
Prior art date
Application number
TW99112474A
Other languages
Chinese (zh)
Other versions
TWI426708B (en
Inventor
ming-zheng Lin
Original Assignee
Sunix Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sunix Co Ltd filed Critical Sunix Co Ltd
Priority to TW99112474A priority Critical patent/TW201138305A/en
Publication of TW201138305A publication Critical patent/TW201138305A/en
Application granted granted Critical
Publication of TWI426708B publication Critical patent/TWI426708B/zh

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention relates to an RS-422/485 dual-use signal converter having function of automatically determining interface configuration, which includes a serial interface; a transmission control unit and a receiving control unit; an AND gate; and a logical controller, wherein the AND gate is connected to the receiving control unit after connecting two output ends of the serial interface. Further, the logical controller is connected to a receiving end of one of the receiving control unit and the serial interface. Accordingly, when obtaining receiving data of the serial interface through the AND gate, the receiving control unit responds the current receiving state to the logical controller. The logical controller determines whether or not the single serial interface is RS-422 or RS-485 communication state based upon electrical potential difference of the receiving end connected thereto.

Description

201138305 六、發明說明: 【發明所屬之技術領域】 本發明係關於一種RS_422/485兩用訊號轉換器,尤指一種 具自動判斷介面形態之RS-422/485兩用訊號轉換器。 【先前技術】 美國電子工業聯盟(HIA)制定EIA-RS-232(RS232)、EIA-RS-422(以下稱 RS-422)、EIA-RS-485(以下稱 RS-485)均為 φ 常見的串列通訊標準,其中後期制定之RS-422、RS-485係為 了改善RS232通訊距離短(最大通訊距離15公尺)及傳送速率低 的缺點而設,即具有最大1219公尺的通訊距離及最高i〇Mb/s 傳輸速率,因此RS-422、RS-4 85轉換器適用於距離遠之電腦丨/〇 連接用,如第三圖所示,若二台電腦(40)距離超過20公尺時, 則大多採用RS-422或RS-485傳輸線(20)連接其丨/〇介面以進 行通訊β 由於RS-422為全雙工通訊而RS-485為半雙工通訊,其 鲁 所使用傳輸線並不相同,如第四圖及第五圖所示,RS-422及 RS-485串列介面(56)(55)均係包含有一傳送邏輯元件(D)及— 接收邏輯元件(R),由於RS-422採全雙工通訊模式,故其rs-422 傳輸線(30)包含有二組雙絞線,以分別與傳送邏輯元件(D)及接 收邏輯元件(R)連接,是以,當二組RS-422串列介面(56)進行 串列資料傳輸時,即可同時收發對方的串列資料。至於RS_485 傳輸線(20)係包含單組雙絞線,故與該Rs_485傳送及接收邏輯 元件(D)(R)係共同連接後再連接至該雙絞線,由於共用一條雙絞 線,故必須在同一時間僅設定其中一組RS-485串列介面(55)為 3 201138305 傳送狀態’另一組RS-485串列介面(55)為接收狀態。 目前市面上支援RS-422/485雙介面之訊號轉換器常見的 為一種裝設於電腦(40)内的通用異步收發傳輸器(Universal Asynchronous Receiver/T ransmitter ; 以 下簡稱 UART)(50) ’如第六圖及第七圖所示,其包含有: 一控制電路(51) ’係透過匯流排(42)與電腦(40)之中央處理 器(41)連接; 一飽得率產生器(52),係連接至該控制電路(51); 鲁一資料傳送單元(53) ’係連接至資料匯(42)流排,並包含有 一傳送用緩衝暫存區(531)及一傳送用移位器(532),該傳送用緩 衝暫存區(531)係將電腦(40)資料匯流排(42)之並列資料暫存, 再由傳送移位器(531)將暫存的並列資料,依序位元高低次序向 外傳送,達到並列資料轉換為串列資料功能; 一資料接收單元(54),係連接至資料匯流排(42),並包含一 接收用緩衝暫存區(541)及一接收用移位器(542),該接收用移位 器(542)係將外部傳送來的串列資料依序存入該接收用緩衝暫存 Φ 區(541)中’由接收用緩衝暫存區(541)將並列資料輸出至該資料 匯流排(42)中,以達到串列資料轉換為並列資料功能; 一 RS-485/RS-422串列介面(55),係包含有一接收端 (DI)、一傳送端(|^〇)、一致能端(已|\|)、一收發蟑(丁乂/尺父)及一 接收埠(RX),其中該接收端(DI)係連接至該資料傳送單元(53)的 輪出端,而其傳送端(R0)則是連接至該資料接收單元(54)的輸入 端,又該RS-485/422串列介面(55)的致能端(EN)則連接至該 資料傳送單元(53),由該資料傳送單元(53)決定是否致能,而該 收發埠(TX/RX)則是供外部RS-485傳輸線連接,又該收發埠 4 201138305 (TX/RX)及接收埠係供外部RS 422傳輸線連接;及 一切換開關(56),係連接於rs-485/RS-422串列介面(55) 收發槔(TX/RX)及接收崞(RX)之自,以決定該接收淳(τχ)是否連 接至收發埠(TX/RX)。 由上述說明可知’該UART係包含有一 RS-485/422串列 介面(55)’故可提供使用者選擇使用rs_422的全雙工通訊或 RS-485的半雙工通訊’當使甩者選擇rS_485的半雙工通訊時, 即設定該切換開關(56)為開啟導通,令收發埠(TX/RX)連接至該 φ 接收埠(TX)’以與RS-485傳輸線雙紋線連接,進行半雙工通訊; 若使用者欲選擇RS-422通訊,則令切換開關(56)為關閉不導通, 令收發埠(TX/RX)與RS-422其中一雙絞線連接,作為串列資料 傳輸埠用,而接收埠(RX)則與RS-422另一雙絞線連接,作為串 列資料接收用。 由上述說明可知,雖然目前UART使用單一 RS-485串列 介面配合切換開關,提供使用者切換RS-422或RS-485通訊, 但必須手動控制切換開關,仍造成使用上的麻煩,有必要進一步 # 改良之。 【發明内容】 有鑑於上述既有RS-422及RS-485兩用訊號轉換器的缺 失,本發明主要目的係提供一種自動判斷介面形態之RS-422/485 兩用訊號轉換器。 欲達上述目的所使用的主要技術手段係令該自動判斷介面形 態之RS-422/485兩用訊號轉換器,其包含有: m 一串列介面,係包含有一傳送邏輯單元及一第一及第二接收 5 201138305 邏輯單元’其中該傳送邏輯單元的輸出端及第一接收邏輯單元的 輸入端係共同連接,供Rs_485傳輸線連接;又該傳送邏輯單元 與接收邏輯單元係供RS-422傳輸線連接; 傳送控制單tl,係連接至該串列介面之傳送邏輯單元的輸 =端及致能端,並包含有—傳送致能端及―資料接收端;其中該 資料接收端係接收串列或並列資料; 閘,其二輸入端分別連接至該串列介面的第 收邏輯單元之輸出端,以整合二個輸出端為單一輸出端;201138305 VI. Description of the Invention: [Technical Field] The present invention relates to an RS_422/485 dual-purpose signal converter, and more particularly to an RS-422/485 dual-purpose signal converter having an automatic judgment interface form. [Prior Art] The American Electronics Industry Alliance (HIA) has developed EIA-RS-232 (RS232), EIA-RS-422 (hereinafter referred to as RS-422), and EIA-RS-485 (hereinafter referred to as RS-485). The serial communication standard, in which the late-developed RS-422 and RS-485 are designed to improve the short distance of RS232 communication (maximum communication distance of 15 meters) and low transmission rate, that is, the communication distance of up to 1219 meters. And the highest i〇Mb/s transmission rate, so the RS-422 and RS-4 85 converters are suitable for remote computer/丨 connection, as shown in the third figure, if the distance between two computers (40) exceeds 20 In the case of meters, most of them use RS-422 or RS-485 transmission line (20) to connect their 丨/〇 interface for communication. Because RS-422 is full-duplex communication and RS-485 is half-duplex communication, its Lu The transmission lines are not the same. As shown in the fourth and fifth figures, the RS-422 and RS-485 serial interface (56) (55) both contain a transfer logic element (D) and a receive logic element (R). ), since RS-422 adopts full-duplex communication mode, its rs-422 transmission line (30) contains two sets of twisted pairs to transmit logic components (D) and Receiving logic element (R) is connected, is, when two groups RS-422 serial interface (56) for serial data transmission, to simultaneously transmit and receive serial data each other. As for the RS_485 transmission line (20), which includes a single twisted pair, it is connected to the Rs_485 transmission and reception logic component (D) (R) and then connected to the twisted pair. Since a twisted pair is shared, it is necessary to share a twisted pair. At the same time, only one set of RS-485 serial interface (55) is set to 3 201138305 transmission state 'the other group RS-485 serial interface (55) is the receiving state. At present, the RS-422/485 dual interface signal converter is commonly used as a universal asynchronous receiver (Universal Asynchronous Receiver/Transmitter; hereinafter referred to as UART) (50). The sixth and seventh figures include: a control circuit (51) 'connected to the central processing unit (41) of the computer (40) through the bus bar (42); a saturation rate generator (52) ) is connected to the control circuit (51); the Luyi data transfer unit (53) is connected to the data sink (42) stream, and includes a transfer buffer temporary storage area (531) and a transfer shift (532), the transfer buffer temporary storage area (531) temporarily stores the parallel data of the computer (40) data bus (42), and then the temporary data stored by the transfer shifter (531) The order bit is transferred to the external data order to convert the parallel data into a serial data function; a data receiving unit (54) is connected to the data bus (42) and includes a receiving buffer temporary storage area (541) and a receiving shifter (542), the receiving shifter (542) is external The transmitted serial data is sequentially stored in the receiving buffer temporary storage Φ area (541). The parallel data is outputted from the receiving buffer temporary storage area (541) to the data bus (42) to reach the string. The column data is converted into a parallel data function; an RS-485/RS-422 serial interface (55) includes a receiving end (DI), a transmitting end (|^〇), and a consistent end (has |||) a transceiver (Ding/Foot) and a receiver (RX), wherein the receiving end (DI) is connected to the rounding end of the data transfer unit (53), and the transmitting end (R0) is Connected to the input end of the data receiving unit (54), and the enabling end (EN) of the RS-485/422 serial interface (55) is connected to the data transfer unit (53), and the data transfer unit ( 53) Decide whether to enable or not, and the transceiver (TX/RX) is for external RS-485 transmission line connection, and the transceiver 4 201138305 (TX/RX) and receiving system are connected to the external RS 422 transmission line; The switch (56) is connected to the rs-485/RS-422 serial interface (55) transceiver (TX/RX) and receiver (RX) to determine whether the receiver (τχ) is connected. Port to the transceiver (TX / RX). As can be seen from the above description, 'The UART system includes an RS-485/422 serial interface (55)', so users can choose to use rs_422 full-duplex communication or RS-485 half-duplex communication. In the half-duplex communication of rS_485, the switch (56) is set to be turned on, and the transceiver TX (TX/RX) is connected to the φ receive 埠 (TX)' to be connected to the RS-485 transmission line double-line. Half-duplex communication; if the user wants to select RS-422 communication, the switch (56) is turned off and non-conducting, so that the transceiver (TX/RX) is connected to one of the RS-422 twisted wires as the serial data. The transmission is used, and the receiving port (RX) is connected to another twisted pair of RS-422 for receiving serial data. As can be seen from the above description, although the UART currently uses a single RS-485 serial interface with a switch to provide users with switching RS-422 or RS-485 communication, it is necessary to manually control the switch, which still causes trouble in use, and further needs to be further #改善的. SUMMARY OF THE INVENTION In view of the above-mentioned shortcomings of the existing RS-422 and RS-485 dual-purpose signal converters, the main object of the present invention is to provide an RS-422/485 dual-purpose signal converter that automatically determines the interface configuration. The main technical means for achieving the above purpose is to automatically determine the interface form of the RS-422/485 dual-purpose signal converter, which comprises: m a serial interface, comprising a transmission logic unit and a first The second receiving 5 201138305 logic unit 'where the output end of the transmitting logic unit and the input end of the first receiving logic unit are connected in common for the Rs_485 transmission line connection; and the transmitting logic unit and the receiving logic unit are connected to the RS-422 transmission line The transmission control unit t1 is connected to the input terminal and the enable terminal of the transmission logic unit of the serial interface, and includes a transmission enable end and a data receiving end; wherein the data receiving end receives the serial or Parallel data; gate, the two input ends are respectively connected to the output end of the first logic unit of the serial interface, to integrate the two output ends into a single output end;

一接收控制單元,係連接至該及閘輸出端,以取得第一或第 二接收邏輯單元的接收資料,並包含有-詩輸出端及—介面狀 態輸出端’ ·當該接收控制單元接收來自及閉資料,則自該介面狀 態輸出端輪出一接收狀態訊號;而資料輸出端係為輸出串列或並 列資料;及 -邏輯控制器,係連接至該傳送控制單元 接收控制單元的介面狀態輸«,以及該㈣介面的第—接收邏 輯早疋之輸出端,依據接收控制單元的介面狀態輸出端及第一接 收邏輯單元之輸出端訊號,該㈣介面為rs_42 8 訊狀態。 - 〃由上述說明可知,該接收控制單元透過及閘取得該串列介面 =-或第二接收邏輯單元所接㈣轉,並於接收及閘傳來資 ;’:日守’將接收狀態訊號回傳給該邏輯控制器,由該邏輯控制器進 =㈣曰斷^其連接之第一接收邏輯單元輸出端是否正在接收資 科,右疋則判斷目前為RS屬通訊;反之則判斷為Rs_422通 心疋以,本發明的訊號轉換器只提供—組串列 可供使用者選擇RS-485…”列的 =a receiving control unit is connected to the gate output to obtain the received data of the first or second receiving logic unit, and includes a -pod output and an interface state output terminal. - when the receiving control unit receives the And closing the data, the receiving status signal is outputted from the interface state output end; and the data output end is output serial or parallel data; and the logic controller is connected to the interface state of the transmitting control unit receiving the control unit The input terminal of the input-and-receive logic of the (4) interface is based on the interface state output terminal of the receiving control unit and the output signal of the first receiving logic unit, and the (4) interface is the rs_42 8 signal state. - 〃 上述 〃 〃 〃 〃 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收 接收Returned to the logic controller, the logic controller enters = (4) disconnects ^ whether the first receiving logic unit output of the connection is receiving the capital, and the right side determines that the current RS communication; otherwise, the determination is Rs_422 By the way, the signal converter of the present invention only provides a series of strings for the user to select the RS-485..." column.

又 〖U 6 201138305 訊0 【實施方式】 首先請參閱第- A圖所示,係為本發明自動判斷介面形態之 RS-422/485兩用訊號轉換器(1Q)的第—較佳實施其包含有Further, U 6 201138305 0 [Embodiment] First, please refer to the figure - A, which is the first preferred embodiment of the RS-422/485 dual-purpose signal converter (1Q) for automatically determining the interface form of the present invention. Including

-串列介面(11),係包含有一傳送邏輯單元⑴1)及一第一 及第二接收單元(112)(112a),其中該傳送邏輯衫(川)的 輸出端及第-接收邏輯單元⑴2)的輸人端係共同連接,以供一條 RS-485傳輸線(20)的雙絞線(2υ連#;又該傳送邏輯單元⑴^ 與接收邏輯單元(112a)係RS-422傳輸線的二組雙絞線連接,如 第- B圖所示;再如第__ C圖所示,該串列介面係包含有一 rs_ 485串列介面及-RS_422串列介面,其中本案該傳送邏輯單元 (111)及第一接收邏輯單元(112)係為一 Rs_485串列介面(1la) 的傳送及接收邏輯單元(111)(112),而該第二接收邏輯單元(112旬 係為該RS-422串列介面的接收邏輯單元,其中RS_422串列介 面的傳送邏輯單元係空接(NC); 一傳送控制單元(12),係連接至該rs-485串列介面之傳送 邏輯單元(111)的輸入端(DI)及致能端(DE),並包含有一傳送致 能端(EN)及一資料接收端(Din),其中該資料接收端(Din)係供接 收本地資料;於本實施例中,該資料接收端(Din)係用以傳送串列 資料; 一及閘(133) ’其二輸入端分別連接至該串列介面(11)的第 一及第二接收邏輯單元(112)(112a)之輸出端(R01)(R〇2),以 整合二輸出端(R01)(R02)為單一輸出端; m 一接收控制單元(13),係連接至該及閘(133)的輪出端,以 7 201138305 取得第-或第二接收邏輯單元的接收資料,並包含有—資料輸出 端(Do叫及-介面狀態輸㈣(s〇 ; #該接收控制單元接收來自 及閘資料,則自該介面狀態輪出端(s「)輪出一接枚狀態訊號;於 本實施例中,該資料輸出端(D〇utm用以傳送串列資料;及 邏輯控制器(14),係連接至該傳送控制單元(12)的傳送致 能端(EN)、該接收控制單元(13)的介面狀態輸出端則,以及該 串列;I面(11)的第一接收邏輯單元(112)之輸出端(r〇1),依據接 收控制單元⑽2)的介面狀態輸出端(s「)及第一接收邏輯單元 • (112)輸出端訊號’判斷該串列介面⑴)為RS-422或485通訊 狀態;又闕輯控制ϋ(ι4)可進—步連接至傳送控制單元(12)的 傳送致能端(ΕΝ),並於_串列介面(11)為RS_485通訊狀態, 且目前為串列介面為資料接收狀態’則不致能傳送控制單元(12) 的傳送致能端(EN),而該傳送邏輯單元⑴υ傳送致能端(de)亦 不致能’而暫停資料傳送。 請同時參閱第-A®H b圖㈣,係本發明分別應用於 RS-422及RS-485串列通訊,以第一 a圖來說,係本發明用於 鲁RS-485串列通訊’使用者將RS_485傳輸線(2〇)連接至串列介 面(11)中’意即該傳送邏輯單元(111)的輸出端及第一接收邏輯單 元(112)的輸入端係共同連操至RS_485傳輸線(2〇)的雙絞線 (21)’以進行半雙工串列通訊。再如第一 b圖所示,使用者如欲 使用本發明於全雙工串列通訊,係將一 RS_422傳輸線(2〇)連接 至串列介面(11),即該傳送邏輯單元(川)的輸出端及第二接收邏 輯單元(112)的輸入端分別連接至RS_422傳輸線(3〇)的二組雙 纹線(31)(32)。由於本發明的該接收控制單元(彳3)透過及閘(133) 係連接至第一及第二接收邏輯單元(112)(112句之輸出端 201138305 (R〇1)(R02) ’故可將二個輸出端(R〇1)(R〇2)整合成單一輸出 端,因此該接收控制單元可透過及閘接收第一或第二接收邏輯單 元的資料。 以下進一步說明該邏輯控制器(14)判斷串列介面為rs_485 或RS-422通訊狀態的方法。該邏輯控制器(14)若接收來自該接 收控制單元(13)之接收狀態輸出端的高電位訊號,即代表目前接 收控制單疋(13)正在接收第一或第二接收邏輯單元(112)(112句 的資料,因此會進一步判斷與其連接的第一接收邏輯單元(1彳2)的 φ 輸出端(R〇1)訊號。 1. 判斷目前接收資料係來自於第一接收邏輯單元(112)(即第 一接收單元已有串列資料輸入),則代表目前串列介面(11)為RS_ 485通訊狀態(接收狀態);是以,該邏輯控制器(14)會透過傳送 控制單元(12)使該傳送邏輯單元(1ιυ不再致能,確保串列介面 (11)僅用於串列資料的接收用。 2. 判斷目前接收資料來自第二接邏輯單元(112a)(即第一接 收單元並無串列資料輸入)’則代表目前為RS_422通訊狀態,故 籲使串列介面(11)進行雙向串列資料收發,因此該邏輯控制器(14) 一旦判斷為RS-422則透過傳送控制單元(12)使該傳送邏輯單元 (1 )致能,進行全雙工通訊。 參閱第二圖所示,係為本發明自動判斷介面形態之RS_ 422/485兩用訊號轉換器(1〇)的第二較佳實施例,其大多結構與 第一較佳實施例大致相同,惟上述傳送控制單元可為UART的資 料傳送單元(12’),而上述接收控制單元則可為UART的資料接 收單70(13,),並進一步包含有一控制電路(15)及一鮑得率產生器 (16),其中該控制電路(15)係透過匯流排與電腦中央處理器連 201138305 接,以控制鮑得率產生器(16)運作。 ⑽單元(12,)係與簡料產生叩6 傳樣緩衝暫存區㈣及—傳送用移位器(122);因 二貫?Γ,_送控制單元的資料接收端㈣係為-並 料。 Μ 'f Μ #匯㈣連接’接收資料匯流排的序列資 勺人=述資料接收單元(13,)係與韻得率產生器⑽連接,並 ^有-接收用緩衝暫存區(131)及—接收用移位器(132);因 ^並:^實施例中’該接收控制單元的資料輸出端(D。叫係為一 埠’以與電腦資料匯流排連接,將接㈣緩衝暫存印 ❺出並輪出至電腦資料匯流排上。 由上述說明可知,當—電腦連接至本發明即可由介面狀態 MM得知目前使用的串列通訊介面,使用者不必再額外手動設 2換^。若躺為RS_485則只能單—時_送或接收串列 貝;’:,右判斷為RS_422,則可同時收發串列資料;是以,本發 明RS-422/RS-485兩用訊號轉換器提供使用用使更為方便的使 ,用。 【圖式簡單說明】 第一 A目:係本發明第一較佳實施例應用於RS-485通訊 之方塊圖。 第- B ® .係本發明第一較佳實施例應用於為rS-422通 訊之方塊圖。 第一 C圖:係本發明第二較佳實施例方塊圖。 第一圖·係本發明第三較佳實施例方塊圖。 10 .201138305 第三圖:係使用RS-485傳輸線進行通訊的系統架構示旁、 圖。 第四圖:係既有二組RS-422連接的方塊圖。 第五圖:係既有二組RS-485連接的方塊圖。 第六圖:係既有RS-422/485之UART方塊圖。 第七圖:係第六圖部份電路圖。 【主要元件符號說明】 (11)串列介面 (11b)RS-422串列介面 (111a)傳送邏輯單元 (112a)第二接收邏輯單元 (12’)資料傳送單元 (122)傳送用移位器 (13’)資料接收單元 (.1 32)接收用移位器 (16)鮑得率產生器 (21)雙絞線 (31)雙絞線 (40)電腦 (42)匯流排 (51)控制電路 (53)資料傳送單元 (532)傳送用移位器 (541)接收用緩衝暫存區 • 〇〇)RS-485訊號轉換器 (11a)RS-485串列介面 (111) 傳送邏輯單元 (112) 第一接收邏輯單元 (12)傳送控制單元 (121)傳送用緩衝暫存區 (1 3)接收控制單元 (131)接收用緩衝暫存區 籲 (15)控制電路- a serial interface (11) comprising a transfer logic unit (1) 1) and a first and second receive unit (112) (112a), wherein the output of the transfer logic (Chuan) and the first receive logic unit (1) 2 The input terminals are connected in common for a twisted pair of an RS-485 transmission line (20) (2υ连#; and the transmission logic unit (1)^ and the reception logic unit (112a) are two groups of RS-422 transmission lines Twisted pair connection, as shown in Figure-B; as shown in the figure __ C, the serial interface includes an rs_485 serial interface and a -RS_422 serial interface, wherein the transmission logic unit (111) And the first receiving logic unit (112) is a transmitting and receiving logic unit (111) (112) of an Rs_485 serial interface (1la), and the second receiving logic unit (112 is the RS-422 string) a receiving logic unit of the column interface, wherein the transfer logic unit of the RS_422 serial interface is empty (NC); a transfer control unit (12) is connected to the input of the transfer logic unit (111) of the rs-485 serial interface Terminal (DI) and enable (DE), and includes a transmit enable (EN) and a data receive (Din) The data receiving end (Din) is for receiving local data; in the embodiment, the data receiving end (Din) is used for transmitting serial data; and the first gate (133) 'the two input ends are respectively connected to the data The output terminals (R01) (R〇2) of the first and second receiving logic units (112) (112a) of the serial interface (11) are integrated with the two output terminals (R01) (R02) as a single output terminal; A receiving control unit (13) is connected to the rounding end of the NAND gate (133), and obtains the receiving data of the first or second receiving logic unit with 7 201138305, and includes a data output end (Do called and - Interface state input (4) (s); # The receiving control unit receives the data from the gate, and then outputs a state signal from the interface state round-out (s"); in this embodiment, the data output terminal ( D〇utm is used to transmit serial data; and a logic controller (14) is connected to the transmission enable end (EN) of the transmission control unit (12), and the interface state output end of the reception control unit (13) And the serial port; the output of the first receiving logic unit (112) of the I plane (11) (r〇1), According to the interface state output terminal (s") of the receiving control unit (10) 2) and the first receiving logic unit (112) output terminal signal 'determining the serial interface (1)) for the RS-422 or 485 communication state; (ι4) can be connected to the transfer enable terminal (ΕΝ) of the transfer control unit (12), and the RS_485 communication state is in the _ serial interface (11), and the serial interface is currently the data receiving state' The transfer enable (EN) of the control unit (12) is not transmitted, and the transfer logic unit (1) υ transfer enable (de) is not enabled to suspend data transfer. Please also refer to the -A®H b diagram (4), which is applied to RS-422 and RS-485 serial communication respectively. In the first diagram, the invention is used for RS RS-485 serial communication. The user connects the RS_485 transmission line (2〇) to the serial interface (11), that is, the output end of the transmission logic unit (111) and the input end of the first receiving logic unit (112) are connected to the RS_485 transmission line. (2〇) twisted pair (21)' for half-duplex serial communication. As shown in the first b diagram, if the user wants to use the present invention for full-duplex serial communication, an RS_422 transmission line (2〇) is connected to the serial interface (11), that is, the transmission logic unit (Chuan) The output and the input of the second receiving logic unit (112) are respectively connected to two sets of double lines (31) (32) of the RS_422 transmission line (3〇). Since the receiving control unit (彳3) of the present invention is connected to the first and second receiving logic units (112) through the gate (133) (the output end of the 112 sentences is 201138305 (R〇1) (R02)' The two output terminals (R〇1) (R〇2) are integrated into a single output terminal, so the receiving control unit can receive the data of the first or second receiving logic unit through the gate and the gate. The logic controller is further described below ( 14) A method for judging whether the serial interface is the rs_485 or RS-422 communication state. If the logic controller (14) receives the high-potential signal from the receiving state output end of the receiving control unit (13), it represents the current receiving control unit. (13) The first or second receiving logic unit (112) is receiving the data of 112 sentences, so that the φ output terminal (R〇1) signal of the first receiving logic unit (1彳2) connected thereto is further judged. 1. It is judged that the current receiving data is from the first receiving logic unit (112) (that is, the first receiving unit has serial data input), and the current serial interface (11) is the RS_485 communication state (receiving state); Therefore, the logic controller (14) will The transfer logic unit (1) is disabled by the transfer control unit (12), ensuring that the serial interface (11) is only used for receiving serial data. 2. Determining that the currently received data is from the second logical unit (112a) ) (ie, the first receiving unit does not have serial data input)' represents the current RS_422 communication state, so the serial interface (11) is called to perform bidirectional serial data transmission and reception, so the logic controller (14) once judged RS-422 enables the transmission logic unit (1) to perform full-duplex communication through the transmission control unit (12). Referring to the second figure, it is the RS_422/485 dual-purpose for automatically determining the interface configuration of the present invention. The second preferred embodiment of the signal converter (1〇) has substantially the same structure as the first preferred embodiment, but the transfer control unit may be a data transfer unit (12') of the UART, and the receive control unit The data receiving unit 70 (13,) of the UART may further include a control circuit (15) and a Baud rate generator (16), wherein the control circuit (15) is through the bus bar and the computer central processing unit. Even with 201138305, Control the Baud rate generator (16) to operate. (10) Unit (12,) system and material generation 叩6 Sample buffer buffer temporary storage area (4) and - Transfer shifter (122); due to two passes, _ send The data receiving end (4) of the control unit is - and is expected. Μ 'f Μ #汇(四) is connected to the sequence of receiving the data bus. The data receiving unit (13) is connected to the rhyme rate generator (10). And there is a receiving buffer temporary storage area (131) and a receiving shifter (132); because of the ^: in the embodiment, the data output end of the receiving control unit (D. The system is connected to the computer data bus, and the (4) buffer is temporarily printed and rotated out to the computer data bus. It can be seen from the above description that when the computer is connected to the present invention, the serial communication interface currently used can be known by the interface state MM, and the user does not have to manually set the second switch. If lying as RS_485, it can only be single-time_send or receive serials; ':, right is judged as RS_422, then the serial data can be sent and received at the same time; Yes, the RS-422/RS-485 dual-purpose signal conversion of the present invention The device is provided for use to make it more convenient. BRIEF DESCRIPTION OF THE DRAWINGS First A: A block diagram of a first preferred embodiment of the present invention applied to RS-485 communication. The first - B ® is a block diagram of the first preferred embodiment of the present invention applied to the rS-422 communication. First C-picture is a block diagram of a second preferred embodiment of the present invention. The first figure is a block diagram of a third preferred embodiment of the present invention. 10 .201138305 Fig. 3: System architecture showing the communication using RS-485 transmission line. Figure 4: Block diagram of two sets of RS-422 connections. Figure 5: Block diagram of two sets of RS-485 connections. Figure 6: UART block diagram of both RS-422/485. Figure 7: Part of the circuit diagram of the sixth picture. [Main component symbol description] (11) Serial interface (11b) RS-422 serial interface (111a) transfer logic unit (112a) Second receive logic unit (12') Data transfer unit (122) Transfer shifter (13') data receiving unit (.1 32) receiving shifter (16) Baud rate generator (21) twisted pair (31) twisted pair (40) computer (42) bus bar (51) control Circuit (53) data transfer unit (532) transfer shifter (541) receive buffer temporary storage area • 〇〇) RS-485 signal converter (11a) RS-485 serial interface (111) transfer logic unit ( 112) First receiving logic unit (12) transmission control unit (121) transmission buffer temporary storage area (13) receiving control unit (131) receiving buffer temporary storage area (15) control circuit

(20)RS-485 傳輸線 (30)RS-422 傳輸線 (32)雙絞線 (41)中央處理器 (50)UART (52)鮑得率產生器 (531)傳送用緩衝暫存區 (54)資料接收單元 11 201138305 (542)接收用移位器 (55)RS-485/RS-422串列介面 (56)切換開關(20) RS-485 transmission line (30) RS-422 transmission line (32) twisted pair (41) central processing unit (50) UART (52) Baud rate generator (531) transmission buffer temporary storage area (54) Data receiving unit 11 201138305 (542) Receiver shifter (55) RS-485/RS-422 serial interface (56) switch

1212

Claims (1)

201138305 七、申請專利範圍: 1.一種自動判斷介面形態之RS_422/485兩用訊號轉換器, 係包含有: -串列介面,係包含有-傳送邏輯單元及一第—及第二接收 邏輯單元’其中該傳送邏輯單元的輸出端及第—接收邏輯單元的 輸入端係共同連接,供RS_485傳輸線連接;又該傳送邏輯單元 與接收邏.輯單元係供RS_422傳輸線連接; -傳送控制單元’係連接至該串列介面之傳送邏輯單元的輸 #入端及致能端,並包含有一傳送致能端及一資料接收端;其中該 傳送控制單元於致能端接收致能訊號後,亦輸出一致能訊號至該 傳送邏輯單元的致能端; -及閘’其二輸入端分別連接至該串列介面的第一及第二接 收邏輯單元之輸出端,以整合二個輸出端為單一輸出端; 一接收控制單元,係連接至該及閘輸出端,以取得第一或第 二接收邏輯單元的接收資料,並包含有一資料輪出端及一介面狀 態輸出端’ ·當該接收控制單元接收來自及閘資料,則自該介面狀 ® 態輸出端輸出一接收狀態訊號;及 一邏輯控制器,係連接至該接收控制單元的介面狀態輸出 端’以及該串列介面的第-接收邏輯單元之輸出端,依據接收控 制單元的介面狀態輸出端及第一接收邏輯單元之輸出端訊號,判 斷該_列介面為RS-422或485通訊狀態。 2.如申明專利錢第]項所述自動判斷介面形態之 422/485兩用訊號轉換器’該傳送控制單元的資料接收端以及該 接收控制單元的資料輸出端係用以傳送串列資料。 3.如申專利範圍第]項所述自動判斷介面形態之⑶ 13 201138305 ΓΓΓ::訊號轉換器,係進一步包含有-控制器及'飽得率 、° '、中該控制電路係透過匯流排與電腦中央處理器連接, 以控制跑得率產生器;其中: D 、上述傳送控制單元’係與該鮑得率產生器連接,並一 傳=用辍衝暫存區及-傳送用移位器,而該f料接收端係為一並 列輸入埠,以接收序列資料;及201138305 VII. Patent application scope: 1. An RS_422/485 dual-purpose signal converter that automatically determines the interface form, comprising: - a serial interface, comprising a - transfer logic unit and a first and second receive logic unit 'The output end of the transfer logic unit and the input end of the first receive logic unit are connected in common for the RS_485 transmission line connection; and the transfer logic unit and the receive logic unit are connected to the RS_422 transmission line; - the transfer control unit' An input terminal and an enable terminal of the transmission logic unit of the serial interface, and a transmission enable terminal and a data receiving terminal; wherein the transmission control unit outputs the enable signal after the enable terminal a uniform signal to the enable terminal of the transfer logic unit; - and a gate's two inputs are respectively connected to the output terminals of the first and second receive logic units of the serial interface to integrate the two outputs into a single output a receiving control unit is connected to the gate output to obtain the received data of the first or second receiving logic unit, and includes a data An outbound and an interface state output terminal'. when the receiving control unit receives the data from the gate and the gate, outputs a receiving status signal from the interface state output; and a logic controller is connected to the receiving control unit The interface state output terminal 'and the output end of the first-receiving logic unit of the serial interface, according to the interface state output terminal of the receiving control unit and the output signal of the first receiving logic unit, determine that the _ column interface is RS-422 or 485 communication status. 2. The 422/485 dual-purpose signal converter that automatically determines the interface configuration as described in the patent money item] The data receiving end of the transmission control unit and the data output end of the receiving control unit are used to transmit the serial data. 3. According to the scope of the patent scope, the automatic judgment interface form (3) 13 201138305 ΓΓΓ:: signal converter, further includes a controller and 'saturation rate, ° ', the control circuit is through the bus Connected with a computer central processing unit to control the run rate generator; wherein: D, the above transfer control unit is connected to the Baud rate generator, and transmits the buffer to the temporary storage area and the transfer shift And the f receiving end is a parallel input port to receive sequence data; and 上述接收控制單元,係與賴得率產生器連接,並包含有一 接收用緩衝暫存區及—接收用移位器,而該資料輸出端^一並 列輸出埠,以將接收用緩衝暫存區讀出並對外輸出。 4·如申請專利範圍第】至3項任—項所述自動判斷介面形態 之RS-422/485兩用訊號轉換器,其中該接收控制單元於接收到 及閘輸入的串列資料,即於其接收狀態輸出端的—高電位訊號至 該邏輯控制器,其中該邏輯控制器判斷方式係包含有: 化 接收來自該接收控制單元之接收狀態輪出端的高電位訊號; 判斷第-接收邏輯單元是否已接收串列資料,若目前為串列 資料接收時’即代表串列介面為RS_485通訊狀態,若無接收串 列資料,則為RS-422通訊狀態。 5.如申請專利範圍第4項所述自動判斷介面形態之rs· 422/485兩用訊號轉換器,該串列介面的傳送邏輯單元及一第一 接收邏輯單元為-RS_485串列介面,而第二接收邏輯單元則為 一 RS-422串列介面的接收邏輯單元。 八、圖式:(如次頁)The receiving control unit is connected to the reliance generator, and includes a receiving buffer temporary storage area and a receiving shifter, and the data output terminal is parallel output 埠 to receive the buffer buffer temporary storage area. Read and output. 4. The RS-422/485 dual-purpose signal converter for automatically determining the interface form as described in the application scope of the patent scope, to the third item, wherein the receiving control unit receives the serial data of the gate input, that is, Receiving a high-potential signal of the state output terminal to the logic controller, wherein the logic controller determining manner includes: receiving a high-potential signal from the receiving state round-off end of the receiving control unit; determining whether the first-receiving logic unit is The serial data has been received. If the serial data is currently received, it means that the serial interface is the RS_485 communication status. If the serial data is not received, it is the RS-422 communication status. 5. The rs· 422/485 dual-purpose signal converter for automatically determining the interface form according to the fourth aspect of the patent application, the transmission logic unit of the serial interface and the first receiving logic unit are the -RS_485 serial interface, and The second receiving logic unit is a receiving logic unit of an RS-422 serial interface. Eight, schema: (such as the next page)
TW99112474A 2010-04-21 2010-04-21 RS-422/485 dual-use signal converter having function of automatically determining interface configuration TW201138305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW99112474A TW201138305A (en) 2010-04-21 2010-04-21 RS-422/485 dual-use signal converter having function of automatically determining interface configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW99112474A TW201138305A (en) 2010-04-21 2010-04-21 RS-422/485 dual-use signal converter having function of automatically determining interface configuration

Publications (2)

Publication Number Publication Date
TW201138305A true TW201138305A (en) 2011-11-01
TWI426708B TWI426708B (en) 2014-02-11

Family

ID=46759821

Family Applications (1)

Application Number Title Priority Date Filing Date
TW99112474A TW201138305A (en) 2010-04-21 2010-04-21 RS-422/485 dual-use signal converter having function of automatically determining interface configuration

Country Status (1)

Country Link
TW (1) TW201138305A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194322A (en) * 2018-08-20 2019-01-11 华立科技股份有限公司 RS485 high speed communication condenser type isolation circuit and its performance test methods

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
LU72512A1 (en) * 1975-05-16 1976-11-11
EP0234453B1 (en) * 1986-02-17 1991-08-28 Siemens Aktiengesellschaft Circuit arrangement for serial data transmission between several stations
FI82164C (en) * 1988-06-30 1991-01-10 Nokia Data Systems Coupling Device
CN1486047A (en) * 2002-09-29 2004-03-31 威达电股份有限公司 Method and apparatus for gateway control
KR20070088826A (en) * 2006-02-27 2007-08-30 주식회사 키트 Remote control system of power line communication system
CN101694995B (en) * 2009-09-28 2011-11-02 江南大学 Passive RS232-485 signal converter

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194322A (en) * 2018-08-20 2019-01-11 华立科技股份有限公司 RS485 high speed communication condenser type isolation circuit and its performance test methods
CN109194322B (en) * 2018-08-20 2023-05-05 华立科技股份有限公司 RS485 high-speed communication capacitive isolation circuit and performance test method thereof

Also Published As

Publication number Publication date
TWI426708B (en) 2014-02-11

Similar Documents

Publication Publication Date Title
JP4949816B2 (en) Bidirectional communication circuit, bidirectional communication system, and bidirectional communication circuit communication method
JP6786215B2 (en) Robust cable type detection for USB power transfer
US7685339B2 (en) Remote control system and method thereof
US9710412B2 (en) N-factorial voltage mode driver
US8693497B2 (en) Long-reach ethernet system and relay
US10261930B2 (en) System, device and method for transmitting signals between different communication interfaces
TW200931269A (en) Control bus for connection of electronic devices
WO2008110930A3 (en) Method of transmitting data in a communication system
JP2007097009A5 (en)
CN101790090A (en) Remote desktop monitor and control system and method
CN103490905B (en) Physical layer device based on the heating power supply of Ethernet magnetic element is automatically adjusted
CN109564557A (en) Single line communication method and apparatus
CN105593834B (en) Communication system for interchip communication
CN101741825A (en) Method and equipment for switching between wireless USB interface and wired USB interface
TW200945118A (en) KVM extender system and local, remote modules thereof
TW201125767A (en) Communication interface conversiondevice
TW201019677A (en) Wired network connection method and network device applying the method
TW201138305A (en) RS-422/485 dual-use signal converter having function of automatically determining interface configuration
CN101882124B (en) RS422/485 double-use signal converter capable of automatically judging connector
CN107148577A (en) Bidirectional power meter
JP2006094013A (en) PoE SYSTEM
CN205091733U (en) Communication interface conversion device
CN103701660A (en) Ethernet equipment connection device and testing system and method applied thereby
TW201443772A (en) Display systems, methods of image data and wireless power transmission and display devices
CN100386928C (en) Parking device with wireless and wiring communication functions