KR102098467B1 - Output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication - Google Patents

Output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication Download PDF

Info

Publication number
KR102098467B1
KR102098467B1 KR1020180053993A KR20180053993A KR102098467B1 KR 102098467 B1 KR102098467 B1 KR 102098467B1 KR 1020180053993 A KR1020180053993 A KR 1020180053993A KR 20180053993 A KR20180053993 A KR 20180053993A KR 102098467 B1 KR102098467 B1 KR 102098467B1
Authority
KR
South Korea
Prior art keywords
transceiver
value
interface
mode selection
transceivers
Prior art date
Application number
KR1020180053993A
Other languages
Korean (ko)
Other versions
KR20190129404A (en
Inventor
원규연
Original Assignee
파밀넷 주식회사
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 파밀넷 주식회사 filed Critical 파밀넷 주식회사
Priority to KR1020180053993A priority Critical patent/KR102098467B1/en
Publication of KR20190129404A publication Critical patent/KR20190129404A/en
Application granted granted Critical
Publication of KR102098467B1 publication Critical patent/KR102098467B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

본 발명은 RS-232, RS-422, RS-485 선택 및 출력신호 자동 제어기에 관한 것으로, 시리얼 통신용 출력 신호 제어 장치는 복수의 트랜스시버 중 어느 하나의 트랜스시버의 회선 인터페이스를 선택하는 값으로 설정된 인터페이스 모드 레지스터, 온 상태 및 오프 상태 중 적어도 하나의 상태의 값으로 설정된 딥 스위치 및 상기 인터페이스 모드 레지스터의 값, 딥 스위치의 값 및 수신 신호의 값 중 적어도 하나에 따라 인터페이스 모드 선택 값을 생성하고, 상기 인터페이스 모드 선택 값에 따라 상기 복수의 트랜스시버 각각을 제어하는 회선 인터페이스 제어부를 포함한다The present invention relates to RS-232, RS-422, and RS-485 selection and automatic control of output signals. The output signal control device for serial communication is set to a value that selects a line interface of any one of a plurality of transceivers. An interface mode selection value is generated according to at least one of a value of a dip switch and a value of the interface mode register, a value of a dip switch, and a value of a received signal, which is set to a value of at least one of a register, an on state, and an off state, and the interface And a line interface control unit controlling each of the plurality of transceivers according to a mode selection value

Description

RS-232, RS-422, RS-485 선택 및 출력신호 자동 제어기{Output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication}RS-232, RS-422, RS-485 selection and output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication}

본 발명은 RS-232, RS-422, RS-485 선택 및 출력신호 자동 제어기에 관한 것이다.The present invention relates to RS-232, RS-422, RS-485 selection and automatic control of output signals.

비동기식 시리얼 통신 시스템에는 RS-232, RS-422, RS-485 시리얼 인터페이스가 대표적으로 사용된다. 비동기식 시리얼 통신은 UART(Universal Asynchronous Receiver/Transmitter)가 담당한다. UART는 RS-232, RS-422, RS-485 등의 인터페이스를 제공하는 비동기식 송수신기를 의미하며, 컴퓨터나 일반 통신용 기기에서 사용되는 UART는 PCIe/PCI 버스, USB 버스, 로컬 버스 용이 있다.RS-232, RS-422, and RS-485 serial interfaces are typically used for asynchronous serial communication systems. Asynchronous serial communication is handled by UART (Universal Asynchronous Receiver / Transmitter). UART means an asynchronous transceiver that provides interfaces such as RS-232, RS-422, and RS-485, and UART used in computers or general communication devices includes PCIe / PCI bus, USB bus, and local bus.

일반적인 UART는 컴퓨터 어플리케이션이나 장치에 내장된 프로그램의 명령을 받아 병렬 데이터를 직렬 데이터(SOUT)로 출력한다. 최근 판매되고 있는 신형 UART에는 위의 열거된 기능 외에 추가적인 기능들이 많이 있다.A typical UART outputs parallel data as serial data (SOUT) by receiving commands from a computer application or a program embedded in the device. The new UART, which is currently on sale, has many additional features in addition to those listed above.

그 중 RS-485 제어 부분이 있다. 이 부분은 RS-485 통신 제어를 손쉽게 하기 위해서 필요한 신호이다. NXP사의 SC16C850을 보면 RTS 신호선과 DTR 신호선을 Auto RS-485 RTS control 신호인 AutoRS-485 신호로 사용할 수 있다.Among them is the RS-485 control part. This part is a signal necessary for easy RS-485 communication control. Looking at NXP's SC16C850, the RTS signal line and the DTR signal line can be used as the Auto RS-485 RTS control signal AutoRS-485 signal.

AutoRS-485 신호를 이용하면 UART에 RS-485 트랜스시버를 붙여 사용하는데 문제가 없으나, AutoRS-485 신호만 가지고 RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버를 동일한 보드 상에 부착하고, 이를 선택하여 사용하려면 구현 회로가 복잡하고 추가적인 부품이 필요 하다.When using the AutoRS-485 signal, there is no problem in attaching the RS-485 transceiver to the UART, but attach the RS-232 transceiver, RS-422 transceiver, and RS-485 transceiver on the same board only with the AutoRS-485 signal. Implementation circuitry is complex and requires additional components to select and use.

현 시장에서 보면 저가의 장비에는 RS-232 트랜스시버, RS-422 트랜스시버, RS-485 트랜스시버 중 하나의 트랜스시버를 사용하지만, 고가의 장비는 사용자가 직접 RS-232 트랜스시버, RS-422 트랜스시버, RS-485 트랜스시버 각각의 인터페이스 중 하나를 직접 선택하여 사용할 수 있게 되어 있다.In the current market, low-cost equipment uses one of RS-232 transceivers, RS-422 transceivers, and RS-485 transceivers, but expensive equipment can be directly connected to the RS-232 transceiver, RS-422 transceiver, and RS-485 by the user. It is possible to directly select and use one of each interface of the transceiver.

예를 들면, 8포트용 디바이스 서버인 경우 저가의 보드는 8 포트 전체가 RS-232 인터페이스만 지원하거나, 8포트 전체 RS-485 인터페이스만 지원하게 된다.For example, in case of an 8-port device server, a low-cost board supports only the entire 8-port RS-232 interface or only the full 8-port RS-485 interface.

하지만 사용자가 현장 시스템 구성상 8포트 중 4포트는 RS-232 인터페이스, 2포트는 RS-422 인터페이스, 그리고 나머지 2 포트는 RS-485 인터페이스로 사용하기를 원한다면 저가의 장비인 경우 각각의 인터페이스를 가지는 디바이스 서버를 개별로 구입하여야 한다는 문제점이 있다. 하지만 RS-232, RS-422, RS-485 트랜스시버가 동시에 있는 고가 장비인 경우에는 포트 별로 원하는 인터페이스를 설정할 수 있어 RS-232, RS-422, RS-45 트랜스시버를 동시에 지닌 디바이스 서버를 하나 만 구입해도 된다.However, if the user wants to use 4 of the 8 ports as an RS-232 interface, 2 ports as an RS-422 interface, and the remaining 2 ports as an RS-485 interface due to the on-site system configuration, each device has a separate interface for low-cost equipment. There is a problem that the device server must be purchased individually. However, in the case of an expensive device with RS-232, RS-422, and RS-485 transceivers at the same time, you can set the desired interface for each port, so you can purchase only one device server with RS-232, RS-422, and RS-45 transceivers at the same time. May be

본 발명은 AutoRS-485 신호만 가지고 RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버를 동일한 보드 상에 부착하여 선택적으로 사용할 수 있어 디바이스 서버와 같은 통신장비를 회선 인터페이스별로 구입하지 않아도 되는 RS-232, RS-422, RS-485 선택 및 출력신호 자동 제어기를 제공하는 것을 목적으로 한다.According to the present invention, RS-232 transceivers, RS-422 transceivers, and RS-485 transceivers can be selectively attached to the same board with only AutoRS-485 signals, so that it is not necessary to purchase communication equipment such as device servers for each line interface. It aims to provide -232, RS-422, RS-485 selection and automatic control of output signals.

상기한 바와 같은 목적은, 복수의 트랜스시버 중 어느 하나의 트랜스시버의 회선 인터페이스를 선택하는 값으로 설정된 인터페이스 모드 레지스터; 온 상태 및 오프 상태 중 적어도 하나의 상태의 값으로 설정된 딥 스위치; 및 상기 인터페이스 모드 레지스터의 값, 딥 스위치의 값 및 수신 신호의 값 중 적어도 하나에 따라 인터페이스 모드 선택 값을 생성하고, 상기 인터페이스 모드 선택 값에 따라 상기 복수의 트랜스시버 각각을 제어하는 회선 인터페이스 제어부를 포함하는 것을 특징으로 하는, RS-232, RS-422, RS-485 선택 및 출력신호 자동 제어기에 의해 달성된다.An object as described above is an interface mode register set to a value for selecting a line interface of any one of a plurality of transceivers; A dip switch set to a value of at least one of an on state and an off state; And a line interface control unit generating an interface mode selection value according to at least one of a value of the interface mode register, a value of a dip switch, and a value of a received signal, and controlling each of the plurality of transceivers according to the interface mode selection value. Characterized in that, RS-232, RS-422, RS-485 selection and output signal is achieved by an automatic controller.

