KR19990021022A - Device and method for automatic detection of communication speed in serial communication - Google Patents

Device and method for automatic detection of communication speed in serial communication Download PDF

Info

Publication number
KR19990021022A
KR19990021022A KR1019970044516A KR19970044516A KR19990021022A KR 19990021022 A KR19990021022 A KR 19990021022A KR 1019970044516 A KR1019970044516 A KR 1019970044516A KR 19970044516 A KR19970044516 A KR 19970044516A KR 19990021022 A KR19990021022 A KR 19990021022A
Authority
KR
South Korea
Prior art keywords
communication speed
communication
inactive
signal
inactivity
Prior art date
Application number
KR1019970044516A
Other languages
Korean (ko)
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 KR1019970044516A priority Critical patent/KR19990021022A/en
Publication of KR19990021022A publication Critical patent/KR19990021022A/en

Links

Landscapes

  • Communication Control (AREA)

Abstract

본 발명은 직렬(RS-232C) 통신에서 통신 속도 자동 검출 장치 및 방법에 관한 것으로, RS-232C로 통신하는 양 단말에서 데이터의 전송 속도를 시간에 따라 자동으로 검출하여 이에 적합한 통신 속도를 설정하여 효율적인 통신을 가능하게 하는 RS-232C 통신에서 통신 속도 자동 검출 장치 및 방법을 제공함에 그 목적이 있다.The present invention relates to an apparatus and method for automatically detecting a communication speed in serial (RS-232C) communication, and automatically detects a transmission speed of data according to time at both terminals communicating with RS-232C, and sets a suitable communication speed thereto. An object of the present invention is to provide an apparatus and method for automatically detecting a communication speed in RS-232C communication that enables efficient communication.

본 발명에 의한 RS-232C 통신에서 통신 속도 자동 검출 장치 및 방법에 따르면, 소프트웨어나 슬라이드 스위치 등을 이용하여 데이터 통신을 시작하기 전에 미리 퍼스널 컴퓨터와 응용 기기 간에 동일한 통신 속도를 설정하여야 하는 종래와 달리, 수신 신호를 통해 비활성 상태를 판단하고, 이후 수신되는 스타트 비트의 길이를 검출하여 자동으로 통신 속도를 결정함으로써, 가변적인 전송 데이터의 양에 따라 효율적으로 통신 속도를 변화시켜 효율적인 메모리 사용이 가능하게 되어 가격 경쟁력 및 직렬(RS-232C) 통신 사용자의 만족도를 향상시킬 수 있다.According to the apparatus and method for automatically detecting the communication speed in RS-232C communication according to the present invention, unlike the conventional method of setting the same communication speed between the personal computer and the application device before starting data communication using software or a slide switch, etc. By determining the inactive state through the received signal and automatically determining the communication speed by detecting the length of the start bit received thereafter, it is possible to efficiently change the communication speed according to the variable amount of transmission data to enable efficient memory use. It can improve the price competitiveness and the satisfaction of serial (RS-232C) communication users.

Description

직렬 통신에서 통신 속도 자동 검출 장치 및 방법Device and method for automatic detection of communication speed in serial communication

본 발명은 직렬 통신에서 통신 속도 자동 검출 장치 및 방법에 관한 것으로, RS-232C로 통신하는 양 단말에서 데이터의 전송 속도를 시간에 따라 자동으로 검출하여 이에 적합한 통신 속도를 설정하여 효율적인 통신을 가능하게 하는 직렬 통신에서 통신 속도 자동 검출 장치 및 방법을 제공함에 그 목적이 있다.The present invention relates to an apparatus and method for automatically detecting a communication speed in serial communication, and automatically detects a transmission speed of data according to time at both terminals communicating with RS-232C, and sets an appropriate communication speed to enable efficient communication. An object of the present invention is to provide an apparatus and method for automatically detecting a communication speed in serial communication.

퍼스널 컴퓨터의 수요가 폭발적으로 증가함에 따라, 각 퍼스널 컴퓨터 및 대형 컴퓨터간의 통신에 대한 요구가 확대되고 있다. 특히, 저렴한 자본과 외부 입출력 장치 접속의 용이성, 근거리 지역망(Local Area Network: LAN)으로의 진보성, 및 통신 속도와 데이터의 폭넓은 자유도 등의 장점 때문에, 퍼스널 컴퓨터 간의 통신을 통한 네트워크 구성이 자원의 공용과 신뢰성의 향상을 위해 흔히 사용되고 있다. 하지만, 상기 네트워크 구성을 위해서는 교환하는 데이터의 포맷 외에도 제어를 위한 정보와 하드웨어에 의존하는 타이밍 등에 대한 정보에 대하여 미리 설정하여야 하며, 이를 프로토콜이라 한다.As the demand for personal computers increases explosively, the demand for communication between each personal computer and a large computer is expanding. In particular, due to the advantages of low capital, easy access to external I / O devices, advancement to a local area network (LAN), and communication speed and wide degree of freedom of data, network configuration through communication between personal computers is difficult. It is commonly used to improve resource sharing and reliability. However, for the network configuration, in addition to the format of data to be exchanged, information about control information and timing information depending on hardware must be set in advance, which is called a protocol.

