KR20020025517A - A method of using common serial port for computer - Google Patents

A method of using common serial port for computer Download PDF

Info

Publication number
KR20020025517A
KR20020025517A KR1020000057399A KR20000057399A KR20020025517A KR 20020025517 A KR20020025517 A KR 20020025517A KR 1020000057399 A KR1020000057399 A KR 1020000057399A KR 20000057399 A KR20000057399 A KR 20000057399A KR 20020025517 A KR20020025517 A KR 20020025517A
Authority
KR
South Korea
Prior art keywords
serial port
computer
serial
timer
program
Prior art date
Application number
KR1020000057399A
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 KR1020000057399A priority Critical patent/KR20020025517A/en
Publication of KR20020025517A publication Critical patent/KR20020025517A/en

Links

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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link
    • 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/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • G06F13/26Handling requests for interconnection or transfer for access to input/output bus using interrupt with priority control

Abstract

PURPOSE: A method for sharing a computer serial port is provided to share the serial port by using a server unit of each computer and judging the serial port is an idle state during a setting time of a timer. CONSTITUTION: A corresponding program requests the seizing and use of serial ports to a computer control unit for transmitting serial data(S100). The computer control unit judges whether serial ports are an idle state or the specific program is a seizing state(S110). If the serial ports are seized and used, the computer control unit counts a certain time set in a timer of a server unit(S120). The computer control unit judges whether the serial ports are the idle state or a seized state by the program(S130). If the serial ports are the idle state and the seized state by the specific program, the computer control unit admits that the corresponding program seizes the serial ports(S150). The program receives the admission of the seizing of the serial ports and transmits the serial data through the serial ports(S160).

Description

컴퓨터 직렬포트의 공유 방법{A METHOD OF USING COMMON SERIAL PORT FOR COMPUTER}How to share computer serial port {A METHOD OF USING COMMON SERIAL PORT FOR COMPUTER}

본 발명 기술은 컴퓨터의 제한된 직렬포트를 다수의 프로그램이 공유하기에 적합하도록 하는 직렬포트 공유 방법에 관한 것으로, 특히, 클라이언트인 다수 프로그램이 직렬포트 서버(Server)를 공유할 수 있도록 하는 것에 관한 것이다.The present invention relates to a serial port sharing method that allows a limited serial port of a computer to be suitable for sharing by multiple programs, and more particularly, to allow multiple programs that are clients to share a serial port server. .

일반적인 개인용 컴퓨터(PC: Personal Computer)는 직렬포트(Serial Port)로써, Com1(Com3), Com2(Com4)의 이름으로 2개가 주어지고, 통상 하나의 직렬포트를이용하여 마우스(Mouse) 기타 제어기 등과 연결하고, 다른 하나의 직렬포트를 이용하여 다른 컴퓨터와 데이터통신을 할 수 있게 된다.A personal computer (PC) is a serial port. Two PCs are given as Com1 (Com3) and Com2 (Com4). In general, a single serial port is used to control a mouse and other controllers. You will be able to connect and communicate with other computers using one serial port.

상기와 같은 직렬포트(Serial Port)를 이용하여 컴퓨터 사이에 데이터를 송수신하는 경우, 상기 직렬포트는 한번에 하나의 데이터를 전송할 수 있으므로, 컴퓨터에서 수행되는 다수의 프로그램이 동시에 상기 하나의 직렬포트를 구동할 수 없는 문제가 있었다.When transmitting and receiving data between computers using the serial port as described above, since the serial port can transmit one data at a time, a plurality of programs executed in the computer simultaneously drive the one serial port. There was a problem that could not be done.

이하, 종래 기술에 의한 컴퓨터의 직렬포트 사용 방법을 첨부된 도면을 이용하여 설명한다.Hereinafter, a method of using a serial port of a computer according to the prior art will be described with reference to the accompanying drawings.

종래 기술을 설명하기 위하여 첨부된 것으로, 도1 은 종래 기술에 의한 직렬포트 공유의 컴퓨터 기능 블록도 이고, 도2 는 종래 기술에 의한 컴퓨터 직렬포트 공유 순서도 이다.Attached to explain the prior art, FIG. 1 is a block diagram of a computer function of serial port sharing according to the prior art, and FIG. 2 is a flowchart of a computer serial port sharing according to the prior art.

상기 첨부된 도1을 참조하면, 종래 기술에 의한 직렬포트 공유의 제1 컴퓨터(20)는, 각각 수행하는 목적이 서로 상이한 다수의 프로그램(11,12,13)과,Referring to FIG. 1, the first computer 20 of serial port sharing according to the prior art includes a plurality of programs 11, 12, and 13 each having a different purpose.