위의 실시 예에서, 상기 회선 인터페이스 제어부는 상기 수신 신호 중 MODE_SELECT에 따라 상기 인터페이스 모드 레지스터의 값 및 상기 딥 스위치의 값 중 어느 하나의 값을 인터페이스 모드 선택 값으로 결정하고, 상기 인터페이스 모드 선택 값에 따라 상기 모드 선택 신호를 생성하는 것을 특징으로 한다.In the above embodiment, the circuit interface controller determines any one of the value of the interface mode register and the value of the dip switch according to MODE_SELECT among the received signals as an interface mode selection value, and the interface mode selection value is Accordingly, it is characterized in that the mode selection signal is generated.

위의 실시 예에서, 상기 회선 인터페이스 제어부는 상기 인터페이스 모드 선택 값에 따라 상기 복수의 트랜스시버인 RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버 중 어느 하나의 트랜스시버를 활성화시키고 나머지 트랜스시버를 비활성화시키는 상기 모드 선택 신호를 생성하는 것을 특징으로 한다.In the above embodiment, the circuit interface controller activates any one of the plurality of transceivers, the RS-232 transceiver, the RS-422 transceiver, and the RS-485 transceiver, and deactivates the remaining transceivers according to the interface mode selection value. And generating the mode selection signal.

본 발명의 일 실시형태에 따르면, AutoRS-485 신호만 가지고 RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버를 동일한 보드 상에 부착하여 선택적으로 사용할 수 있어 디바이스 서버와 같은 통신 장비를 회선 인터페이스 별로 개별 구입하지 않아도 된다는 장점이 있다.According to an embodiment of the present invention, an RS-232 transceiver, an RS-422 transceiver, and an RS-485 transceiver can be selectively attached to the same board with only the AutoRS-485 signal, so that communication equipment such as a device server can be interfaced. It has the advantage of not having to purchase individually.

도 1은 일반적인 로컬 버스 용 UART 내부 레지스터의 구조를 나타내는 도면이다.
도 2는 SOUT과 AutoRS-485 신호간 타이밍을 나타내는 도면이다.
도 3 내지 도 5는 RS-232, RS-422, RS-485 트랜스시버를 설명하기 위한 도면이다.
도 6은 회선 인터페이스 제어부에 대한 블록 다이어그램을 설명하기 위한 도면이다.
도 7은 IMR과 DIP SW의 값 중 한 가지를 선택하여 인터페이스 모드 선택 값으로 출력시키는 과정을 설명하기 위한 도면이다.
도 8은 도 7의 인터페이스 모드 선택 값에 의하여 RS-232_SOUT_EN_SIN_EN 신호를 발생시키는 4X1 MUX 이다.
도 9는 도 7의 인터페이스 모드 선택 값에 의하여 RS-422_SOUT_EN 신호를 발생시키는 4X1 MUX 이다.
도 10은 도 7의 인터페이스 모드 선택 값에 의하여 RS-422_SIN_EN 신호를 발생시키는 4X1 MUX 이다.
도 11은 도 7의 인터페이스 모드 선택 값에 의하여 RS-485_SOUT_EN 신호를 발생시키는 4X1 MUX 이다.
도 12는 도 7의 인터페이스 모드 선택 값에 의하여 RS-485_SIN_EN 신호를 발생시키는 4X1 MUX 이다.
도 13은 도 7의 인터페이스 모드 선택 값에 의하여 SIN 신호를 발생시키는 4X1 MUX 이다.
1 is a diagram showing the structure of a UART internal register for a typical local bus.
2 is a diagram showing timing between SOUT and AutoRS-485 signals.
3 to 5 are diagrams for explaining RS-232, RS-422, and RS-485 transceivers.
6 is a view for explaining a block diagram of a circuit interface control unit.
7 is a view for explaining a process of selecting one of the values of the IMR and DIP SW and outputting it as an interface mode selection value.
FIG. 8 is a 4X1 MUX generating an RS-232_SOUT_EN_SIN_EN signal according to the interface mode selection value of FIG. 7.
FIG. 9 is a 4X1 MUX generating an RS-422_SOUT_EN signal according to the interface mode selection value of FIG. 7.
FIG. 10 is a 4X1 MUX generating an RS-422_SIN_EN signal according to the interface mode selection value of FIG. 7.
FIG. 11 is a 4X1 MUX generating an RS-485_SOUT_EN signal according to the interface mode selection value of FIG. 7.
FIG. 12 is a 4X1 MUX generating an RS-485_SIN_EN signal according to the interface mode selection value of FIG. 7.
13 is a 4X1 MUX generating an SIN signal according to the interface mode selection value of FIG. 7.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시 형태들을 설명한다.Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.

도 1은 일반적인 로컬 버스 용 UART 내부 레지스터의 구조를 나타내는 도면이다.1 is a diagram showing the structure of a UART internal register for a typical local bus.

도 1을 참조하면, 일반적인 UART는 컴퓨터 어플리케이션이나 장치에 내장된 프로그램의 명령을 받아 병렬 데이터를 직렬 데이터 (SOUT)로 출력한다. 해당 SOUT 출력 구조는 도 1 과 같다. 아래의 [표 1] 은 일반적인 로컬 버스용 UART 내부 레지스터의 구조이다. Referring to FIG. 1, a typical UART receives a command from a computer application or a program embedded in a device and outputs parallel data as serial data (SOUT). The corresponding SOUT output structure is shown in FIG. 1. [Table 1] below shows the structure of UART internal register for general local bus.

Figure 112018046200803-pat00001
Figure 112018046200803-pat00001

표 1에서 수신 버퍼 레지스터는 외부에서 들어온 한 문자의 데이터를 읽을 때 사용하는 레지스터이다. 전송 대기 레지스터는 한 문자의 데이터를 전송하는데 사용하는 레지스터이다. 인터럽트 활성화 레지스터는 각종 인터럽트를 발생하게 하는 레지스터이다. 인터럽트 상태 레지스터는 UART 내부에서 발생한 인터럽트 상태를 표시하는 레지스터이다. FIFO(First-In First-Out) 제어 레지스터는 FIFO 버퍼를 제어하는데 사용하는 레지스터이다.In Table 1, the receive buffer register is a register used to read one character of data from outside. The transfer wait register is a register used to transfer data of one character. The interrupt enable register is a register that generates various interrupts. The interrupt status register is a register that indicates the interrupt status that occurred inside the UART. The FIFO (First-In First-Out) control register is a register used to control the FIFO buffer.

회선 제어 레지스터는 데이터 비트의 수, 스톱 비트의 수, 패리티 비트를 제어하는 데 사용하지만, LCR[7] = ‘1’일 때는 통신 속도 설정하는 용도의 레지스터를 사용 가능 해주는 레지스터이다. 즉, 수신 버퍼 레지스터, 전송 대기 레지스터 및 인터럽트 활성화 레지스터 대신 디바이저 래치 (Divisor Latch)를 사용하게 해 준다.The line control register is used to control the number of data bits, the number of stop bits, and the parity bit, but when LCR [7] = '1', the register for setting the communication speed can be used. In other words, it is possible to use a divisor latch instead of the receive buffer register, transmit wait register, and interrupt enable register.

모뎀 제어 레지스터는 모뎀 신호선 RTS(Request To Send), DTR(Data Terminal Reay)을 제어하는데 사용하는 레지스터이다. 회선 상태 레지스터는 수신 버퍼 레지스터에 입력된 데이터의 상태를 표시해 주는 레지스터이다. 모뎀 상태 레지스터는 모뎀 상태를 표시하는 레지스터이다.The modem control register is a register used to control the modem signal line request to send (RTS) and data terminal relay (DTR). The line status register is a register that indicates the status of data input to the receive buffer register. The modem status register is a register indicating the modem status.

도 1에서 보 발생기(10)(Baud Generator)는 외부 클럭을 입력받아 원하는 통신 속도를 만들어 낸다. 일반적으로 보 발생기(10)는 외부에서 입력되는 주파수의 1/8배 또는 1/16배 클럭을 기본 최소 클럭으로 사용한다.In FIG. 1, the beam generator 10 (Baud Generator) receives an external clock to generate a desired communication speed. In general, the beam generator 10 uses a clock that is 1/8 times or 1/16 times the frequency input from the outside as a basic minimum clock.