상기 프로토콜은 크게 직렬 통신 방식과 병렬 통신 방식으로 구분될 수 있다. 상기 직렬 통신 방식은 메인 버스에서 병렬로 인가되는 데이터를 단일 데이터 신호선을 이용하여 외부로 전송하고, 외부로부터 직렬로 입력되는 데이터를 메인 버스에 병렬로 인가하는 통신 방식으로서, RS-232C, RS-422, RS-423 및 X.21 등이 표준안으로 채택되어 사용되고 있다. 그리고, 상기 병렬 통신 방식은 복수개의 데이터 신호선을 사용하여 데이터를 전송하거나 입력받는 통신 방식으로서, 상기 직렬 통신 방식에 비해 데이터 신호선의 수에 비례하여 데이터 통신 속도가 증가하는 반면, 가격이 증가하는 단점을 가지고 있다.The protocol can be largely divided into a serial communication method and a parallel communication method. The serial communication method is a communication method for transmitting data applied in parallel from the main bus to the outside using a single data signal line, and applying data input in series from the outside to the main bus in parallel. RS-232C, RS- 422, RS-423 and X.21 have been adopted as standards. In addition, the parallel communication method is a communication method for transmitting or receiving data using a plurality of data signal lines, and the data communication speed increases in proportion to the number of data signal lines compared to the serial communication method, but the price increases. Have

한편, 상기 직렬 통신 방식은 데이터를 통신하는 양 단말에 필수적으로 요구되는 동기(synchronization)를 확보하는 방안에 따라 동기형 통신 방식과 비동기식 통신 방식으로 구분되는데, 전자는 양 단말간에 동기 신호를 상호 전달하는 방식이고, 후자는 데이터 전송시에 스타트 비트와 스톱 비트를 사용하는 방식이다.Meanwhile, the serial communication method is classified into a synchronous communication method and an asynchronous communication method according to a method of securing synchronization required for both terminals communicating data, and the former transfers a synchronization signal between both terminals. In the latter method, the start bit and the stop bit are used for data transmission.

이하에서는 현재 퍼스널 컴퓨터에서 가장 많이 사용되고 있는 비동기 직렬 통신 장치인 RS-232C 에 대해 도 1을 참조하여 설명하기로 한다.Hereinafter, RS-232C, which is an asynchronous serial communication device that is most commonly used in personal computers, will be described with reference to FIG. 1.

종래 기술에 의한 RS-232C 비동기 직렬 통신 장치는 도 1에 도시된 바와 같이, 컴퓨터 내부의 중앙 처리부(1)로부터 어드레스, 인에이블 신호, 입출력 명령 신호(RD/WR)를 입력받아 데이터의 입출력을 제어하기 위한 제어 신호를 출력하는 어드레스 복호부(2)와, 데이터 전송에 사용될 클럭을 발생시켜 출력하는 클럭 발생부(4)와, 상기 클럭 발생부(4)로부터 입력되는 클럭 신호를 이용하여 기 설정된 통신 속도에 적합한 클럭으로 변환시켜 출력하는 통신 속도 제어부(5)와, 상기 어드레스 복호부(2)로부터 제어 신호를 입력받고, 상기 통신 속도 제어부(5)로부터 클럭 신호를 입력받아 전송 및 수신 상태를 나타내는 제어 신호를 출력하고, 상기 중앙 처리부(1)로부터 병렬로 입력되는 데이터를 규정된 포맷에 적합하게 직렬로 변환하여 출력하는 병렬-직렬 변환부(6)와, 상기 병렬-직렬 변환부(6)로부터 전송 및 수신 상태 신호와 동기 제어 신호를 입력받아 상기 중앙 처리부(1)에 인터럽트를 출력하는 인터럽트/인에이블 제어부(3)와, 상기 병렬-직렬 변환부(6)로부터 입력되는 직렬 데이터를 외부 인터페이스에서 사용되는 신호 체계로 변환시키는 레벨 변환부(7)로 구성된다.The RS-232C asynchronous serial communication apparatus according to the prior art receives an address, an enable signal and an input / output command signal RD / WR from the central processing unit 1 inside the computer as shown in FIG. By using an address decoder 2 for outputting a control signal for controlling, a clock generator 4 for generating and outputting a clock to be used for data transmission, and a clock signal input from the clock generator 4 A communication speed control unit 5 converts and outputs a clock suitable for a set communication speed and a control signal from the address decoder 2, and receives a clock signal from the communication speed control unit 5 to transmit and receive a signal. A parallel-to-serial conversion unit for outputting a control signal indicating a and converting the data inputted in parallel from the central processing unit 1 into a serial format suitable for a prescribed format ( 6) an interrupt / enable control unit 3 which receives the transmission and reception status signals and the synchronization control signal from the parallel-serial conversion unit 6 and outputs an interrupt to the central processing unit 1, and the parallel- It is comprised by the level converter 7 which converts the serial data input from the serial converter 6 into the signal system used by an external interface.

이하에서는 비동기 직렬 통신 장치인 RS-232C의 동작에 대해 설명하기로 한다.Hereinafter, the operation of RS-232C, an asynchronous serial communication device, will be described.