상기 도1 에 상세히 도시되지 않은 제어부가 제어함에 의하여, 상기 프로그램(11,12,13)의 할당 요청신호(Open_Req)가 인가되면, 대기(Idle) 상태인 경우에 직렬 데이터 전송 경로(Path)의 점유를 허여(Grant)하는 직렬포트(25)가 포함되는 이루어진다.When the allocation request signal Open_Req of the programs 11, 12, and 13 is applied by a control unit not shown in detail in FIG. 1, the serial data transmission path of the serial data transmission path in the idle state is A serial port 25 for granting occupancy is included.

또한, 상기 제1 컴퓨터(20)와 동일한 기능 및 구성으로서 직렬데이터를 송수신하는 직렬포트(35)가 포함되어 제2 컴퓨터(30)가 이루어지고, 상기 직렬포트(25)와 직렬포트(35)는 상호 연결되어 해당 데이터를 전송한다.In addition, the same function and configuration as the first computer 20 includes a serial port 35 for transmitting and receiving serial data, so that a second computer 30 is provided, and the serial port 25 and the serial port 35 are included. Are interconnected and transmit their data.

상기 첨부된 도2를 참조하면, 종래 기술에 의한 직렬포트 공유 방법은, 상기 제1 컴퓨터(20)에서 해당 직렬포트(Serial Port)(25)를 사용하고자 하는, 특정 프로그램(11,12,13)이 상기 해당 직렬포트(25)의 점유 및 사용을 요구(Open_Req)하는 제1 단계(S10)와,Referring to the attached FIG. 2, the serial port sharing method according to the related art includes a specific program (11, 12, 13) that intends to use the corresponding serial port (25) in the first computer (20). A first step S10 of requesting the occupancy and use of the corresponding serial port 25 (Open_Req),

상기의 요구(Open_Req)를 인가받은 해당 컴퓨터(20) 제어부는 상기 해당 직렬포트(Serial Port)(25)가 현재 점유되어 사용중인가 또는 대기(Idle) 중인가를 판단하는 제2 단계(S20)와,The control unit of the computer 20 that has received the request Open_Req determines whether the serial port 25 is currently occupied and in use or idle;

상기 단계(S20)에서 판단하여 상기 직렬포트(25)가 점유되어 사용중이면, 종료단계로 진행하고, 대기(Idle) 상태이면, 해당 프로그램(11,12,13)이 상기 직렬포트(25)를 점유하도록 허가(Grant) 및 설정하는 제3 단계(S30)와,If the serial port 25 is occupied and in use in the step S20, the process proceeds to the end step. If the idle state is in the idle state, the corresponding programs 11, 12, and 13 stop the serial port 25. A third step (S30) of granting and setting up to occupy,

상기 해당 프로그램(11,12,13)은 직렬포트(25)를 점유하고, 상기 직렬포트(35)를 통하여 제2 컴퓨터(30)와 데이터 송수신하는 제4 단계(S40)와,The corresponding program (11, 12, 13) occupies the serial port 25, the fourth step (S40) for transmitting and receiving data with the second computer 30 through the serial port 35,

상기 해당 컴퓨터(20)에 의하여 해당 프로그램(11,12,13)이 데이터 송수신을 완료하여 종료 할 것인지를 판단하고, 데이터 전송이 완료되지 안은 경우는 상기 제4 단계(S40)로 궤환하며, 완료된 경우는 종료단계로 진행하는 제5 단계(S50)로 구성된다.The computer 20 determines whether the corresponding programs 11, 12, and 13 have completed data transmission and reception, and if the data transmission is not completed, returns to the fourth step S40, and completes The case consists of a fifth step (S50) proceeding to the end step.

이하, 상기와 같은 구성의 종래 기술에 의한 컴퓨터 직렬포트 공유방법을 상기 첨부된 도면을 참조하여 상세히 설명한다.Hereinafter, a computer serial port sharing method according to the related art having the above configuration will be described in detail with reference to the accompanying drawings.

상기 제1 컴퓨터(20)에는 서로 다른 목적 및 기능을 수행하는 프로그램(11,12,13)이 다수 존재하고, 상기 다수의 프로그램(11,12,13)이 각각 직렬포트(25,35)를 통하여 제2 컴퓨터(30)와 데이터를 송수신하고자 하는 경우, 해당 제1 컴퓨터(20)의 직렬포트(25)를 점유하여야 한다.The first computer 20 has a plurality of programs (11, 12, 13) for performing different purposes and functions, and the plurality of programs (11, 12, 13) are each connected to the serial port (25, 35) In order to transmit and receive data to and from the second computer 30, the serial port 25 of the first computer 20 must be occupied.