이와 같은 이유는 외부에서 시리얼 데이터가 UART로 입력될 때 입력된 시리얼 데이터를 검출하기 위한 샘플링 클럭을 만들기 위한 것이다. 하지만, 이러한 내용은 본 발명과 상관없는 부분이기 때문에 자세한 설명은 생략한다.The reason for this is to create a sampling clock for detecting the input serial data when the external serial data is input to the UART. However, detailed descriptions thereof will be omitted because these contents are irrelevant to the present invention.

예를 들어, 1/16배 클럭을 기본 최소 클럭으로 사용한다면, 외부에 14.7456MHz 주파수가 입력되면 14,745,600/16 = 921,600Hz가 되며, 이것은 해당 UART의 최대 통신 속도가 된다.For example, if a 1 / 16x clock is used as the basic minimum clock, 14,745,600 / 16 = 921,600Hz when a 14.7456MHz frequency is input externally, which becomes the maximum communication speed of the corresponding UART.

보 발생기(10)는 UART내의 디바이스 래치에 설정된 값에 의하여 UART 통신 속도가 결정된다. 즉, 디바이스 래치에 1에 설정되면 921,600/1 = 921,600bps의 통신 속도가 되고 디바이스 래치 에 96이 설정되면 921,600/96 = 9600bps 통신 속도가 된다.The beam generator 10 determines the UART communication speed according to the value set in the device latch in the UART. That is, if the device latch is set to 1, the communication speed is 921,600 / 1 = 921,600bps, and when the device latch is set to 96, the communication speed is 921,600 / 96 = 9600bps.

보 발생기(10)에 의해 발생된 통신 클럭은 전송 시간 제어부(20)에 제공한다.The communication clock generated by the beam generator 10 is provided to the transmission time control unit 20.

전송 시간 제어부(20)(Transmit Timing & Control)는 보 발생기(10)로부터 수신된 통신 클럭에 따라 전송 이동 레지스터(30)(Transmit Shift Register)를 구동시킨다.The transmission time control unit 20 (Transmit Timing & Control) drives the Transmit Shift Register 30 according to the communication clock received from the beam generator 10.

전송 이동 레지스터(30)는 전송 시간 제어부(20)의 제어에 따라 보 발생기(10)에서 발생한 통신 클럭에 동기를 맞추어 전송 대기 레지스터(40) 또는 Transmit FIFO(50)에서 병렬로 입력된 데이터를 직렬 데이터로 변환하여 시리얼 통신 출력신호(SOUT)를 외부로 전송한다.The transfer transfer register 30 serializes data input in parallel from the transfer wait register 40 or the transmit FIFO 50 in synchronization with the communication clock generated by the beam generator 10 under the control of the transfer time control unit 20. Convert to data and transmit the serial communication output signal (SOUT) to the outside.

최근 판매되고 있는 신형 UART에는 위의 열거된 기능 외에 추가적인 기능들이 많이 있다. 그 중 RS-485 제어 부분이 있다. 이 부분은 RS-485 통신 제어를 손쉽게 하기 위해서 필요한 신호이다. NXP 사의 SC16C850을 보면 RTS 신호선과 DTR 신호선을 Auto RS-485 RTS control 신호로 사용할 수 있다.The new UART, which is currently on sale, has many additional features in addition to those listed above. Among them is the RS-485 control part. This part is a signal necessary for easy RS-485 communication control. Looking at SC16C850 of NXP, RTS signal line and DTR signal line can be used as Auto RS-485 RTS control signal.

해당 내용은 SC16C850의 AFCR2 레지스터에 의하여 제어 된다. AFCR2 레지스터 내용 중 Auto RS-485 RTS control 과 관련된 내용은 아래의 [표 2]와 같다.The contents are controlled by the AFCR2 register of SC16C850. [Table 2] below shows the contents related to Auto RS-485 RTS control among AFCR2 register contents.

Figure 112018046200803-pat00002
Figure 112018046200803-pat00002

상기의 표 2를 기준으로 하여 RTS 핀을 Auto RS-485 Control 핀으로 사용하려면 AFCR2[4] = '1', AFCR2[3] = '0', AFCR2[0] = '1'로 세팅하면 된다. AFCR2[5]의 값은 외부에 장착되는 RS-422 및 RS-485 트랜스시버 종류에 맞게 세팅하면 된다. RTS 핀에서 나오는 Auto RS-485 Control 신호를 이하 AutoRS-485라 명한다.To use the RTS pin as an Auto RS-485 Control pin based on Table 2 above, set AFCR2 [4] = '1', AFCR2 [3] = '0', AFCR2 [0] = '1' . The value of AFCR2 [5] can be set according to the types of externally mounted RS-422 and RS-485 transceivers. The Auto RS-485 Control signal from the RTS pin is hereinafter called AutoRS-485.

이와 관련된 SOUT과 AutoRS-485 신호 간의 타이밍도는 4가지로 구현된다. 이러한 과정은 이하의 도 2를 참조하여 보다 구체적으로 설명하기로 한다.There are four timing charts between SOUT and AutoRS-485 signals. This process will be described in more detail with reference to FIG. 2 below.

도 2는 SOUT과 AutoRS-485 신호간 타이밍을 나타내는 도면이다.2 is a diagram showing timing between SOUT and AutoRS-485 signals.

도 2를 참조하면, AFCR2[5]가 "1"로 셋팅되었을 때 SOUT과 AutoRS-485 신호간 타이밍은 도 2와 같이 4가지로 구현될 수 있다. 도 2는 NXP 사의 SC16C850 타이밍도에 국한하지 않고, 다양한 UART의 출력 방식을 도식화 한 것이다.Referring to FIG. 2, when AFCR2 [5] is set to “1”, timing between SOUT and AutoRS-485 signals can be implemented in four ways as shown in FIG. 2. 2 is not limited to the timing chart of NXP's SC16C850, and is a diagram of various UART output methods.

상기의 AutoRS-485 신호를 이용하면 UART에 RS-485 트랜스시버를 붙여 사용하는데 문제가 없으나, AutoRS-485 신호만 가지고 RS-232, RS-422, RS-485 트랜스시버를 동일한 보드 상에 부착하고, 이를 선택하여 사용하려면 구현 회로가 복잡하고 추가적인 부품이 필요하다.When using the above AutoRS-485 signal, there is no problem in attaching the RS-485 transceiver to the UART, but attach the RS-232, RS-422, and RS-485 transceivers on the same board only with the AutoRS-485 signal. Implementation circuitry is complex and requires additional components to select and use.

현 시장에서 보면 저가의 장비에는 RS-232 트랜스시버, RS-422 트랜스시버, RS-485 트랜스시버 중 하나의 트랜스시버를 사용하지만, 고가의 장비는 사용자가 직접 RS-232 인터페이스, RS-422 인터페이스 및 RS-485 인터페이스 중 하나를 직접 선택하여 사용할 수 있게 되어 있다.In the current market, low-cost equipment uses one of RS-232 transceivers, RS-422 transceivers, and RS-485 transceivers, but expensive equipment can be directly connected to the RS-232 interface, RS-422 interface, and RS-485 by the user. It is possible to select and use one of the interfaces directly.

예를 들면, 8포트용 디바이스 서버인 경우 저가의 장비는 8 포트 전체가 RS-232인터페이스만 지원하거나, 8포트 전체 RS-485 인터페이스만 지원하게 된다.For example, in the case of an 8-port device server, low-cost equipment supports only the entire 8-port RS-232 interface or only the entire 8-port RS-485 interface.

하지만 사용자가 현장 시스템 구성상 8포트 중 4포트는 RS-232 인터페이스, 2포트는 RS-422 인터페이스, 그리고 나머지 2포트는 RS-485 인터페이스로 사용하기를 원한다면 저가의 장비인 경우 각각의 인터페이스를 가지는 디바이스 서버를 개별로 구입하여야 한다.However, if the user wants to use 4 of the 8 ports as an RS-232 interface, 2 ports as an RS-422 interface, and the remaining 2 ports as an RS-485 interface due to the on-site system configuration, each interface has a low-cost device. Device servers must be purchased separately.

하지만, 8포트가 각 포트별로 RS-232 인터페이스, RS-422 인터페이스, RS-485 인터페이스를 선택할 수 있다면 하나의 디바이스 서버만 구입하면 된다. 이런 이유로 본 발명은 RS-485 인터페이스에만 사용하기 편한 AutoRS-485 신호를 가지고, RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버를 동일 보드 상에 설치하고, 이를 사용자가 선택할 수 있게 하여 주는 것으로서 RS-232, RS-422, RS-485 선택 및 출력 신호 자동 제어기를 제공한다.However, if 8 ports can select RS-232 interface, RS-422 interface, or RS-485 interface for each port, you only need to purchase one device server. For this reason, the present invention has an AutoRS-485 signal that is easy to use only for the RS-485 interface, and installs an RS-232 transceiver, an RS-422 transceiver, and an RS-485 transceiver on the same board, allowing the user to select them. It provides RS-232, RS-422, and RS-485 selection and automatic control of output signals.