상기 중앙 처리부(1)에서는 RS-232C 인터페이스를 제어함과 동시에 외부로 전송할 데이터를 데이터 버스를 통해 전달한다. 상기 병렬-직렬 변환부(6)에서는 상기 중앙 처리부(1)로부터 버스를 통해 데이터를 병렬로 입력받아 시리얼 통신을 위해 직렬의 데이터로 변환시키고, 도 2에 도시된 데이터 포맷에 따라 전송할 데이터 형태를 구성하게 된다. 상기와 같이 구성된 신호는 도 3에 도시된 바와 같이, '0' 혹은 '1'로 나타내는 디지털 신호로서 0 볼트(Volt) 혹은 5 볼트을 갖는 TTL 레벨의 신호이다. 상기 TTL 레벨의 신호를 입력받은 상기 레벨 변환부(7)에서는 케이블을 통해 전송하기 위해 TTL 레벨을 갖는 '0'과 '1'의 디지털 신호를 +V 볼트와 -V 볼트의 신호로 변화시킨다. 여기에서 V 볼트는 3 볼트 이상에서 15 볼트 이하의 레벨 내에 존재하는 값이다.The central processing unit 1 controls the RS-232C interface and transfers data to be transmitted to the outside via a data bus. The parallel-to-serial converter 6 receives data in parallel from the central processing unit 1 via a bus and converts the data into serial data for serial communication, and transmits data according to the data format shown in FIG. 2. Will be constructed. The signal configured as described above is a digital signal represented by '0' or '1' as shown in FIG. 3 and is a TTL level signal having 0 Volts or 5 Volts. The level converter 7 receiving the TTL level signal converts a digital signal of '0' and '1' having a TTL level into a signal of + V volts and -V volts for transmission via a cable. Here, V volt is a value existing within a level of 3 volts or more and 15 volts or less.

하지만, 상기와 같이 구성된 종래 기술에 의한 비동기 직렬 통신 장치에서는 소프트웨어나 슬라이드(slide) 스위치를 이용하여 데이터 통신을 시작하기 전에 미리 퍼스널 컴퓨터와 응용 기기 간에 동일한 통신 속도를 설정하여야 한다. 그리고, 전송할 데이터의 양은 시간에 따라 가변하는 것이 일반적인 현상이므로, 상기와 같이 통신 속도를 미리 설정하는 방법은 과다한 메모리를 사용하여야 하며, 시간에 따라 능동적으로 동작하지 못하기 때문에 효율적인 통신을 위해서는 바람직하지 않다.However, in the conventional asynchronous serial communication apparatus configured as described above, the same communication speed must be set between the personal computer and the application device before starting data communication using software or a slide switch. In addition, since the amount of data to be transmitted varies with time, a method of presetting a communication speed as described above should use excessive memory and is not preferable for efficient communication because it does not actively operate over time. not.

따라서, 본 발명의 목적은 이와 같은 문제를 해결하기 위해 안출된 것으로, RS-232C로 통신하는 양 단말에서 데이터의 전송 속도를 시간에 따라 자동으로 검출하여 이에 적합한 통신 속도를 설정하여 효율적인 통신을 가능하게 하는 직렬 통신에서 통신 속도 자동 검출 장치 및 방법을 제공함에 있다.Accordingly, an object of the present invention is to solve such a problem, it is possible to efficiently communicate by detecting the transmission speed of the data in time to both terminals to communicate with RS-232C by setting the appropriate communication speed accordingly The present invention provides an apparatus and method for automatically detecting a communication speed in serial communication.

도 1은 종래 기술에 의한 직렬 데이터 변환 장치의 구조도,1 is a structural diagram of a serial data conversion device according to the prior art,

도 2는 본 발명에 따른 RS-232C 통신에서 자동 통신 속도 검출 장치의 블럭 구조도,2 is a block diagram of an automatic communication speed detection apparatus in RS-232C communication according to the present invention;

도 3은 RS-232C 통신의 데이터 포맷,3 is a data format of RS-232C communication;

도 4는 본 발명에 따른 비활성 검출부의 동작을 나타내는 흐름도,4 is a flowchart illustrating an operation of an inactivity detection unit according to the present invention;

도 5는 본 발명에 따른 통신 속도 판단부의 동작을 나타내는 흐름도이다.5 is a flowchart illustrating an operation of a communication speed determining unit according to the present invention.

<도면의 주요부분에 대한 부호의 설명><Description of the code | symbol about the principal part of drawing>

1: 중앙제어부 2: 어드레스 복호부1: central control unit 2: address decoding unit

3: 인터럽트/인에이블 제어부 4: 클럭 발생부3: Interrupt / Enable Controller 4: Clock Generator

5: 통신 속도 제어 6: 병렬-직렬 변환부5: communication speed control 6: parallel-serial converter

7: 레벨 변환부 10: 비활성 검출부7: level converting unit 10: inactivity detecting unit

11: 비활성 시작 판단부 12: 비활성 카운터부11: inactive start determining unit 12: inactive counter

13: 카운터 비교부 20: 통신 속도 판단부13: counter comparing unit 20: communication speed determining unit

21: 스타트 신호 판단부 22: 스타트 카운터부21: Start signal determination section 22: Start counter section

23: 통신 속도 검출부 30: 통신 속도 설정부23: communication speed detection unit 30: communication speed setting unit

이와 같은 목적을 달성하기 위한 본 발명의 따른 직렬 통신에서 통신 속도 자동 검출 장치 및 방법은 양 단말의 통신 속도를 미리 동일하게 설정하는 종래와 달리, 수신 신호를 통해 비활성 상태를 판단하고, 이후 수신되는 스타트 비트의 길이를 검출함으로써 자동으로 통신 속도를 결정할 수 있는 것을 특징으로 한다.Apparatus and method for automatically detecting a communication speed in serial communication according to the present invention for achieving the above object is different from the conventional method of setting the communication speed of the same terminal in advance, through the received signal to determine the inactive state, and then received The communication speed can be automatically determined by detecting the length of the start bit.