일 예로서, 상기 제1 프로그램(11)이 상기 직렬포트(25)를 점유하여 사용하고자 하는 경우, 점유요구(Open_Req)를 하면(S10), 해당 제1 컴퓨터(20)의 제어부에서, 상기 직렬포트(25)가 대기 상태인지를 판단하고(S20), 대기(Idle) 상태가 아닌 점유 상태이면, 종료 단계로 진행하여 종료하며, 대기(Idle) 상태이면, 상기 제1 프로그램(11)에 점유 허여(Grant) 신호를 전송하고, 상기의 점유 허여 신호를 인가받은 제1 프로그램(11)은 상기 직렬포트(25)를 사용할 수 있도록 해당되는 포트설정 작업을 한다(S30).As an example, when the first program 11 intends to occupy the serial port 25 and uses it, if the occupancy request (Open_Req) is made (S10), in the controller of the first computer 20, the serial It is determined whether the port 25 is in the standby state (S20). If the state is not in the idle state (Idle) state, the process proceeds to the end step and terminates. The first program 11 that transmits a grant signal and receives the occupancy grant signal performs a corresponding port setting operation to use the serial port 25 (S30).

상기와 같이 필요한 설정이 완료된 제1 프로그램(11)은 데이터를 전송하고(S40), 해당 제어부는 데이터의 전송이 완료되었는지 판단하며(S50), 상기 데이터 전송이 완료되지 않은 경우는 상기 제4 단계(S40)로 궤환하고. 데이터 전송이 완료된 경우는 종료로 진행한다.As described above, the first program 11 in which necessary settings are completed transmits data (S40), and the control unit determines whether data transmission is completed (S50), and if the data transmission is not completed, the fourth step. Feedback to (S40). If data transfer is completed, the process proceeds to end.

상기 제1 프로그램(11)의 데이터 전송이 완료된 후, 다음 순서를 기다리고 있던 제2 또는 제3 프로그램(12,13)이 제1 단계(S10)부터 새로이 시작하여, 해당 직렬포트(25)가 점유되었는지 또는 대기(Idle) 중인지를 판단하며, 대기 중인 경우에만 데이터를 전송할 수 있고, 점유 중인 경우에는 다시 종료한다.After the data transfer of the first program 11 is completed, the second or third programs 12 and 13 waiting for the next sequence start anew from the first step S10, and the serial port 25 is occupied. It determines whether or not it is idle or idle. Data can be transmitted only when it is waiting, and terminates again when occupied.

따라서, 특정 프로그램(11,12,13)이 데이터의 전송을 완료할 때까지, 다른 프로그램(11,12,13)은 데이터를 전송하지 못하고 종료하여야 하므로, 해당 프로그램(11,12,13)의 운용 효율이 저하되는 문제가 있었다.Therefore, until the specific programs 11, 12, 13 complete the transfer of data, the other programs 11, 12, 13 must terminate without transmitting the data. There was a problem that the operation efficiency is lowered.

또한, 각각의 프로그램(11,12,13)이 동시에 상기 직렬포트(25)를 점유하지 못하므로, 컴퓨터의 신속한 데이터 처리가 어렵고, 신뢰도가 저하되는 문제가 있었다.In addition, since the programs 11, 12, and 13 cannot occupy the serial port 25 at the same time, there is a problem that the computer can quickly process data and the reliability is lowered.

본 발명 기술은 컴퓨터의 각 프로그램을 클라이언트로 운용할 수 있는 서버부를 부가하고, 특정 프로그램이 직렬포트를 점유하여 사용중인 경우, 타이머를 동작시켜 대기하도록 하므로써, 다수의 프로그램이 하나의 직렬포트를 공유할 수 있도록 하는 것을 제공하는 것이 그 목적이다.The present invention adds a server unit capable of operating each program of a computer as a client, and allows a plurality of programs to share a single serial port by allowing a timer to operate when a specific program occupies the serial port. Its purpose is to provide what it can do.