도 3 내지 도 5는 RS-232, RS-422, RS-485 트랜스시버를 설명하기 위한 도면이다.3 to 5 are diagrams for explaining RS-232, RS-422, and RS-485 transceivers.

도 3 내지 도 5를 참조하면, 도 3은 RS-232 트랜스시버 MAX3243 논리회로를 나타내는 도면이고, 도 4는 RS-422 트랜스시버 MAX3086 논리회로를 나타내는 도면이고, 도 5는 RS-485 트랜스시버 MAX3088 논리회로를 나타내는 도면이다.3 to 5, FIG. 3 is a diagram showing an RS-232 transceiver MAX3243 logic circuit, FIG. 4 is a diagram showing an RS-422 transceiver MAX3086 logic circuit, and FIG. 5 is an RS-485 transceiver MAX3088 logic circuit. It is a drawing shown.

표 3은 MAX3243 핀을 설명하기 위한 표이고, 표 4는 MAX3086 및 MAX3088 핀을 설명하기 위한 표이다.Table 3 is a table for describing the MAX3243 pin, and Table 4 is a table for describing the MAX3086 and MAX3088 pins.

Figure 112018046200803-pat00003
Figure 112018046200803-pat00003

Figure 112018046200803-pat00004
Figure 112018046200803-pat00004

RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버를 동일 보드와 동일 UART 포트에 할당하여 사용되는 경우에 대부분 사용하는 커넥터는 DE-9 Pin Male 커넥터이다. The most commonly used connector is the DE-9 Pin Male connector when RS-232 transceivers, RS-422 transceivers and RS-485 transceivers are assigned to the same board and the same UART port.

DE-9 Pin 커넥터는 9핀만 제공한다. RS-232인 경우 TXD, RXD, RTS, CTS, DTR, DSR, DCD, RI, GND 등 총 9개의 신호선을 사용하고, RS-422인 경우 TXD+, TXD-, RXD+, RXD- 등 4개의 신호선을 사용하고, RS-485인 경우 TRXD+, TRXD- 등 2개의 신호선을 사용한다. 이들 신호선을 모두 DE-9 Pin커넥터에 연결할 수 없으므로 RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버 중 한가지 트랜스시버만 사용이 가능하다.The DE-9 Pin connector only provides 9 pins. In case of RS-232, a total of 9 signal lines such as TXD, RXD, RTS, CTS, DTR, DSR, DCD, RI, GND are used, and in case of RS-422, 4 signal lines such as TXD +, TXD-, RXD +, and RXD- are used. In case of RS-485, two signal lines such as TRXD + and TRXD- are used. Since all of these signal lines cannot be connected to the DE-9 Pin connector, only one of the RS-232 transceiver, RS-422 transceiver, and RS-485 transceiver can be used.

RS-232 트랜스시버를 사용하는 경우 RS-422 트랜스시버 및 RS-485 트랜스시버를 셧다운 상태로, RS-422 트랜스시버를 사용하는 경우 RS-232 트랜스시버 및 RS-485 트랜스시버를 셧다운 상태로, RS-485 트랜스시버를 사용하는 경우 RS-232 트랜스시버 및 RS-422 트랜스시버를 셧다운 상태로 만들어야 한다. When using an RS-232 transceiver, the RS-422 transceiver and the RS-485 transceiver are in a shutdown state, when using the RS-422 transceiver, the RS-232 transceiver and the RS-485 transceiver are in a shutdown state, and the RS-485 transceiver is used. If necessary, the RS-232 transceiver and RS-422 transceiver must be shut down.

이러한 제어 신호를 AutoRS-485 신호와 함께 사용하여 제어하여야 하기 때문에 외부에 부가적인 회로 구성이 필요하게 된다. 이 회로 부분을 UART 내에 배치하고, RS-232, RS-422, RS-485 제어 신호를 출력하면 편리하게 동작을 수행할 수 있게 해 준다.Since these control signals must be controlled together with the AutoRS-485 signal, an additional circuit configuration is required externally. Placing this circuit part in the UART and outputting RS-232, RS-422, and RS-485 control signals makes it easy to perform operations.

이를 위해서 UART 내의 특정 레지스터(이하 '인터페이스 모드 레지스터'라칭함)(표 1의 빈 영역)를 두거나 인터페이스 모드 레지스터(IMR, Interface Mode Register)에 해당하는 것을 외부 핀으로 두고 이를 딥 스위치 등 다양한 방식으로 값을 입력 받아 처리하면 된다. 외부 핀으로부터 입력 받는 경우 최소의 핀을 사용하는 것이 좋기 때문에 2 비트만 사용하는 구조로 하는 것이 가장 적절한 방법이다.To this end, a specific register (hereinafter referred to as an 'interface mode register') in the UART (empty area in Table 1) or an interface pin (IMR, Interface Mode Register) is set as an external pin and it is used in various ways, such as a dip switch. Just take the value and process it. When receiving input from an external pin, it is recommended to use the smallest pin, so it is the most appropriate method to use only 2 bits.

이하의 표 5는 인터페이스 모드 레지스터와 이에 해당하는 외부 핀으로 두고 딥스위치를 사용한 경우의 회선 인터페이스를 나타내는 표이다.Table 5 below is a table showing a line interface when a dip switch is used with the interface mode register and the corresponding external pin.

Figure 112018046200803-pat00005
Figure 112018046200803-pat00005

표 5에서 RS-485 4회선은 RS-422과 동일한 구조로 사용한다. 상기의 IMR 값이나 딥 스위치 ON/OFF값에 할당된 회선 인터페이스 종류는 고정된 것이 아니라 다르게 할당하여 사용할 수 있다.In Table 5, RS-485 4-line is used with the same structure as RS-422. The type of the line interface allocated to the above IMR value or the dip switch ON / OFF value is not fixed but can be allocated and used differently.

상기의 값과 AutoRS-485 신호를 조합하여 RS-232 회선 인터페이스, RS-422 회선 인터페이스 및 RS-485 회선 인터페이스 중 하나의 회선 인터페이스를 선택하여 사용할 수 있는 논리회로를 구성하면 별도의 외부 회로를 구성할 필요가 없다. Combining the above values and AutoRS-485 signals to configure a logic circuit that can be used by selecting one of the RS-232 line interface, RS-422 line interface, and RS-485 line interface, forms a separate external circuit. There is no need to do.

이 경우 외부에 RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버를 동시에 두고 AutoRS-485신호를 이용하여 해당 트랜스시버를 적절하게 제어해야 하며, 이에 해당하는 부분이 회선 인터페이스 제어부이다.In this case, the external RS-232 transceiver, the RS-422 transceiver, and the RS-485 transceiver should be placed at the same time, and the corresponding transceiver should be appropriately controlled using the AutoRS-485 signal, and the corresponding part is the circuit interface controller.

인터페이스 모드 레지스터에 의한 설정은 소프트웨어 프로그램을 통하여 회선 인터페이스를 선택할 수가 있으며, 딥 스위치에 의한 설정은 제품에 장착되어 있는 딥 스위치를 ON 또는 OFF 시켜 회선 인터페이스를 선택할 수 있다.The line interface can be selected through the software program for setting by the interface mode register, and the line interface can be selected by turning on or off the dip switch installed in the product.

도 6은 회선 인터페이스 제어부에 대한 블록 다이어그램을 설명하기 위한 도면이다.6 is a view for explaining a block diagram of a circuit interface control unit.

도 6을 참조하면, 회선 인터페이스 제어부(610)는 상기의 표 5에서와 같이 인터페이스 모드 레지스터의 값(이하 'IMR[1:0]'라 칭함)과 딥 스위치의 값(이하 'DIP SW[1:0]'라 칭함)의 값을 입력 받아, MODE_SELECT에 따라 IMR[1:0] 또는 DIP SW[1:0]을 인터페이스 모드 선택 값으로 결정한다.Referring to FIG. 6, the line interface control unit 610 has the interface mode register value (hereinafter referred to as 'IMR [1: 0]') and a dip switch value (hereinafter referred to as 'DIP SW [1') as shown in Table 5 above. : 0] '), IMR [1: 0] or DIP SW [1: 0] is determined as the interface mode selection value according to MODE_SELECT.

예를 들면, MODE_SELECT 값이 '0'이면 IMR[1:0]의 값을 회선 인터페이스 종류를 선택하는 값으로 사용하고, '1'이면 DIP SW[1:0]의 값을 회선 인터페이스 종류를 선택하는 값으로 사용한다.For example, if the MODE_SELECT value is '0', the value of IMR [1: 0] is used as the value for selecting the line interface type, and if it is '1', the value of DIP SW [1: 0] is selected for the line interface type. It is used as a value.