본 발명의 따른 직렬 통신에서 통신 속도 자동 검출 장치는 도 2에 도시된 바와 같이, 외부로부터 수신되는 데이터를 입력받아 비활성 상태를 검출하여 활성/비활성 신호를 발생하는 비활성 검출부(10)와, 상기 비활성 검출부(10)로부터 활성/비활성 신호에 의해 인에이블 되고, 외부로부터 수신되는 데이터의 스타트 비트의 길이를 측정하여 통신 속도를 출력하는 통신 속도 판단부(20)와, 상기 통신 속도 판단부(20)로부터 입력되는 통신 속도를 이용하여 설정 값을 변화시켜 이 통신 속도와 동일한 클럭을 발생하는 통신 속도 설정부(30)로 구성된다.In the serial communication according to the present invention, as shown in FIG. 2, the automatic communication speed detecting apparatus includes an inactivity detecting unit 10 that detects an inactive state by receiving data received from the outside and generates an active / inactive signal, and the inactive. A communication speed determining unit 20 enabled by an active / inactive signal from the detector 10 and measuring a length of a start bit of data received from the outside to output a communication speed, and the communication speed determining unit 20 And a communication speed setting section 30 for changing a setting value using a communication speed input from the same and generating a clock equal to this communication speed.

상기 비활성 검출부(10)는 외부로부터 수신 데이터를 입력받아 비활성 상태임을 나타내는 '1' 레벨을 검출하는 비활성 시작 판단부(11)와, 상기 비활성 시작 판단부(11)에서 비활성의 시작을 나타내는 출력 신호에 의해 인에이블 되고, 도 1의 클럭 발생부(4)에서 출력되는 클럭을 이용하여 카운팅을 수행하는 비활성 카운터부(12)와, 상기 비활성 카운터부(12)로부터 출력되는 카운트된 값이 내장된 값과 동일하게 되는 시점에서 비활성 상태임을 나타내는 신호를 출력하는 카운터 비교부(13)로 구성된다.The inactivity detection unit 10 receives an incoming data from the outside and detects a '1' level indicating a state of inactivity, and the inactivity start determination unit 11 output signal indicating the start of inactivity. It is enabled by the, and the counting value output from the inactive counter 12 and the inactive counter 12 for performing the counting using the clock output from the clock generator 4 of FIG. And a counter comparator 13 for outputting a signal indicating an inactive state at the same time as the value.

상기 통신 속도 판단부(20)는 상기 비활성 검출부(10)로부터 출력되는 비활성 상태임을 나타내는 신호를 입력받아 인에이블 되고 외부로부터 수신되는 데이터를 입력받아 스타트 신호의 시작을 나타내는 신호를 발생하는 스타트 신호 판단부(21)와, 상기 스타트 신호 판단부(21)로부터 인가되는 신호에 의해 인에이블 되고, 상기 클럭 발생부(4)의 클럭을 이용하여 카운팅하는 스타트 카운터부(22)와, 상기 스타트 카운터부(22)로부터 출력되는 카운팅 값을 이용하여 통신 속도를 검출하여 상기 통신 속도 설정부(30)로 출력하는 통신 속도 검출부(23)로 구성된다.The communication speed determination unit 20 receives a signal indicating that the state of inactivity is output from the inactivity detection unit 10 and determines a start signal for generating a signal indicating the start of a start signal by receiving data received from the outside. A start counter 22 that is enabled by the unit 21, a signal applied from the start signal determiner 21, and counts using a clock of the clock generator 4, and the start counter unit And a communication speed detection unit 23 for detecting a communication speed using the counting value output from the 22 and outputting the communication speed to the communication speed setting unit 30.

이하, 상기와 같이 구성된 본 발명에 따른 RS-232C 통신에서 통신 속도 자동 검출 장치의 동작을 도 2 ∼ 도 5를 참조하여 상세하게 설명하기로 한다.Hereinafter, the operation of the automatic communication speed detection apparatus in RS-232C communication according to the present invention configured as described above will be described in detail with reference to FIGS.

RS-232C 통신에서 데이터의 포맷은 도 3에 도시된 바와 같이, 하나의 데이터 전송 단위의 시작을 나타내는 스타트 비트(start bit; 40)와, 전송할 데이터 비트(50)와, 전송 데이터의 오류를 검출하기 위한 패리티 비트(parity bit; 60)와, 하나의 데이터 전송 단위의 완료를 나타내는 스톱 비트(stop bit; 70)로 구성된다.In the RS-232C communication, the format of data includes a start bit 40 indicating the start of one data transmission unit, a data bit 50 to be transmitted, and an error in transmission data, as shown in FIG. 3. Parity bit (parity bit) (60) and a stop bit (70) indicating the completion of one data transmission unit.

우선, 상기 스타트 비트(40)는 비활성 상태가 완료된 후 데이터를 전송할 때 하나의 데이터 전송 단위의 시작을 나타내는 정보로서, '1' 레벨을 가지는 비활성 상태와 구분하기 위해 '0' 레벨을 가진다. 이어서, 전송할 데이터는 흔히 8 비트씩 묶어 하나의 단위로 전송하는데, 본 발명에서는 상기 스타트 비트(40)와 구분하기 위해 8개의 데이터 비트 중 첫 번째 비트가 '1' 레벨을 갖게 되는 데이터로 변화시키는 데이터 스타트 부호를 이용한다. 그리고, 상기 패리티 비트(60)는 8 비트로 구성된 데이터 비트(50)와 합쳐져 '1' 레벨이 홀수 또는 짝수가 되도록 함으로써 수신된 데이터 오류 검출을 위해 사용된다. 마지막으로 사용되는 상기 스톱 비트(70)는 1 비트 혹은 2 비트로 구성되고, 하나의 데이터 전송 단위의 완료를 나타내며, '1' 레벨을 갖는다.First, the start bit 40 is information indicating the start of one data transmission unit when data is transmitted after the inactive state is completed, and has a '0' level to distinguish it from an inactive state having a '1' level. Subsequently, data to be transmitted is often transmitted in units of 8 bits, and in the present invention, in order to distinguish the start bit 40 from the first bit, the first bit of the 8 data bits is changed to data having a '1' level. Use the data start code. The parity bit 60 is combined with the data bit 50 consisting of 8 bits so that the '1' level is odd or even, thereby being used for received data error detection. Finally, the stop bit 70 used is composed of 1 bit or 2 bits, indicating completion of one data transmission unit, and having a '1' level.