상기와 같은 목적을 달성하기 위하여 안출한 본 발명은, 컴퓨터의 다수 프로그램이 직렬포트를 이용하는 데이터 전송에 있어서, 프로그램이 상기 컴퓨터 제어부에 직렬포트의 점유 및 사용을 요구하는 요청과정과; 컴퓨터 제어부는 직렬포트가 대기 상태 또는 점유 상태인지를 판단하는 제1 판단 과정과; 상기 제1 판단 과정에서 상기 직렬포트가 점유되어 사용중인 경우, 타이머에 설정된 소정의 시간을 계수하는 타이머 과정과; 컴퓨터 제어부에 의하여 상기 직렬포트가 대기 상태 또는 점유 상태인지를 판단하는 제2 판단 과정과; 상기 제2 판단 과정에서 상기 직렬포트가 점유 상태인 경우, 타이머에 설정된 소정의 시간이 종료되었는지 판단하고, 타이머가 종료되지 안았으면, 상기 제2 판단과정으로 궤환하며, 타이머가 종료되었으면 종료과정으로 진행하는 아웃 과정으로 이루어지는 특징이 있다.In order to achieve the above object, the present invention provides a data transmission method using a serial port by a plurality of programs of a computer, the program requesting the computer control unit to occupy and use the serial port; The computer control unit comprises: a first determination step of determining whether the serial port is in a standby state or an occupied state; A timer step of counting a predetermined time set in a timer when the serial port is occupied and in use in the first determination step; A second determination step of determining, by a computer controller, whether the serial port is in a standby state or an occupied state; If the serial port is occupied in the second determination process, it is determined whether a predetermined time set in the timer has expired. If the timer is not terminated, the controller returns to the second determination process, and if the timer expires, the process ends. It is characterized by an ongoing out process.

도1 은 종래 기술에 의한 직렬포트 공유의 컴퓨터 기능 블록도 이고,1 is a block diagram of a computer function of serial port sharing according to the prior art,

도2 는 종래 기술에 의한 컴퓨터 직렬포트 공유 순서도 이며,2 is a computer serial port sharing flowchart according to the prior art,

도3 은 본 발명 기술에 의한 컴퓨터의 기능 블록도 이고,3 is a functional block diagram of a computer according to the present invention,

도4 는 본 발명 기술에 의한 컴퓨터 직렬포트의 공유방법 순서도 이다,4 is a flowchart of a method for sharing a computer serial port according to the present invention;

** 도면의 주요 부분에 대한 부호 설명 **** Explanation of symbols on the main parts of the drawing **

11,12,13 : 프로그램20,30,40,50 : 컴퓨터11,12,13: Program 20,30,40,50: Computer

25,35 : 직렬포트45 : 서보부25,35: Serial port 45: Servo

이하, 본 발명 기술의 구성에 의한 컴퓨터 직렬포트의 공유방법을 첨부된 도면을 참조하여 설명한다.Hereinafter, a method of sharing a computer serial port by the configuration of the present invention will be described with reference to the accompanying drawings.

본 발명 기술을 설명하기 위하여 첨부된 것으로, 도3 은 본 발명 기술에 의한 컴퓨터의 기능 블록도 이고, 도4 는 본 발명 기술에 의한 컴퓨터 직렬포트의 공유방법 순서도 이다,3 is a functional block diagram of a computer according to the present invention, and FIG. 4 is a flowchart of a method for sharing a computer serial port according to the present invention.

상기 첨부된 도3을 참조하면, 본 발명 기술에 의한 컴퓨터는, 각각 수행하는 목적 및 기능이 서로 상이한 다수의 프로그램(11,12,13)과,Referring to FIG. 3, the computer according to the present invention includes a plurality of programs (11, 12, 13), each having a different purpose and function,

상기 다수의 프로그램(11,12,13)이 후술하는 직렬포트(25)의 점유를 요청하는 신호(Open_Req)가 인가되면, 우선순위에 의하여 상기 직렬포트(25)의 점유를 허가(Grant)하며, 설정된 소정의 시간 동안 계수(Count) 하도록 하는 타이머(Timer) 기능 및 직렬포트의 점유 상태를 계속 확인하는 기능의 서보부(45)와,When a plurality of programs 11, 12, and 13 receive a signal Open_Req for requesting the occupation of the serial port 25 described below, the serial port 25 is granted by priority. A servo unit 45 having a timer function to count for a predetermined time and a function of continuously checking the occupation state of the serial port;

상기 서보부로부터 인가되는 데이터를 직렬(Serial) 신호로 출력하는 직렬포트(25,35))가 포함되는 제1 컴퓨터(40)와 제2 컴퓨터(50)로 구성된다.And a first computer 40 and a second computer 50 including serial ports 25 and 35 for outputting data applied from the servo unit as serial signals.

또한, 상기 첨부된 도4 를 참조하면, 컴퓨터(40,50)의 다수 내장 프로그램(11,12,13)이 직렬포트(Serial Port)(25,35)를 이용하여 직렬 데이터를 전송하는데 있어서,In addition, referring to the accompanying FIG. 4, in the case where a plurality of built-in programs 11, 12, 13 of the computer 40, 50 transmit serial data using the serial ports 25, 35,

상기 해당 프로그램(11,12,13)이 직렬데이터의 전송을 위하여, 상기 컴퓨터 제어부에 직렬포트(25,35)의 점유 및 사용을 요구(Open_Req)하는 요청과정(S100)과,A request process (S100) for the corresponding program (11, 12, 13) to request the occupancy and use of the serial ports (25, 35) to the computer control unit (S100) to transmit serial data;