SOUT은 도 1의 SOUT으로 전송 이동 레지스터(30)에서 출력되어 외부로 전송되는 직렬데이터 신호선이다. 이것은 회선 인터페이스 제어부(610)의 LINE_SOUT으로 바로 출력되어 RS-232 트랜스시버(620), RS-422 트랜스시버(630) 및 RS-485 트랜스시버(640)의 드라이버 핀(DI)으로 연결되게 된다.SOUT is a serial data signal line output from the transfer shift register 30 to SOUT in FIG. 1 and transmitted to the outside. This is directly output to LINE_SOUT of the line interface control unit 610 to be connected to the driver pin DI of the RS-232 transceiver 620, the RS-422 transceiver 630, and the RS-485 transceiver 640.

SIN 값은 UART 내의 수신 이동 레지스터에 입력되는 직렬데이터 신호이며, RS-232트랜스시버의 RS-232_SIN 신호선, RS-422 트랜스시버(630)의 RS-422_SIN, RS-485 트랜스시버(640)의RS-485_SIN 신호선에서 입력되는 직렬데이터를 회선 인터페이스 값에 의해 선택되어 출력되는 신호선이다.The SIN value is a serial data signal input to the receive transfer register in the UART, and the RS-232_SIN signal line of the RS-232 transceiver, the RS-422_SIN of the RS-422 transceiver 630, and the RS-485_SIN signal line of the RS-485 transceiver 640 It is a signal line that is output by selecting the serial data input from the line interface value.

RS-422_MODE_SELECT 입력 신호선은 RS-422 동작 방식을 1:1 방식을 사용할지 또는 멀티드롭 방식을 사용할지를 선택하는데 사용된다. 즉, RS-422_MODE_SELECT 값이 '0'이면 1:1 방식을 선택하며, '1'이면 멀티드롭 방식을 선택한다. 여기서 RS-422_MODE_SELECT 값은 반대로도 적용되어 사용될 수 있다.The RS-422_MODE_SELECT input signal line is used to select whether to use the RS-422 operation method 1: 1 or multi-drop method. That is, if the RS-422_MODE_SELECT value is '0', the 1: 1 method is selected, and if it is '1', the multi-drop method is selected. Here, the RS-422_MODE_SELECT value can be used to the contrary.

회선 인터페이스 제어부(610)는 인터페이스 모드 선택 값에 따라 모드 선택 신호(즉, RS-232_SOUT_EN_SIN_EN, RS-422_SOUT_EN, RS-422_SIN_EN, RS-485_SOUT_EN, RS-485 SIN_EN신호 등 총 5개의 신호)를 생성하여 RS-232 트랜스시버(620), RS-422 트랜스시버(630) 및 RS-485 트랜스시버(640)를 제어하게 된다.The line interface control unit 610 generates a mode selection signal according to the interface mode selection value (that is, RS-232_SOUT_EN_SIN_EN, RS-422_SOUT_EN, RS-422_SIN_EN, RS-485_SOUT_EN, RS-485 SIN_EN signals, etc.) to generate RS. The -232 transceiver 620, the RS-422 transceiver 630, and the RS-485 transceiver 640 are controlled.

일 실시예에서, SOUT과 SIN을 RS-232 트랜스시버(620)를 통하여 외부로 송수신하고, RS-422 트랜스시버(630) 및 RS-485 트랜스시버(640)를 통하여 외부로 송수신을 원하지 않는 경우에는 상기의 [표 5]를 기준으로 하여 IMR[1:0]을 00b로 설정하거나 DIP SW[1:0]를 OFF/OFF 시키면 된다.In one embodiment, SOUT and SIN are transmitted and received externally through the RS-232 transceiver 620, and when the external transmission and reception are not desired through the RS-422 transceiver 630 and the RS-485 transceiver 640, the above Based on [Table 5], set IMR [1: 0] to 00b or turn DIP SW [1: 0] off / off.

상기의 경우에는 RS-422 트랜스시버(630) 및 RS-485 트랜스시버(640)가 작동을 하지 않아야 한다. 그러기 위해서는 RS-232 트랜스시버(620)만 활성화 되고 RS-422 트랜스시버(630) 및 RS-485 트랜스시버(640)는 비 활성화 상태로 만들어야 한다.In the above case, the RS-422 transceiver 630 and the RS-485 transceiver 640 should not operate. To do this, only the RS-232 transceiver 620 is activated and the RS-422 transceiver 630 and the RS-485 transceiver 640 must be made inactive.

이를 위해, 도 3 및 표 3에 나와 있는 /FORCEOFF 핀에 '1'을 RS-232_SOUT_EN_SIN_EN 핀을 통하여 입력시켜 RS-232 트랜스시버(620)를 활성화 상태로 만들고(auto-powerdown 기능을 사용하지 않을 때는 FORCEON에 '1'을 입력한다), 도 4 및 표 4에 나와 있는 RS-422 트랜스시버(630)의 DE와 /RE 핀에 '0'과 '1'을 각각 RS-422_SOUT_EN과 RS422-SIN_EN핀을 통하여 입력시켜 저전력 셧다운 상태로 만들어 RS-422 트랜스시버(630)를 비활성화 상태가 되게 한다.To this end, input '1' to the / FORCEOFF pin shown in FIG. 3 and Table 3 through the RS-232_SOUT_EN_SIN_EN pin to make the RS-232 transceiver 620 active (Forceon when not using the auto-powerdown function) '1'), '0' and '1' to the DE and / RE pins of the RS-422 transceiver 630 shown in FIG. 4 and Table 4 through RS-422_SOUT_EN and RS422-SIN_EN pins, respectively. The input is made into a low power shutdown state, and the RS-422 transceiver 630 is deactivated.

그리고, 도 5 및 표 4에 나와 있는 RS-485 트랜스시버(640)의 DE와 /RE 핀에 '0'과 '1'을 각각 RS-485_SOUT_EN과 RS485-SIN_EN핀을 통하여 입력시켜 저전력 셧다운 상태로 만들어 RS-485 트랜스시버(640)를 비활성화 상태가 되게 한다.In addition, '0' and '1' are input to the DE and / RE pins of the RS-485 transceiver 640 shown in FIGS. 5 and 4 through RS-485_SOUT_EN and RS485-SIN_EN pins, respectively, to make a low-power shutdown state. The RS-485 transceiver 640 is made inactive.

그러면 RS-422 트랜스시버(630) 및 RS-485 트랜스시버(640)는 회로 상에서 없는 것과 동일한 효과가 나고, RS-232 트랜스시버(620)만 동작하게 된다.Then, the RS-422 transceiver 630 and the RS-485 transceiver 640 have the same effect as not on the circuit, and only the RS-232 transceiver 620 operates.

다른 일 실시예에서, SOUT과 SIN을 RS-422 트랜스시버(630)를 통하여 외부로 송수신하고, RS-232 트랜스시버(620) 및 RS-485 트랜스시버(640)를 통하여 외부로 송수신하기를 원하지 않는 경우에는 표 5를 기준으로 하여 IMR[1:0]을 01b로 세팅하거나 DIP SW[1:0]을 OFF/ON 시키면 된다.In another embodiment, if you do not want to transmit and receive SOUT and SIN to the outside through the RS-422 transceiver 630, RS-232 transceiver 620 and the RS-485 transceiver 640 to the outside. Set IMR [1: 0] to 01b or turn DIP SW [1: 0] OFF / ON based on Table 5.

이 경우에는 RS-232 트랜스시버(620) 및 RS-485 트랜스시버(640)가 동작 하지 않아야 한다. 그러기 위해서는 RS-422 트랜스시버(630)만 활성화 되고 RS-232 트랜스시버(620) 및 RS-485 트랜스시버(640)는 비 활성화 상태로 만들면 된다.In this case, the RS-232 transceiver 620 and the RS-485 transceiver 640 should not operate. To do this, only the RS-422 transceiver 630 is activated, and the RS-232 transceiver 620 and the RS-485 transceiver 640 need only be made inactive.

이를 위해, RS-422 트랜스시버(630)를 멀티 드롭 모드로 사용할 경우에는 RS-422 트랜스시버(630)DE핀에 AutoRS-485신호를 RS-422_SOUT_EN핀을 통하여 입력시키고, 1:1 모드로 사용할 경우에는 '1'를 RS-422_SOUT_EN 핀을 통하여 입력시킨다. 그리고 RS-422 트랜스시버(630) /RE 핀에 '0'을 RS-422_SIN_EN핀을 통하여 입력시켜 RS-422 트랜스시버(630)를 활성화 시킨다.To this end, when the RS-422 transceiver 630 is used in the multi-drop mode, an AutoRS-485 signal is input to the RS-422 transceiver 630 DE pin through the RS-422_SOUT_EN pin, and when used in the 1: 1 mode. Input '1' through RS-422_SOUT_EN pin. In addition, RS-422 transceiver 630 is activated by inputting '0' to the RS-422 transceiver 630 / RE pin through the RS-422_SIN_EN pin.