상기 비활성 시작 판단부(11)에서는 상기와 같이 구성된 데이터 포맷으로 수신되는 데이터를 입력받아 비활성 상태를 나타내는 '1' 레벨이 시작되는 지를 확인하고, 상기 비활성 카운터부(12)에서는 비활성 시작 판단부(11)에서 검출한 '1' 레벨에 의해 인에이블 되어 카운팅을 시작한다. 이어서 상기 카운터 비교부(13)에서 이 카운팅된 값을 입력받아 비활성 상태를 나타내는 일정 시간과 비교하여 '1' 레벨이 비활성 상태에 의한 것인지 임의의 데이터의 의한 것인 지를 결정하여 비활성 상태를 판단한다. 여기에서, 비활성 상태를 나타내는 일정 시간은 RS-232C에서 지원하는 최저의 통신 속도로 하나의 데이터 전송 단위를 전송하는 데 소요되는 시간으로 설정할 수 있으며, 외부로부터 입력되는 클럭에 의해 변화될 수 있는 값이다.The inactivity start determination unit 11 receives the data received in the data format configured as described above and checks whether a '1' level indicating an inactivity state is started. In the inactivity counter determination unit 12, the inactivity start determination unit ( It is enabled by '1' level detected in 11) and starts counting. Subsequently, the counter comparator 13 receives the counted value and compares the counted value with a predetermined time indicating an inactive state to determine whether the '1' level is due to an inactive state or an arbitrary data to determine an inactive state. . Here, the predetermined time indicating the inactive state may be set to the time required to transmit one data transmission unit at the lowest communication speed supported by RS-232C, and may be changed by a clock input from an external source. to be.

데이터 포맷에 의해 비활성 상태 후에 입력되는 신호는 상기 스타트 신호(40)이므로, 상기 스타트 신호 판단부(21)에서는 상기 비활성 검출부(10)에서 출력되는 신호에 의해 인에이블 되고, 상기 수신된 신호의 '0' 레벨을 감지하여 스타트 신호를 검출한다. 그리고, 상기 스타트 카운터부(22)에서는 스타트 비트가 시작되는 시점부터 카운팅을 시작하고, 스타트 비트가 완료되는 시점에서 카운팅을 멈추어 카운팅 값을 상기 통신 속도 검출부(23)로 출력한다. 카운팅 값을 입력받은 통신 속도 검출부(23)에서는 이 카운팅 값에 해당되는 통신 속도를 검출하여 상기 통신 속도 설정부(30)로 출력하게 된다.Since the signal input after the inactive state by the data format is the start signal 40, the start signal determination unit 21 is enabled by the signal output from the inactivity detection unit 10, and ' The start signal is detected by detecting the 0 'level. The start counter unit 22 starts counting from the start point of the start bit, stops counting when the start bit is completed, and outputs a counting value to the communication speed detector 23. The communication speed detector 23 receiving the counting value detects a communication speed corresponding to the counting value and outputs the communication speed to the communication speed setting unit 30.

본 발명의 따른 RS-232C 통신에서 통신 속도 자동 검출 장치의 동작은 도 4 및 도 5의 흐름도에서 체계적으로 도시되어 있다.The operation of the automatic communication speed detecting apparatus in RS-232C communication according to the present invention is shown systematically in the flowcharts of FIGS. 4 and 5.

이하, 본 발명에 따른 RS-232C 통신에서 통신 속도 자동 검출 방법을 설명하면 다음과 같다.Hereinafter, a method of automatically detecting a communication speed in RS-232C communication according to the present invention will be described.

본 발명의 따른 RS-232C 통신에서 통신 속도 자동 검출 방법은 외부로부터 수신되는 데이터를 입력받아 비활성 상태를 검출하여 활성 및 비활성 신호를 발생하는 비활성 검출 단계와, 상기 비활성 검출 단계로부터 활성 및 비활성 신호에 의해 인에이블 되고, 외부로부터 수신되는 데이터의 스타트 비트의 길이를 측정하여 통신 속도를 출력하는 통신 속도 판단 단계와, 상기 통신 속도 판단 단계로부터 입력되는 통신 속도를 이용하여 설정 값을 변화시켜 이와 동일한 클럭을 발생하는 통신 속도 설정 단계로 구성된다.In the RS-232C communication according to the present invention, the automatic communication speed detection method includes an inactive detection step of detecting an inactive state by receiving data received from the outside and generating an active and inactive signal, and from the inactive detection step to an active and inactive signal. Enabled by the communication speed determination step of outputting the communication speed by measuring the length of the start bit of the data received from the outside, and by changing the setting value using the communication speed input from the communication speed determination step, the same clock It consists of a communication speed setting step of generating.