상기 컴퓨터 제어부는 직렬포트(25,35)가 대기(Idle) 상태 또는 특정한 프로그램(11,12,13)이 직렬 데이터를 전송하는 점유(Seize) 상태인지를 판단하는 제1판단 과정(S110)과,The computer controller may determine whether the serial ports 25 and 35 are in an idle state or a seize state in which specific programs 11, 12, and 13 transmit serial data; ,

상기 제1 판단 과정(S110)에서 상기 직렬포트(25,35)가 점유(Seize)되어 사용중인 경우, 상기 서버부(45)의 타이머(Timer)에 설정된 소정의 시간을 계수(Count)하는 타이머 과정(S120)과,In the first determination process (S110), when the serial ports 25 and 35 are occupied and are in use, a timer that counts a predetermined time set in a timer of the server unit 45. Process (S120),

상기 컴퓨터 제어부에 의하여 상기 직렬포트(25,35)가 프로그램에 의하여 점유되지 안은 대기(Idle) 상태인지 또는 프로그램에 의하여 직렬 데이터를 전송하기 위하여 점유(Seize)된 상태인지를 판단하는 제2 판단 과정(S130)과,A second determination process of determining, by the computer control unit, whether the serial ports 25 and 35 are in an idle state not occupied by a program or in a seized state to transmit serial data by a program; (S130),

상기 제2 판단 과정(S130)에서 상기 직렬포트(25,35)가 점유(Seize) 상태인 경우, 상기 서버부(45)의 타이머에 설정된 소정의 시간이 계수(Count) 완료되어 종료되었는지 판단하고, 상기 타이머(Timer)가 종료되지 안았으면, 상기 제2 판단과정(S130)으로 궤환(Feedback)하며, 상기 타이머(Timer)가 종료되었으면 종료과정으로 진행하는 아웃 과정(S140)과,In the second determination process (S130), when the serial ports 25 and 35 are in a seize state, it is determined whether a predetermined time set in the timer of the server unit 45 is completed by counting. If the timer has not expired, the process returns to the second determination process S130, and if the timer expires, the process proceeds to an end process (S140).

상기 제1 판단과정(S110) 및 제2 판단과정(S130)에서 상기 직렬포트(25,35)가 특정 프로그램(11,12,13)에 의하여 점유(Seize)되고 직렬 데이터를 전송하고 있지 안는 대기(Idle) 상태이면, 상기 해당 프로그램(11,12,13)이 직렬포트(25,35)를 점유(Seize)하도록 하는 허가 과정(S150)과,In the first determination process S110 and the second determination process S130, the serial ports 25 and 35 are seized by specific programs 11, 12, and 13 and are not transmitting serial data. If the (Idle) state, the authorization process (S150) to allow the corresponding program (11, 12, 13) to seize the serial port (25, 35),

상기의 직렬 데이터를 전송하는, 직렬포트(25,35) 점유(Seize)를 허가(Grant) 받은 프로그램(11,12,13)은, 상기 직렬포트(25,35)를 통하여 직렬(Serial) 데이터를 전송하는 전송과정(S160)과,The programs 11, 12, and 13 that have been granted the serial port 25 and 35 seize to transmit the serial data are serial data through the serial ports 25 and 35. Transmission process for transmitting the (S160),