그리고 RS-232 트랜스시버(620)의 /FORCEOFF 핀에 '0'을 RS-232_SOUT_EN_SIN_EN을 통하여 입력시켜 셧다운 상태로 만들어 RS-232 트랜스시버(620)를 비활성화 상태가 되게 한다.In addition, the RS-232 transceiver 620 is deactivated by inputting '0' to the / FORCEOFF pin of the RS-232 transceiver 620 through RS-232_SOUT_EN_SIN_EN to make it a shutdown state.

또한 RS-485 트랜스시버(640)인 경우 DE와 /RE 핀에 '0'과 '1'을 각각 RS-485_SOUT_EN과 RS485-SIN_EN핀을 통하여 입력시켜 셧다운 상태로 만들어 RS-485 트랜스시버(640)를 비활성화 상태가 되게 한다.In addition, in case of the RS-485 transceiver 640, '0' and '1' are input to the DE and / RE pins through the RS-485_SOUT_EN and RS485-SIN_EN pins, respectively, to be shut down to disable the RS-485 transceiver 640. State.

그러면 RS-232 트랜스시버(620), RS-485 트랜스시버(640)는 회로 상에서 없는 것과 동일한 효과가 나고, RS-422 트랜스시버(630)만 동작하게 된다.Then, the RS-232 transceiver 620 and the RS-485 transceiver 640 have the same effect as not on the circuit, and only the RS-422 transceiver 630 operates.

RS-485 2회선 통신 모드는 에코 모드와 논 에코 모드 두 가지가 있다.There are two types of RS-485 two-wire communication modes: eco mode and non-echo mode.

에코 모드는 RS-485 트랜스시버(640)의 /RE 핀에 항상 '0'이 입력되어, DE가 '0'일 때는 다른 RS-485 트랜스시버가 보내는 시리얼 데이터를 입력 받게 되고, DE가 '1'일 때 자신이 보낸 시리얼 데이터도 입력이 된다. 즉, 내가 출력시킨 시리얼 데이터가 바로 입력되게 되는데, 이때, 다른 RS-485트랜스시버가 시리얼 데이터를 보내지 않으면 내가 보낸 시리얼 데이터가 온전히 입력되게 되고, 다른 RS-485 트랜스시버가 시리얼 데이터를 보내면 데이터는 충돌이 발생하여 내가 보낸 시리얼 데이터가 온전하게 입력되지 않는다.In the Eco mode, '0' is always input to the / RE pin of the RS-485 transceiver 640, and when DE is '0', serial data from another RS-485 transceiver is received and DE is '1'. The serial data sent by the user is also input. In other words, the serial data that I output is directly inputted. At this time, if the other RS-485 transceiver does not send the serial data, the serial data sent by me will be input completely, and if another RS-485 transceiver sends the serial data, the data will collide. Occurred, the serial data I sent is not completely input.

즉, 에코 모드는 내가 보낸 시리얼 데이터가 상대편에게 제대로 송신되었는지를 확인 가능하게 한다.That is, the eco mode makes it possible to check whether the serial data I have sent is properly transmitted to the other party.

논 에코 모드는 RS-485 트랜스시버(640)의 /RE핀과 DE핀에 공통 접속되게 된다. 이 경우 AutoRS-485 신호가 RS-485_SOUT_EN핀과 RS-485_SIN_EN핀에 출력되어 RS-485 트랜스시버(640) DE핀과 /RE핀에 입력되는데, AutoRS-485 신호가 '1'이 출력되면 DE핀에 '1' 입력이 입력되고 동시에 /RE핀에 '1'이 입력된다.The non-echo mode is commonly connected to the / RE pin and the DE pin of the RS-485 transceiver 640. In this case, the AutoRS-485 signal is output to the RS-485_SOUT_EN pin and RS-485_SIN_EN pin and input to the RS-485 transceiver 640 DE pin and / RE pin. When the AutoRS-485 signal is '1', it is connected to the DE pin. '1' input is input and '1' is input to / RE pin at the same time.

이 경우는 RS-485 트랜스시버(640)의 출력은 활성화 되지만, 입력은 비 활성화 상태가 된다. 즉, 내가 보낸 시리얼 데이터가 재 입력되지 않기 때문에 내가 보낸 시리얼 데이터가 충돌 발생하지 않고, 상대편에게 제대로 전송되었는지 확인 불가하다. 이 경우에는 상대편이 응답하면 시리얼 데이터가 제대로 전송되었다고 볼 수 있고, 상대편이 응답하지 않으면 시리얼 데이터가 충돌 발생했다고 판단할 수 있다.In this case, the output of the RS-485 transceiver 640 is activated, but the input is deactivated. That is, since the serial data that I sent is not re-entered, it is impossible to check whether the serial data that I sent does not collide and is properly transmitted to the other party. In this case, if the other party responds, it can be considered that the serial data has been properly transmitted. If the other party does not respond, it can be determined that the serial data has collided.

또는 AutoRS-485신호에 '0'이 출력되면, RS-485 트랜스시버(640) DE에 '0'이 입력되고, /RE에 '0'이 입력되어 RS-485 트랜스시버(640)의 출력은 비 활성화 상태가 되지만, 입력은 활성화 된다. 이 경우에는 상대편 RS-485트랜스시버가 보낸 시리얼 데이터를 입력 받을 수 있게 된다.Alternatively, when '0' is output to the AutoRS-485 signal, '0' is input to the RS-485 transceiver 640 DE, and '0' is input to / RE to disable the output of the RS-485 transceiver 640. State, but the input is active. In this case, serial data sent from the RS-485 transceiver of the other side can be input.

일 실시예에서, SOUT과 SIN을 RS-485 트랜스시버(640)를 통하여 외부로 송수신하되, 논 에코 모드로 사용하고, RS-232 트랜스시버(620), RS-422 트랜스시버(630)를 통하여 외부로 송수신하기를 원하지 않는 경우에는 표 5을 기준으로 하여 IMR[1:0]을 10b로 설정하거나 DIP SW[1:0]을 ON/OFF 설정하면 된다.In one embodiment, SOUT and SIN are transmitted and received externally through the RS-485 transceiver 640, but are used as a non-echo mode, and transmitted and received externally through the RS-232 transceiver 620 and the RS-422 transceiver 630. If you do not want the following, you can set IMR [1: 0] to 10b or set DIP SW [1: 0] ON / OFF based on Table 5.

이 경우에는 RS-485 트랜스시버(640)만 논 에코 모드로 활성화 시키고 RS-232 트랜스시버(620) 및 RS-422 트랜스시버(630)는 비 활성화 상태로 만들면 되는데, RS-485 트랜스시버(640) DE핀에 AutoRS-485신호를 RS-485_SOUT_EN핀을 통하여 입력시키고, /RE 핀에 AutoRS-485신호를 RS-485_SIN_EN핀을 통하여 입력시켜 RS-485 트랜스시버(640)를 논 에코 모드로 활성화 시킨다.In this case, only the RS-485 transceiver 640 may be activated in the non-echo mode, and the RS-232 transceiver 620 and the RS-422 transceiver 630 may be made inactive, to the DE pin of the RS-485 transceiver 640. AutoRS-485 signal is input through RS-485_SOUT_EN pin and AutoRS-485 signal is input to / RE pin through RS-485_SIN_EN pin to activate RS-485 transceiver 640 in non-echo mode.

그리고 RS-232 트랜스시버(620)의 /FORCEOFF 핀에 '0'을 RS-232_SOUT_EN_SIN_EN을 통하여 입력시켜 셧다운 상태로 만들어 RS-232 트랜스시버(620)를 비활성화 상태가 되게 한다. RS-422 트랜스시버(630)의 DE와 /RE 핀에 '0'과 '1'을 각각 RS-422_SOUT_EN과 RS422-SIN_EN핀을 통하여 입력시켜 저전력 셧다운 상태로 만들어 RS-422 트랜스시버(630)를 비활성화 상태가 되게 한다.In addition, the RS-232 transceiver 620 is deactivated by inputting '0' to the / FORCEOFF pin of the RS-232 transceiver 620 through RS-232_SOUT_EN_SIN_EN to make it a shutdown state. RS-422 transceiver 630 is disabled by inputting '0' and '1' to the DE and / RE pins of RS-422 transceiver 630 through RS-422_SOUT_EN and RS422-SIN_EN pins, respectively. To be.

그러면 RS-232 트랜스시버(620) 및 RS-422 트랜스시버(630)는 회로 상에서 없는 것과 동일한 효과가 나고, RS-485 트랜스시버(640)만 동작하게 된다.Then, the RS-232 transceiver 620 and the RS-422 transceiver 630 have the same effect as not on the circuit, and only the RS-485 transceiver 640 operates.