상기 비활성 검출 단계는 외부로부터 수신 데이터를 입력받아 비활성 상태임을 나타내는 '1' 레벨을 검출하는 비활성 시작 판단 단계와, 상기 비활성 시작 판단 단계에서 비활성의 시작을 나타내는 출력 신호에 의해 인에이블되고, 외부로부터 입력되는 클럭을 이용하여 카운팅을 수행하는 비활성 카운팅 단계와, 상기 비활성 카운팅 단계로부터 출력되는 카운팅 값이 내장된 값과 동일하게 되는 시점에서 비활성 상태임을 나타내는 신호를 출력하는 카운터 비교 단계로 구성된다.The inactivity detection step is enabled by an inactivity start determination step of detecting a '1' level indicating that an inactive state is received by receiving data received from the outside, and enabled by an output signal indicating the start of inactivity in the inactivity start determination step. An inactive counting step of performing counting using an input clock, and a counter comparison step of outputting a signal indicating that the inactive state when the counting value output from the inactive counting step becomes equal to the embedded value.

상기 통신 속도 판단 단계는 상기 비활성 검출 단계로부터 출력되는 비활성 상태임을 나타내는 신호를 입력받아 인에이블되고 외부로부터 수신되는 데이터를 입력받아 스타트 신호의 시작을 나타내는 신호를 발생하는 스타트 신호 판단 단계와, 상기 스타트 신호 판단 단계로부터 인가되는 신호에 의해 인에이블되고, 외부로부터 입력되는 클럭을 이용하여 카운팅하는 스타트 카운팅 단계와, 상기 스타트 카운팅 단계로부터 출력되는 카운팅 값을 이용하여 통신 속도를 검출하여 상기 통신 속도 설정 단계로 출력하는 통신 속도 검출 단계로 구성된다.The communication speed determining step may include: a start signal determining step of receiving a signal indicating an inactive state output from the inactive detection step and receiving data received from an external source and generating a signal indicating the start of a start signal; The communication speed setting step is performed by detecting a communication speed using a counting value which is enabled by a signal applied from a signal determination step and counts using a clock input from an external source, and a counting value output from the start counting step. It consists of a communication speed detection step to output.

이하, 상기와 같이 구성된 본 발명에 따른 RS-232C 통신에서 통신 속도 자동 검출 방법의 절차를 도 3 ∼ 도 5를 참고하여 상세히 설명하면 다음과 같다.Hereinafter, a procedure of an automatic communication speed detection method in RS-232C communication according to the present invention configured as described above will be described in detail with reference to FIGS. 3 to 5.

상기 비활성 시작 판단 단계에서는 상기와 같이 구성된 데이터 포맷으로 수신되는 데이터를 입력받아 비활성 상태를 나타내는 '1' 레벨이 시작되는 지를 확인하고, 상기 비활성 카운팅 단계에서는 비활성 시작 판단 단계에서 검출한 '1' 레벨에 의해 인에이블되어 카운팅을 수행한다. 이어서, 상기 카운터 비교 단계에서 이 카운팅된 값을 입력받아 비활성 상태를 나타내는 일정 값과 비교하여 '1' 레벨이 비활성 상태에 의한 것인지를 결정하여 비활성 상태를 판단한다. 여기에서, 비활성 상태를 나타내는 일정 값은 전술한 바와 동일하다.The inactivity start determination step receives the data received in the data format configured as described above and checks whether a '1' level indicating an inactive state is started; in the inactivity counting step, a '1' level detected in the inactivity start determination step Enabled by to perform counting. Subsequently, the counter comparison step receives the counted value and compares the counted value with a predetermined value indicating the inactive state to determine whether the '1' level is due to the inactive state. Here, the constant value indicating the inactive state is the same as described above.

데이터 포맷에 의해 비활성 상태 후에 입력되는 신호는 상기 스타트 신호(40)이므로, 상기 스타트 신호 판단 단계에서는 상기 비활성 검출 단계에서 출력되는 신호에 의해 인에이블 되고, 상기 수신된 신호의 '0' 레벨을 감지하여 스타트 신호를 검출한다. 그리고, 상기 스타트 카운팅 단계에서는 상기 스타트 비트(40)가 시작되는 시점부터 카운팅을 시작하고, 상기 스타트 비트(40)가 완료되는 시점에서 카운팅을 멈추어 카운팅 값을 상기 통신 속도 검출 단계로 출력한다. 카운팅 값을 입력받은 통신 속도 검출 단계에서는 이 카운팅 값에 해당되는 통신 속도를 검출하여 상기 통신 속도 설정 단계로 출력하게 된다.Since the signal input after the inactive state by the data format is the start signal 40, the start signal determination step is enabled by the signal output in the inactive detection step, and detects the '0' level of the received signal. To detect the start signal. In the start counting step, counting starts from a time point at which the start bit 40 starts, counting stops at a time point when the start bit 40 is completed, and outputs a counting value to the communication speed detection step. In the communication speed detecting step of receiving the counting value, a communication speed corresponding to the counting value is detected and outputted to the communication speed setting step.

이상에서 설명한 본 발명에 의한 직렬(RS-232C) 통신에서 통신 속도 자동 검출 장치 및 방법에 따르면, 직렬(RS-232C)로 통신하는 양 단말에서 데이터의 통신 속도를 자동으로 검출하여 이에 적합한 통신 속도를 설정함으로써, 소프트웨어나 슬라이드 스위치 등을 이용하여 데이터 통신을 시작하기 전에 미리 퍼스널 컴퓨터와 응용 기기 간에 동일한 통신 속도를 설정하여야 불편함을 해결하고, 가변적인 전송 데이터의 양에 따라 효율적으로 통신 속도를 변화시킬 수 있어 효율적인 메모리 사용이 가능하게 되어 가격 경쟁력 및 RS-232C 통신 사용자의 만족도를 향상시킬 수 있다.According to the apparatus and method for automatically detecting the communication speed in serial (RS-232C) communication according to the present invention described above, the communication speed of the data is automatically detected by both terminals communicating in the serial (RS-232C) and suitable for this. In order to solve the inconvenience, it is necessary to set the same communication speed between the personal computer and the application device before starting data communication using software or slide switch. It can be changed, enabling efficient memory usage, improving price competitiveness and user satisfaction of RS-232C communication.