상기 전송과정(S160)에서 해당 프로그램(11,12,13)에 의하여 직렬(Serial)데이터의 전송이 완료되었는지를 판단하고, 상기 직렬(Serial) 데이터의 전송이 완료되지 안았으면, 상기 전송과정(S160)으로 궤환(Feedback)하고, 상기 직렬 데이터의 전송이 완료되었으면, 종료하는 완료판단과정(S170)으로 구성된다.In the transmission process (S160), it is determined whether the transmission of the serial data is completed by the corresponding programs 11, 12, and 13, and if the transmission of the serial data is not completed, the transmission process ( The process returns to S160, and when the transmission of the serial data is completed, the process is completed.

이하, 상기와 같은 구성의 본 발명 기술에 의한 컴퓨터를 이용한 직렬포트의 공유방법을 첨부된 도면을 참조하여 상세히 설명한다.Hereinafter, a method of sharing a serial port using a computer according to the present invention having the above configuration will be described in detail with reference to the accompanying drawings.

일 예로서, 상기 제1 컴퓨터(40)의 다수 프로그램(11,12,13) 중에서, 특정한 프로그램(11,12,13)이, 상기 직렬포트(25)를 이용하여 제2 컴퓨터(50)에 직렬(Serial)로 데이터를 전송하고자 하는 경우, 상기 서보부(45)에 직렬포트(25)의 점유(Seize)를 요청(Open_Req)하고(S100), 상기 서버부(45)는 상기 직렬포트(25)가 다른 프로그램(11,12,13)에 의하여 점유되고 직렬데이터를 전송하고 있는지 또는 대기(Idle) 중인지를 판단한다(S110),As an example, of the plurality of programs 11, 12, 13 of the first computer 40, specific programs 11, 12, 13 are connected to the second computer 50 using the serial port 25. If data is to be transmitted in serial, the servo unit 45 requests the seize of the serial port 25 (Open_Req) (S100), and the server unit 45 transmits the serial port ( It is determined whether 25 is occupied by other programs 11, 12, and 13 and is transmitting serial data or idle (S110).

상기 제1 판단과정(S110)에서 직렬포트(25)가 다른 프로그램(11,12,13)에 의하여 이미 점유되고 직렬(Serial) 데이터를 전송하고 있는 상태이면, 상기 서버부(45)는 타이머(Timer)를 동작시켜, 설정된 소정의 시간 동안 계수(Count) 하도록 한다(S120).If the serial port 25 is already occupied by other programs 11, 12, 13 in the first determination process S110 and is transmitting serial data, the server unit 45 may include a timer ( The timer is operated to count for a predetermined time (S120).

상기와 같이 서버부(45)의 상기 타이머가 계수하는 동안, 상기 서버부(45)는 계속하여 상기 직렬포트(25)가 다른 프로그램(11,12,13)에 의하여 점유(Seize)되어 직렬(Serial) 데이터를 전송하고 있는지 또는 다른 프로그램에 의하여 점유되지 안고, 대기(Idle) 상태에 있는 중인지를 판단한다(S130),While the timer of the server unit 45 counts as described above, the server unit 45 continues to seize the serial port 25 by other programs 11, 12, and 13. Serial) it is determined whether the data is being transmitted or is not occupied by another program and is in an idle state (S130).

상기 제2 판단 과정(S130)에서 판단하여, 상기 직렬포트(25)가 다른 프로그램(11,12,13)에 의하여 이미 점유되어 있고, 직렬(Serial) 데이터를 전송하고 있는 상태이면, 상기 서보부(45)에 의한 상기 타이머(Timer)는, 설정된 소정의 시간에 의한 계수(Count)를 모두 완료하므로써, 타임 아웃(Time Out) 되었는지를 판단하고(S140), 상기의 타임 아웃(Time Out) 되었으면, 제2 판단 과정(S130)으로 궤환(Feedback) 하므로써, 상기 서보부(45)의 타이머(Timer)에 설정된 소정의 시간 동안 직렬포트(25)의 점유(Seize)가 해지되어 대기(Idle) 상태인지를 지속적으로 확인 또는 판단하게 하고, 상기 타이머의 설정된 시간 내에 대기(Idle) 상태가 되면, 상기 직렬포트(25)를 점유하도록 하는 것이며, 상기 설정된 소정의 시간 동안 직렬포트(25)가 계속하여 점유(Seize) 상태를 유지하면, 해당 프로그램(11,12,13)은 직렬포트를 점유하지 못하고 종료로 진행시킨다.If the serial port 25 is already occupied by another program (11, 12, 13) and is in the state of transmitting serial data as determined in the second determination process (S130), the servo unit The timer (45) by 45 determines whether the time has elapsed (S140) by completing all the counts according to the set predetermined time (S140). By feeding back to the second determination process (S130), the occupation of the serial port 25 is canceled for a predetermined time set in the timer of the servo unit 45, and thus the standby state is idle. Permits to continuously check or judge the acknowledgment, and if the idle state within the set time of the timer to occupy the serial port 25, the serial port 25 continues for the predetermined time set If you keep the Seize state, the program (11 12 and 13 do not occupy the serial port and proceed to termination.

상기 제1 판단과정(S110) 또는 제2 판단과정(S130)에서 상기 직렬포트(25)가 특정 프로그램(11,12,13)에 의하여 점유(Seize)되지 않고, 대기(Idle) 상태이면, 상기 서보부(45)는 해당 프로그램(11,12,13)에 상기 직렬포트를 점유하여, 직렬 데이터를 전송할 수 있는 허가(Grant) 신호를 전송하고, 상기 해당 프로그램(11,12,13)은 상기 직렬포트(25)를 통하여 직렬 데이터를 전송할 수 있도록, 포트 설정(Setup) 작업을 한다(S150).If the serial port 25 is not occupied by the specific programs 11, 12, and 13 in the first determination process S110 or the second determination process S130, and is in an idle state, The servo unit 45 occupies the serial port to the corresponding programs 11, 12, and 13 to transmit a grant signal for transmitting serial data, and the corresponding programs 11, 12, and 13 In order to transmit serial data through the serial port 25, a port setup operation is performed (S150).

상기와 같이 제1 컴퓨터(40)의 해당 프로그램(11,12,13)에 의하여 직렬포트(25)의 직렬 데이터 전송을 위한 설정(Setup) 작업이 완료되면, 상기 해당 프로그램(11,12,13)은 상기 설정(Setup)된 직렬포트를 통하여 직렬(Serial) 데이터를 상기 제2 컴퓨터(50)의 직렬포트(35)로 전송하게 된다(S160).When the setup operation for serial data transmission of the serial port 25 is completed by the corresponding programs 11, 12, 13 of the first computer 40 as described above, the corresponding programs 11, 12, 13 ) Transmits serial data to the serial port 35 of the second computer 50 through the setup serial port (S160).

상기 서보부(45)는 해당 프로그램(11,12,13)에 의하여, 직렬(Serial) 데이터의 전송이 완료되었는지를 판단하고(S170), 상기 직렬 데이터의 전송이 완료되지 안았으면, 상기 전송과정(S160)으로 궤환(Feedback)하며, 직렬 데이터의 전송이 완료되었으면 종료하므로써, 상기 직렬포트(25)를 대기(Idle) 상태로 만들고, 다음 프로그램(11,12,13)이 직렬포트(25)를 점유하여 사용할 수 있도록 한다.The servo unit 45 determines whether the transmission of the serial data is completed by the corresponding programs 11, 12, and 13 (S170). If the transmission of the serial data is not completed, the transmission process is performed. Feed back to (S160), and if the serial data transfer is complete, the terminal is placed in the idle state by the serial port 25, and the next program (11, 12, 13) is the serial port 25 To occupy and use it.

따라서, 상기와 같은 본 발명의 기술은, 다수의 프로그램(11,12,13)이 서보부(45)에 의한 타이머의 시간 동안 대기하면서, 직렬포트(25)가 대기(Idle) 상태로 되면, 직렬포트(25)를 점유할 수 있도록 한다.Therefore, in the technique of the present invention as described above, when the serial port 25 is in the idle state while the plurality of programs 11, 12, 13 wait for the time of the timer by the servo unit 45, Allows serial port 25 to be occupied.

상기와 같은 구성의 본 발명 기술은, 각 컴퓨터의 서보부를 이용하고, 타이머에 의한 설정시간 동안, 직렬포트가 대기 상태인지를 판단하므로써, 다수의 프로그램이 종료되지 않고 직렬포트를 공유 할 수 있도록 하는 효과가 있다.According to the present invention of the above configuration, by using the servo unit of each computer and determining whether the serial port is in a standby state during a set time by a timer, a plurality of programs can be shared without terminating the serial port. It works.

또한, 각 프로그램은 임의 조정 가능한 타이머의 설정시간 동안 종료되지 않고 대기 상태로 있으면서, 직렬포트가 대기 상태로 전환되는 즉시 점유하므로, 프로그램의 전체적인 동작시간을 단축시키고, 컴퓨터의 신뢰도를 제고시키는 공업적 및 산업적 이용 효과가 있다.In addition, each program occupies the standby state without being terminated during the setting time of the arbitrarily adjustable timer, and occupies as soon as the serial port is switched to the standby state, thereby reducing the overall operating time of the program and improving the reliability of the computer. And industrial use effects.

Claims (2)

컴퓨터의 다수 프로그램이 직렬포트를 이용하는 데이터 전송에 있어서,Many programs in a computer use a serial port for data transmission. 프로그램이 상기 컴퓨터 제어부에 직렬포트의 점유 및 사용을 요구하는 요청과정과,Requesting a program requesting the computer control unit to occupy and use a serial port; 컴퓨터 제어부는 직렬포트가 대기 상태 또는 점유 상태인지를 판단하는 제1 판단 과정과,The computer controller determines a first determination process of determining whether the serial port is in a standby state or an occupied state; 상기 제1 판단 과정에서 상기 직렬포트가 점유되어 사용중인 경우, 타이머에 설정된 소정의 시간을 계수하는 타이머 과정과,A timer process of counting a predetermined time set in a timer when the serial port is occupied and in use in the first determination process; 컴퓨터 제어부에 의하여 상기 직렬포트가 대기 상태 또는 점유 상태인지를 판단하는 제2 판단 과정과,A second determination step of determining, by a computer controller, whether the serial port is in a standby state or an occupied state; 상기 제2 판단 과정에서 상기 직렬포트가 점유 상태인 경우, 타이머에 설정된 소정의 시간이 종료되었는지 판단하고, 타이머가 종료되지 안았으면, 상기 제2 판단과정으로 궤환하며, 타이머가 종료되었으면 종료과정으로 진행하는 아웃 과정으로 이루어져 구성되는 것을 특징으로 하는 컴퓨터 직렬포트의 공유 방법.If the serial port is occupied in the second determination process, it is determined whether a predetermined time set in the timer has expired. If the timer is not terminated, the controller returns to the second determination process, and if the timer expires, the process ends. A method of sharing a computer serial port, characterized by consisting of the ongoing out process. 제1 항에 있어서,According to claim 1, 상기 제1 판단과정 및 제2 판단과정에서 직렬포트가 대기 상태이면, 상기 프로그램이 직렬포트를 점유하도록 하는 허가 과정과,An authorization process for allowing the program to occupy the serial port if the serial port is in the standby state in the first and second determination processes; 상기의 직렬포트 점유를 허가 받은 프로그램은, 직렬포트를 통하여 데이터를전송하는 전송과정과,The program that is allowed to occupy the serial port includes a transmission process for transmitting data through the serial port, 상기 전송과정에서 데이터의 전송이 완료되었는지를 판단하고, 데이터 전송이 완료되지 안았으면, 상기 전송과정으로 궤환하고, 데이터 전송이 완료되었으면, 종료하는 완료판단과정이 포함되어 구성되는 것을 특징으로 하는 컴퓨터 직렬포트의 공유 방법.It is determined that the transmission of the data is completed in the transmission process, and if the data transmission is not completed, return to the transmission process, and if the data transmission is completed, the computer comprising a complete determination process to terminate How to share a serial port.
KR1020000057399A 2000-09-29 2000-09-29 A method of using common serial port for computer KR20020025517A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020000057399A KR20020025517A (en) 2000-09-29 2000-09-29 A method of using common serial port for computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020000057399A KR20020025517A (en) 2000-09-29 2000-09-29 A method of using common serial port for computer

Publications (1)

Publication Number Publication Date
KR20020025517A true KR20020025517A (en) 2002-04-04

Family

ID=19691120

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020000057399A KR20020025517A (en) 2000-09-29 2000-09-29 A method of using common serial port for computer

Country Status (1)

Country Link
KR (1) KR20020025517A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100438104B1 (en) * 2002-07-12 2004-07-02 엘지전자 주식회사 Communication method with one serial port in many communication modes
KR101223641B1 (en) * 2007-05-18 2013-01-17 삼성전자주식회사 Method and apparatus for managing control-ownership for application of Remote User Interface Server
US9231778B2 (en) 2007-05-18 2016-01-05 Samsung Electronics Co., Ltd. Method and apparatus for managing control ownership for application of remote user interface server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100438104B1 (en) * 2002-07-12 2004-07-02 엘지전자 주식회사 Communication method with one serial port in many communication modes
KR101223641B1 (en) * 2007-05-18 2013-01-17 삼성전자주식회사 Method and apparatus for managing control-ownership for application of Remote User Interface Server
US9231778B2 (en) 2007-05-18 2016-01-05 Samsung Electronics Co., Ltd. Method and apparatus for managing control ownership for application of remote user interface server

Similar Documents

Publication Publication Date Title
US5862353A (en) Systems and methods for dynamically controlling a bus
KR940007903B1 (en) Multiple cluster signal processor
US5473762A (en) Method and system for pipelining bus requests
CN108873798B (en) Programmable logic controller
JPH0851470A (en) Radiocommunication processor system and radiocommunication system
KR20020025517A (en) A method of using common serial port for computer
KR100431372B1 (en) Variable access fairness in a fibre channel arbitrated loop
JP2002152213A (en) Communication system and device, method for controlling electronic devices through communication
JPH054708B2 (en)
KR0132953B1 (en) Apparatus interfacing b-isdn terminal supporting multi
KR100334810B1 (en) Communication apparatus for aicps
KR960014829B1 (en) Bus requester operating method
JP2809164B2 (en) Two-way data communication system
KR100389838B1 (en) Method for controlling console of base station in wireless system
JPH0573339A (en) Parallel execution system fore distributed service
JPS63123246A (en) Multi-point control system
KR100843105B1 (en) computer based controller, control system, and controlling method
JP2009212889A (en) Network switching device, and network system
JPH01225255A (en) Communication control equipment
JPS6160038A (en) Transmission and reception control system of semi-duplex communication
WO2020145956A1 (en) Data link changes based on requests
JPH09200296A (en) Data transmission system
JPH1153088A (en) Keyboard switching device
KR20020052232A (en) Hdlc controller of multi-processor board
KR19980061516A (en) High speed data transceiver

Legal Events

Date Code Title Description
N231 Notification of change of applicant
WITN Withdrawal due to no request for examination