다른 일 실시예에서, SOUT과 SIN을 RS-485 트랜스시버(640)를 통하여 외부로 송수신하되, Echo모드로 사용하고, RS-232트랜스시버(620) 및 RS-422 트랜스시버(630)를 통하여 외부로 송수신하기를 원하지 않는 경우에는 표 5를 기준으로 하여 IMR[1:0]을 11b로 세팅하거나 DIP SW[1:0]을 ON/ON 시키면 된다.In another embodiment, SOUT and SIN are transmitted and received externally through the RS-485 transceiver 640, but are used in the Echo mode, and transmitted and received externally through the RS-232 transceiver 620 and the RS-422 transceiver 630. If you do not want to do the following, you can set IMR [1: 0] to 11b or turn DIP SW [1: 0] ON / ON based on Table 5.

이 경우에는 RS-485 트랜스시버(640)만 Echo모드로 활성화 시키고 RS-232 트랜스시버(620) 및 RS-422 트랜스시버(630)는 비활성화 상태로 만들면 되는데, RS-485 트랜스시버(640) DE핀에 AutoRS-485신호를 RS-485_SOUT_EN핀을 통하여 입력시키고, /RE 핀에 '0'을 RS-485_SIN_EN핀을 통하여 입력시켜 RS-485 트랜스시버(640)를 에코 모드로 활성화 시킨다.In this case, only the RS-485 transceiver 640 is activated in the Echo mode, and the RS-232 transceiver 620 and the RS-422 transceiver 630 need to be made inactive, but the RS-485 transceiver 640 DE pin is autoRS- The 485 signal is input through the RS-485_SOUT_EN pin, and '0' is input to the / RE pin through the RS-485_SIN_EN pin to activate the RS-485 transceiver 640 in eco mode.

그리고 RS-232 트랜스시버(620)의 /FORCEOFF 핀에 '0'을 RS-232_SOUT_EN_SIN_EN을 통하여 입력시켜 셧다운 상태로 만들어 RS-232 트랜스시버(620)를 비활성화 상태가 되게 한다. RS-422 트랜스시버(630)의 DE와 /RE 핀에 '0'과 '1'을 각각 RS-422_SOUT_EN과 RS422-SIN_EN핀을 통하여 입력시켜 저전력 셧다운 상태로 만들어 RS-422 트랜스시버(630)를 비활성화 상태가 되게 한다.In addition, the RS-232 transceiver 620 is deactivated by inputting '0' to the / FORCEOFF pin of the RS-232 transceiver 620 through RS-232_SOUT_EN_SIN_EN to make it a shutdown state. RS-422 transceiver 630 is disabled by inputting '0' and '1' to the DE and / RE pins of RS-422 transceiver 630 through RS-422_SOUT_EN and RS422-SIN_EN pins, respectively. To be.

그러면 RS-232 트랜스시버(620) 및 RS-422 트랜스시버(630)는 회로 상에서 없는 것과 동일한 효과가 나고, RS-485 트랜스시버(640)만 동작하게 된다.Then, the RS-232 transceiver 620 and the RS-422 transceiver 630 have the same effect as not on the circuit, and only the RS-485 transceiver 640 operates.

도 7은 IMR과 DIP SW의 값 중 한가지를 선택하여 인터페이스 모드 선택 값으로 출력시키는 과정을 설명하기 위한 도면이다.7 is a view for explaining a process of selecting one of the values of the IMR and DIP SW and outputting it as an interface mode selection value.

도 7을 참조하면, IMR과 DIP SW의 값 중 한가지를 선택하여 인터페이스 모드 선택 값으로 출력시키는 2X1 MUX 이다. MODE_SELECT값이 '0'이면 I0에 입력되는 값을 Y로 출력시키고, MODE_SELECT 값이 '1'이면 I1에 입력되는 값을 Y로 출력시킨다. 그림 7에서 생성된 인터페이스 모드 선택 값 'IMS[1:0]'을 이용하여 회선 인터페이스 방식을 선택하게 된다.Referring to FIG. 7, it is a 2X1 MUX that selects one of the values of IMR and DIP SW and outputs it as an interface mode selection value. If the MODE_SELECT value is '0', the value input to I0 is output as Y, and if the MODE_SELECT value is '1', the value input to I1 is output as Y. The circuit interface method is selected using the interface mode selection value 'IMS [1: 0]' created in Figure 7.

도 8은 도 7의 인터페이스 모드 선택 값에 의하여 RS-232_SOUT_EN_SIN_EN 신호를 발생시키는 4X1 MUX 이다.FIG. 8 is a 4X1 MUX generating an RS-232_SOUT_EN_SIN_EN signal according to the interface mode selection value of FIG. 7.

도 8을 참조하면, 도 7의 인터페이스 모드 선택 값 'IMS[1:0]'에 의하여 RS-232_SOUT_EN_SIN_EN신호를 발생시키는 4X1 MUX 이다. S1과 S0에 "00"이 입력되면 I0에 입력되는 값을 Y로 출력시키고, S1과 S0에 "01"'이 입력되면 I1에 입력되는 값을 Y로 출력시키고, S1과 S0에 "10"'이 입력되면 I2에 입력되는 값을 Y로 출력시키고, S1과 S0에 "11"'이 입력되면 I3에 입력되는 값을 Y로 출력시킨다.Referring to FIG. 8, it is a 4X1 MUX that generates an RS-232_SOUT_EN_SIN_EN signal according to the interface mode selection value 'IMS [1: 0]' of FIG. 7. When "00" is inputted to S1 and S0, the value inputted to I0 is outputted as Y. When "01" 'is inputted to S1 and S0, the value inputted to I1 is outputted as Y, and "10" to S1 and S0. When 'is input, the value input to I2 is output as Y, and when "11"' is input to S1 and S0, the value input to I3 is output as Y.

도 9는 도 7의 인터페이스 모드 선택 값에 의하여 RS-422_SOUT_EN 신호를 발생시키는 4X1 MUX 이다.FIG. 9 is a 4X1 MUX generating an RS-422_SOUT_EN signal according to the interface mode selection value of FIG. 7.

도 9를 참조하면, RS-422_MODE_SELECT 값과 도 7의 인터페이스 모드 선택 값에 의하여 RS-422_SOUT_EN 신호를 발생시키는 4X1 MUX 이다. RS-422_MODE_SELECT에 의해서 RS-422 동작 방식을 1:1로 사용할지 또는 멀티드롭 방식으로 사용할지 결정하고, 도 7의 인터페이스 모드 선택 값 'IMS[1:0]'에 의하여 RS-422 트랜스시버의 동작방식이 결정된다.Referring to FIG. 9, it is a 4X1 MUX that generates an RS-422_SOUT_EN signal according to the RS-422_MODE_SELECT value and the interface mode selection value of FIG. 7. Determine whether to use the RS-422 operation method 1: 1 or multi-drop by RS-422_MODE_SELECT, and operate the RS-422 transceiver by the interface mode selection value 'IMS [1: 0]' in FIG. 7 The way is decided.

도 10은 도 7의 인터페이스 모드 선택 값에 의하여 RS-422_SIN_EN 신호를 발생시키는 4X1 MUX 이다.FIG. 10 is a 4X1 MUX generating an RS-422_SIN_EN signal according to the interface mode selection value of FIG. 7.

도 10을 참조하면, 인터페이스 모드 선택 값 'IMS[1:0]'에 의하여 RS-422 트랜스시버의 동작 방식이 결정된다.Referring to FIG. 10, the operation method of the RS-422 transceiver is determined by the interface mode selection value 'IMS [1: 0]'.

도 11은 도 7의 인터페이스 모드 선택 값에 의하여 RS-485_SOUT_EN 신호를 발생시키는 4X1 MUX 이다.FIG. 11 is a 4X1 MUX generating an RS-485_SOUT_EN signal according to the interface mode selection value of FIG. 7.

도 11을 참조하면, 인터페이스 모드 선택 값 'IMS[1:0]'에 의하여 RS-485 트랜스시버의 동작 방식이 결정된다. Referring to FIG. 11, an operation method of an RS-485 transceiver is determined by the interface mode selection value 'IMS [1: 0]'.

도 12는 도 7의 인터페이스 모드 선택 값에 의하여 RS-485_SIN_EN 신호를 발생시키는 4X1 MUX 이다.FIG. 12 is a 4X1 MUX generating an RS-485_SIN_EN signal according to the interface mode selection value of FIG. 7.