Claims (7)

직렬 통신에서 통신 속도를 자동으로 검출하는 장치에 있어서,An apparatus for automatically detecting a communication speed in serial communication, 외부로부터 수신되는 데이터를 입력받아 비활성 상태를 검출하여 활성/비활성 신호를 발생하는 비활성 검출부와;An inactivity detector configured to receive data received from the outside and detect an inactive state to generate an active / inactive signal; 상기 비활성 검출부로부터 활성/비활성 신호에 의해 인에이블 되고, 외부로부터 수신되는 데이터의 스타트 비트의 길이를 측정하여 통신 속도를 출력하는 통신 속도 판단부와;A communication speed determining unit which is enabled by an active / inactive signal from the inactive detection unit and measures a length of a start bit of data received from the outside to output a communication speed; 상기 통신 속도 판단부로부터 입력되는 통신 속도를 이용하여 설정 값을 변화시켜 이 통신 속도와 동일한 클럭을 발생하는 통신 속도 설정부로 구성되는 것을 특징으로 하는 직렬 통신에서 통신 속도 자동 검출 장치.And a communication speed setting unit for changing a setting value using a communication speed input from the communication speed determining unit to generate a clock equal to the communication speed. 제 1 항에 있어서, 상기 비활성 검출부는The method of claim 1, wherein the inactivity detection unit 외부로부터 수신 데이터를 입력받아 비활성 상태임을 나타내는 '1' 레벨을 검출하는 비활성 시작 판단부와;An inactivity start determination unit which receives the received data from the outside and detects a '1' level indicating an inactivity state; 상기 비활성 시작 판단부에서 비활성의 시작을 나타내는 출력 신호에 의해 인에이블 되고, 상기 클럭 발생부에서 출력되는 클럭을 이용하여 카운팅을 수행하는 비활성 카운터부와;An inactivity counter unit enabled by the output signal indicating the start of inactivity in the inactivity start determination unit, and performing counting using a clock output from the clock generator; 상기 비활성 카운터부로부터 출력되는 카운트된 값이 내장된 값과 동일하게 되는 시점에서 비활성 상태임을 나타내는 신호를 출력하는 카운터 비교부로 구성되는 것을 특징으로 하는 직렬 통신에서 통신 속도 자동 검출 장치.And a counter comparator for outputting a signal indicating that the signal is inactive when the counted value output from the inactive counter becomes equal to the embedded value. 제 1 항에 있어서, 상기 통신 속도 판단부는The method of claim 1, wherein the communication speed determination unit 상기 비활성 검출부로부터 출력되는 비활성 상태임을 나타내는 신호를 입력받아 인에이블 되고 외부로부터 수신되는 데이터를 입력받아 스타트 신호의 시작을 나타내는 신호를 발생하는 스타트 신호 판단부와;A start signal determination unit configured to receive a signal indicating an inactive state output from the inactivity detection unit and to receive data received from an external source and to generate a signal indicating the start of a start signal; 상기 스타트 신호 판단부로부터 인가되는 신호에 의해 인에이블 되고, 상기 클럭 발생부의 클럭을 이용하여 카운팅하는 스타트 카운터부와;A start counter unit enabled by a signal applied from the start signal determination unit and counting using a clock of the clock generation unit; 상기 스타트 카운터부로부터 출력되는 카운팅 값을 이용하여 통신 속도를 검출하여 상기 통신 속도 설정부로 출력하는 통신 속도 검출부로 구성되는 것을 특징으로 하는 직렬 통신에서 통신 속도 자동 검출 장치.And a communication speed detecting unit for detecting a communication speed by using a counting value output from the start counter unit and outputting the communication speed to the communication speed setting unit. RS-232C 통신에서 통신 속도를 자동으로 검출하는 장치에 있어서,An apparatus for automatically detecting a communication speed in RS-232C communication, 전송할 데이터 비트 중 첫번째 비트를 상기 스타트 비트의 레벨과 구별되게 부호화하는 데이터 스타트 부호화 장치를 사용하는 것을 특징으로 하는 직렬 통신에서 통신 속도 자동 검출 장치.And a data start encoding device for encoding the first bit of the data bits to be distinguished from the level of the start bit. 직렬 통신에서 통신 속도를 자동으로 검출하는 방법에 있어서,In the method of automatically detecting the communication speed in serial communication, 외부로부터 수신되는 데이터를 입력받아 비활성 상태를 검출하여 활성 및 비활성 신호를 발생하는 비활성 검출 단계와;An inactivity detection step of detecting an inactive state by receiving data received from the outside and generating active and inactive signals; 상기 비활성 검출 단계로부터 활성 및 비활성 신호에 의해 인에이블 되고, 외부로부터 수신되는 데이터의 스타트 비트의 길이를 측정하여 통신 속도를 출력하는 통신 속도 판단 단계와;A communication speed determination step enabled by the inactivation and inactivation signals from the inactivity detection step, and measuring a length of a start bit of data received from the outside to output a communication speed; 상기 통신 속도 판단 단계로부터 입력되는 통신 속도를 이용하여 설정 값을 변화시켜 이와 동일한 클럭을 발생하는 통신 속도 설정 단계로 구성되는 것을 특징으로 하는 직렬 통신에서 통신 속도 자동 검출 방법.And a communication speed setting step of generating a same clock by changing a setting value using the communication speed input from the communication speed determining step. 제 6 항에 있어서, 상기 비활성 검출 단계는The method of claim 6, wherein the inactive detection step 외부로부터 수신 데이터를 입력받아 비활성 상태를 나타내는 레벨을 검출하는 비활성 시작 판단 단계와;An inactivity start determination step of receiving the received data from the outside and detecting a level indicating an inactivity state; 상기 비활성 시작 판단 단계에서 비활성의 시작을 나타내는 출력 신호에 의해 인에이블 되고, 외부로부터 입력되는 클럭을 이용하여 카운팅을 수행하는 비활성 카운팅 단계와;An inactive counting step that is enabled by an output signal indicating the start of the inactive in the inactive start determination step and performs counting using a clock input from the outside; 상기 비활성 카운팅 단계로부터 출력되는 카운팅 값이 내장된 값과 동일하게 되는 시점에서 비활성 상태임을 나타내는 신호를 출력하는 카운터 비교 단계로 구성되는 것을 특징으로 하는 직렬 통신에서 통신 속도 자동 검출 방법.And a counter comparing step of outputting a signal indicating that the counting value output from the inactive counting step is inactive when the counting value outputted from the inactive counting step becomes equal to a built-in value. 제 5 항에 있어서, 상기 통신 속도 판단 단계는The method of claim 5, wherein the determining of the communication speed 상기 비활성 검출 단계로부터 출력되는 비활성 상태임을 나타내는 신호를 입력받아 인에이블 되고 외부로부터 수신되는 데이터를 입력받아 스타트 신호의 시작을 나타내는 신호를 발생하는 스타트 신호 판단 단계와;A start signal determination step of receiving a signal indicating an inactive state output from the inactivity detection step and receiving data received from the outside and generating a signal indicating the start of a start signal; 상기 스타트 신호 판단 단계로부터 인가되는 신호에 의해 인에이블 되고, 외부로부터 입력되는 클럭을 이용하여 카운팅하는 스타트 카운팅 단계와;A start counting step enabled by a signal applied from the start signal determining step and counting using a clock input from an external device; 상기 스타트 카운팅 단계로부터 출력되는 카운팅 값을 이용하여 통신 속도를 검출하여 상기 통신 속도 설정 단계로 출력하는 통신 속도 검출 단계로 구성되는 것을 특징으로 하는 직렬 통신에서 통신 속도 자동 검출 방법.And a communication speed detecting step of detecting a communication speed using the counting value output from the start counting step and outputting the communication speed setting step.
KR1019970044516A 1997-08-30 1997-08-30 Device and method for automatic detection of communication speed in serial communication KR19990021022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970044516A KR19990021022A (en) 1997-08-30 1997-08-30 Device and method for automatic detection of communication speed in serial communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970044516A KR19990021022A (en) 1997-08-30 1997-08-30 Device and method for automatic detection of communication speed in serial communication

Publications (1)

Publication Number Publication Date
KR19990021022A true KR19990021022A (en) 1999-03-25

Family

ID=66037548

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970044516A KR19990021022A (en) 1997-08-30 1997-08-30 Device and method for automatic detection of communication speed in serial communication

Country Status (1)

Country Link
KR (1) KR19990021022A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100447165B1 (en) * 2001-06-26 2004-09-04 엘지전자 주식회사 detecting method of communication speed in device through receiver signal detection
KR100747365B1 (en) * 2000-05-19 2007-08-07 후지쯔 가부시끼가이샤 Transmission rate changes in communications networks

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100747365B1 (en) * 2000-05-19 2007-08-07 후지쯔 가부시끼가이샤 Transmission rate changes in communications networks
KR100447165B1 (en) * 2001-06-26 2004-09-04 엘지전자 주식회사 detecting method of communication speed in device through receiver signal detection

Similar Documents

Publication Publication Date Title
US5297142A (en) Data transfer method and apparatus for communication between a peripheral and a master
US4761800A (en) Method and apparatus for detecting a rate of data transmission
US5237570A (en) Prioritized data transfer method and apparatus for a radiotelephone peripheral
JP2641999B2 (en) Data format detection circuit
EP1070410B1 (en) Automatic speed detection for asynchronous serial communications
US7453833B2 (en) Hybrid-type data transmission apparatus and method suitable for high-performance wireless LAN
US7321615B2 (en) At-command analyzing method
US6529548B1 (en) Device and method for detecting data communication property
JP4160068B2 (en) Digital programming interface between baseband processor and radio frequency integrated module
KR19990021022A (en) Device and method for automatic detection of communication speed in serial communication
JP3144360B2 (en) Transmission rate switching TAP device
EP0232315A1 (en) Asynchronous addressable electronic key telephone system
CN111490919A (en) Master-slave machine system, equipment terminal and communication verification method thereof
JPH07264263A (en) Serial communication interface device
US5394438A (en) Data transmitting method
US6708277B1 (en) Method and system for parallel bus stepping using dynamic signal grouping
GB2324688A (en) A modem in which bit rate is determined using the width of a start bit
KR100199959B1 (en) Method and apparatus for ghecking parity in cdma system
EP0405041B1 (en) Terminal adapter having a multiple HDLC communication channels receiver for processing control network management frames
US5357610A (en) Method for parallel data transmission using a serial data transmission device
KR0160356B1 (en) Interface apparatus between general purpose measuring instrument and processing system
KR0167910B1 (en) Remote data service unit controlling apparatus
KR100217738B1 (en) Computer communication speed improving method of keyphone
KR100195645B1 (en) Method for detecting the code-data in remote controller signal
JPH0630506B2 (en) Serial communication device

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application