도 12를 참조하면, 인터페이스 모드 선택 값 'IMS[1:0]'에 의하여 RS-485 트랜스시버의 동작 방식이 결정된다. 인터페이스 모드 선택 값 'IMS[1:0]'이 "10"이면 AutoRS-485값을 출력시켜 RS-485 트랜스시버를 논 에코 모드로 동작하는 것을 구현하고, 인터페이스 모드 선택 값 'IMS[1:0]'이 "11"이면 '0'을 출력시켜 RS-485 트랜스시버를 에코 모드로 동작하는 것을 구현한다.Referring to FIG. 12, the operation method of the RS-485 transceiver is determined by the interface mode selection value 'IMS [1: 0]'. If the interface mode selection value 'IMS [1: 0]' is "10", the RS-485 transceiver is operated in non-echo mode by outputting the AutoRS-485 value, and the interface mode selection value 'IMS [1: 0] If 'is' 11', '0' is output to implement operation of the RS-485 transceiver in eco mode.

도 13은 도 7의 인터페이스 모드 선택 값에 의하여 SIN 신호를 발생시키는 4X1 MUX 이다.13 is a 4X1 MUX generating an SIN signal according to the interface mode selection value of FIG. 7.

도 13을 참조하면, LINE_SOUT신호는 SOUT신호를 버퍼를 통하여 출력하거나 바로 결선하여 출력하면 된다.Referring to FIG. 13, the LINE_SOUT signal can be output by outputting the SOUT signal through a buffer or directly connecting it.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명 사상은 아래에 기재된 청구범위에 의해서만 파악되어야 하고, 이의 균등 또는 등가적 변형 모두는 본 발명 사상의 범주에 속한다고 할 것이다.As described above, although the present invention has been described by limited embodiments and drawings, the present invention is not limited to the above embodiments, and various modifications and modifications from these descriptions will be made by those skilled in the art to which the present invention pertains. Deformation is possible. Accordingly, the spirit of the present invention should be understood only by the claims set forth below, and all equivalent or equivalent modifications thereof will be said to fall within the scope of the spirit of the present invention.

10 : 보 발생기 20 : 전송 시간 제어부
30 : 전송 이동 레지스터 40 : 전송 대기 레지스터
50 : FIFO 610 : 회선 인터페이스 제어부
620 : RS-232 트랜스시버 630 : RS-422 트랜스시버
640 : RS-485 트랜스시버
10: beam generator 20: transmission time control unit
30: transfer transfer register 40: transfer wait register
50: FIFO 610: line interface control unit
620: RS-232 transceiver 630: RS-422 transceiver
640: RS-485 transceiver

Claims (5)

복수의 트랜스시버 중 어느 하나의 트랜스시버의 회선 인터페이스를 선택하는 값으로 설정된 인터페이스 모드 레지스터;
온 상태 및 오프 상태 중 적어도 하나의 상태의 값으로 설정된 딥 스위치; 및
상기 인터페이스 모드 레지스터의 값, 딥 스위치의 값 및 수신 신호의 값 중 적어도 하나에 따라 인터페이스 모드 선택 값을 생성하고, 상기 인터페이스 모드 선택 값에 따라 상기 복수의 트랜스시버 각각을 제어하는 회선 인터페이스 제어부를 포함하여 구성되고,
상기 회선 인터페이스 제어부는
상기 수신 신호 중 MODE_SELECT에 따라 상기 인터페이스 모드 레지스터의 값 및 상기 딥 스위치의 값 중 어느 하나의 값을 인터페이스 모드 선택 값으로 결정하고, 상기 인터페이스 모드 선택 값에 따라 모드 선택 신호를 생성하고,
상기 인터페이스 모드 선택 값에 따라 상기 복수의 트랜스시버 중 어느 하나의 트랜스시버를 활성화시키고 나머지 트랜스시버를 비활성화시키는 모드 선택 신호를 생성하는 것을 특징으로 하는, RS-232, RS-422, RS-485 선택 및 출력신호 자동 제어기.
An interface mode register set to a value for selecting a line interface of any one of a plurality of transceivers;
A dip switch set to a value of at least one of an on state and an off state; And
And an interface mode control unit generating an interface mode selection value according to at least one of the value of the interface mode register, the value of the dip switch, and the value of the received signal, and controlling each of the plurality of transceivers according to the interface mode selection value. Composed,
The line interface control unit
The value of the interface mode register and the value of the dip switch are determined as an interface mode selection value according to MODE_SELECT among the received signals, and a mode selection signal is generated according to the interface mode selection value,
RS-232, RS-422, RS-485 selection and output signal, characterized in that for generating a mode selection signal for activating any one of the plurality of transceivers and deactivating the remaining transceivers according to the interface mode selection value Automatic controller.
삭제delete 삭제delete 제1항에 있어서,
상기 회선 인터페이스 제어부는
상기 복수의 트랜스시버가 동일 보드 상에 있고, 상기 인터페이스 모드 선택 값에 따라 상기 복수의 통신 모드 중 어느 하나의 통신 모드로 해당 트랜스시버를 활성화시키고 나머지 트랜스시버를 비활성화시키는 모드 선택 신호를 생성하는 것을 특징으로 하는, RS-232, RS-422, RS-485 선택 및 출력신호 자동 제어기.
According to claim 1,
The line interface control unit
The plurality of transceivers are on the same board, and according to the interface mode selection value, it is characterized in that it generates a mode selection signal for activating the corresponding transceiver and deactivating the remaining transceivers in one of the plurality of communication modes. , RS-232, RS-422, RS-485 selection and output signal automatic controller.
제4항에 있어서,
상기 복수의 트랜스시버는
RS-232 트랜스시버, RS-422 트랜스시버 및 RS-485 트랜스시버 중 하나의 트랜스시버가 동작하는 것을 특징으로 하는, RS-232, RS-422, RS-485 선택 및 출력신호 자동 제어기.
According to claim 4,
The plurality of transceivers
RS-232, RS-422, RS-485 selection and output signal automatic controller, characterized in that one of the RS-232 transceiver, RS-422 transceiver and RS-485 transceiver operates.
KR1020180053993A 2018-05-11 2018-05-11 Output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication KR102098467B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180053993A KR102098467B1 (en) 2018-05-11 2018-05-11 Output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180053993A KR102098467B1 (en) 2018-05-11 2018-05-11 Output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication

Publications (2)

Publication Number Publication Date
KR20190129404A KR20190129404A (en) 2019-11-20
KR102098467B1 true KR102098467B1 (en) 2020-04-07

Family

ID=68729238

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180053993A KR102098467B1 (en) 2018-05-11 2018-05-11 Output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication

Country Status (1)

Country Link
KR (1) KR102098467B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117609144A (en) * 2024-01-23 2024-02-27 深圳市三旺通信股份有限公司 RS485, RS422 and RS232 three-in-one interface multiplexing circuit

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR950015081B1 (en) * 1993-07-07 1995-12-21 삼성중공업주식회사 Switching method and unit of communication mode
CN103389958B (en) * 2013-06-27 2016-08-17 三星半导体(中国)研究开发有限公司 USB (universal serial bus)

Also Published As

Publication number Publication date
KR20190129404A (en) 2019-11-20

Similar Documents

Publication Publication Date Title
CN102023954B (en) Device with multiple I2C buses, processor, system main board and industrial controlled computer
US5905885A (en) Method and apparatus for interfacing between peripherals of multiple formats and a single system bus
EP2974237B1 (en) Communications unit for an industrial process network
US5416909A (en) Input/output controller circuit using a single transceiver to serve multiple input/output ports and method therefor
WO2017044301A1 (en) Input/output signal bridging and virtualization in a multi-node network
WO2004029814A2 (en) Interface integrated circuit device for a usb connection
US5461701A (en) System and method for peripheral data transfer
JP2010086524A (en) Bridge device with function to save power
US5794014A (en) Method and apparatus for interfacing between peripherals of multiple formats and a single system bus
KR20070020092A (en) Bus connection device
CN107643993B (en) Bus conversion interface, working method of bus conversion interface and communication equipment
EP0266790B1 (en) Serial bus interface capable of transferring data in different formats
CN102073611A (en) I2C bus control system and method
KR102098467B1 (en) Output signal automatic controller for RS-232 and RS-422 and RS-485 serial communication
CN113726498A (en) SPI-based dual-full-duplex communication method, host, slave and storage medium
CN109845194B (en) Host computing device, peripheral accessory and method for secure peripheral device communication
KR101767181B1 (en) Multipurpose PCIe Card and Method for Expanding Multipurpose PCIe Card
KR100602204B1 (en) Controll system have main controller and peripheral controller, metnod for bus connection
US5146584A (en) Keyboard interface system allowing a synchronous keyboard to communicate with a host processor asynchronously by manipulating the keyboard clock's state
EP0367284A2 (en) Reconfigurable output port
KR20060003139A (en) Method to control a increased modules of plc system using trigger signals and serial communication
US20210303496A1 (en) Actuation of data transmission lanes between states
KR100732716B1 (en) Computer and control method thereof
KR100451792B1 (en) PB bus interface logic with system of ISA bus
US20100250804A1 (en) Method for ic communication system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant