KR100258527B1 - Slave device handling algorithm using the same port of a master device - Google Patents
Slave device handling algorithm using the same port of a master device Download PDFInfo
- Publication number
- KR100258527B1 KR100258527B1 KR1019970047994A KR19970047994A KR100258527B1 KR 100258527 B1 KR100258527 B1 KR 100258527B1 KR 1019970047994 A KR1019970047994 A KR 1019970047994A KR 19970047994 A KR19970047994 A KR 19970047994A KR 100258527 B1 KR100258527 B1 KR 100258527B1
- Authority
- KR
- South Korea
- Prior art keywords
- slave device
- master device
- slave
- master
- communication
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/124—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
- G06F13/126—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine and has means for transferring I/O instructions and statuses between control unit and main processor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30094—Condition code generation, e.g. Carry, Zero flag
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Information Transfer Systems (AREA)
Abstract
Description
본 발명은 마스터 디바이스(Master device)와 슬레이브 디바이스(Slave device) 사이의 통신을 위한 제어 방법에 관한 것으로, 특히 마스터 디바이스의 동일 포트를 이용하여 서로 다른 아이덴티피케이션(Identification; 이하 ID로 약칭함)을 가지는 슬레이브 디바이스들을 패러럴(Parallel)로 연결하여 클럭과 시리얼 데이터 라인을 통해 데이터를 전송할 수 있도록 한 마스터 디바이스와 슬레이브 디바이스 사이의 통신제어방법에 관한 것이다.The present invention relates to a control method for communication between a master device and a slave device, and in particular, different identification using the same port of the master device. The present invention relates to a communication control method between a master device and a slave device in which data is transmitted through a clock and a serial data line by connecting slave devices having a parallel.
마스터 디바이스와 슬레이브 디바이스 사이의 종래의 통신제어방법을 도 1에 도시된 잉크젯 프린터의 내부회로 블럭을 이용하여 살펴보면 다음과 같다.The conventional communication control method between the master device and the slave device will be described with reference to the internal circuit block of the inkjet printer shown in FIG.
도시된 바와 같이 CPU(18)는, ASIC(11)을 경유하여 초기 설정 값 및 시스템에 필요한 값을 저장하고 있는 EPROM(17) 내에서 필요한 값을 읽어 들여 시스템의 초기화 동작을 실행한다. 또한, 제어 프로그램 및 여러 가지 폰트(Font)를 내장하고 있는 ROM(12)에서 필요한 프로그램 내지는 폰트를 읽어 들여 실행한 후 데이터를 RAM(13)에 일시적으로 보관한다.As shown, the
RAM(13)에 일시적으로 저장된 데이터는, 로직(Logic) 회로로 구성된 마스터 디바이스인 ASIC(11)에 의해 CPU(110) 주변의 대부분의 소자로 데이터를 전송하게 된다. 즉, 마스터 디바이스인 ASIC(11)은, 슬레이브 디바이스인 헤드 드라이버(Driver)(14), CR 드라이버(15), LF 드라이버(16)로 데이터를 전송한다.The data temporarily stored in the
이 때, 마스터 디바이스인 ASCI(11)과 슬레이브 디바이스인 헤드 드라이버(Driver)(14), CR 드라이버(15), LF 드라이버(16)는, 상호간에 별도의 전용 포트를 사용하여 데이터를 전송한다. 또한 슬레이브 디바이스인 EPROM(17) 또한 별도의 전용 포트로 연결되어 마스터 디바이스인 ASIC(11)을 통해서 CPU(18)로 데이터를 전송하게 된다.At this time, the ASCI 11, which is a master device, the
따라서, 종래의 마스터 디바이스인 ASIC(11)과 데이터를 주고 받기 위해 비휘발성 메모리(이하 NVRAM로 칭함)를 추가하는 경우에는 통신을 위한 포트(Port)가 최소한 2개가 필요하다. 또한, 서모미터 센서(Thermometer sensor; 예 DS1621)를 사용하여 마스터 디바이스인 ASIC(11)과 데이터를 주고 받는 경우에도 물론 2개의 포트가 필요하게 된다.Therefore, when adding a nonvolatile memory (hereinafter referred to as NVRAM) to exchange data with the
이런 이유로, 슬레이브 디바이스인 NVRAM과 서모미터 센서, 2개를 마스터 디바이스인 ASIC(11)에 추가하여 데이터를 주고받기 위해서는 최소 4개의 포트가 있어야 통신 제어를 할 수 있다.For this reason, at least four ports are required to control communication by adding two slave devices, NVRAM and thermometer sensors, to the master device ASIC (11).
이로 인해, 종래의 마스터 디바이스에 새로운 슬레이브 디바이스를 추가하기 위해서는 마스터 디바이스 내에 추가적인 포트를 만들게 되어 ASIC 설계 상에 많은 어려움이 발생할 수 있는 문제점이 있다.As a result, in order to add a new slave device to the conventional master device, an additional port is created in the master device, which may cause a lot of difficulties in the ASIC design.
또한, 마스터 디바이스인 ASIC에 새로운 포트를 추가할 때마다 ASIC의 설계 변경 등의 이유로 인해 그 제조 원가가 증가하는 문제점이 있다.In addition, each time a new port is added to the ASIC, which is a master device, the manufacturing cost increases due to a change in the design of the ASIC.
본 발명은 상기 문제점을 해결하고자 안출된 것으로, 마스터 디바이스와 적어도 하나 이상의 슬레이브 디바이스로 구성된 슬레이브 디바이스부를 시리얼 클럭포트 및 시리얼 데이터포트를 통해 패러럴로 연결하여 시리얼 통신을 수행할 수 있도록하여, 추가적인 포트설계를 방지함으로써 비용을 절감시킨 마스터 디바이스와 슬레이브 디바이스 사이의 통신제어방법을 제공함에 본 발명의 목적이 있다.The present invention has been made to solve the above problems, and additional port design by enabling a serial communication by connecting the slave device unit consisting of a master device and at least one slave device in parallel through a serial clock port and a serial data port. It is an object of the present invention to provide a communication control method between a master device and a slave device by reducing the cost.
이러한 목적을 달성하기 위한 본 발명은, 마스터 디바이스와 적어도 하나 이상의 슬레이브 디바이스로 구성된 슬레이브 디바이스부를 시리얼 클럭포트 및 시리얼 데이퍼포트를 통해 패러럴로 연결하여 시리얼 통신을 수행할 수 있도록한 제어 방법으로, 상기 슬레이브 디바이스의 동작시 해당 슬레이브 디바이스의 고유 ID를 확인하는 과정과, 상기 확인된 해당 슬레이브 디바이스의 루틴으로 이동하는 과정과, 상기 확인된 슬레이브 디바이스가 사용중임을 알리는 플래그를 세팅하는 과정과, 상기 슬레이브 디바이스가 수행 완료되면 사용중임을 알리는 플래그를 클리어하는 과정을 포함하여 된 특징을 가진다.In order to achieve the above object, the present invention provides a control method for performing serial communication by connecting a slave device including a master device and at least one slave device in parallel through a serial clock port and a serial data port. During operation of the slave device, identifying a unique ID of the corresponding slave device, moving to the identified routine of the corresponding slave device, setting a flag indicating that the identified slave device is in use, and the slave device When the execution is completed has a feature including clearing a flag indicating that it is in use.
도 1은 종래의 마스터 디바이스와 슬레이브 디바이스의 통신제어를 설명하기 위한 잉크젯 프린터의 제어 블럭도.1 is a control block diagram of an inkjet printer for explaining communication control between a conventional master device and a slave device.
도 2는 본 발명이 적용되는 마스터 디바이스와 슬레이브 디바이스의 제어 블럭도.2 is a control block diagram of a master device and a slave device to which the present invention is applied;
도 3는 본 발명에 따른 마스터 디바이스와 슬레이브 디바이스 사이의 통신제어방법을 나타내는 흐름도.3 is a flowchart illustrating a communication control method between a master device and a slave device according to the present invention;
도 4은 본 발명에 따른 마스터 디바이스와 슬레이브 디바이스 사이의 통신제어방법의 알고리즘을 나타내는 일실시예.Figure 4 is an embodiment showing an algorithm of a communication control method between a master device and a slave device according to the present invention.
도 5은 본 발명에 따른 마스터 디바이스와 슬레이브 디바이스 사이의 통신제어방법의 알고리즘을 나타내는 다른실시예.5 is another embodiment showing an algorithm of a communication control method between a master device and a slave device according to the present invention;
이하, 본 발명을 첨부된 도면을 이용하여 살펴보면 다음과 같다.Hereinafter, the present invention will be described with reference to the accompanying drawings.
도 2는 본 발명이 적용되는 마스터 디바이스와 슬레이브 디바이스의 제어 블럭도이다.2 is a control block diagram of a master device and a slave device to which the present invention is applied.
도시된 바와 같이, 마스터 디바이스(100)의 시리얼 클럭포트(SCL)와 시리얼 데이터포트(SDA)는 적어도 하나 이상의 슬레이브 디바이스1(210), 슬레이브 디바이스2(220),....,슬레이브 디바이스N(n)로 이루어진 슬레이브 디바이스부(200)의 각각의 시리얼 클럭포트(SCL)와 시리얼 데이터포트(SDA)에 페러럴로 연결되도록 구성된다.As shown, the serial clock port (SCL) and the serial data port (SDA) of the
또한, 상기 마스터 디바이스(100)와 슬레이브 디바이스부(200) 사이에는 시리얼 클럭포트(SCL) 및 시리얼 데이터포트(SDA)를 통해 통상의 시리얼 통신이 수행된다.In addition, normal serial communication is performed between the
또한, 슬레이부 디바이스부(200)를 구성하는 적어도 하나 이상의 슬레이브 디바이스1(210), 슬레이브 디바이스2(220),....,슬레이브 디바이스N(n)는 고유의 "ID(아이디)"를 갖게 된다. 상기 ID는 "1"과 "0"으로 조합되는 4비트(bit) 신호로, 예를 들어, 상기 슬레이브 디바이스1(210)의 ID는 "1010"으로, 상기 슬레이브 디바이스2(220)의 ID는 "1001"로 부여할 수 있다.In addition, at least one
따라서, 본 발명에 따른 신호 전송시 상기 ID를 확인하고, 해당 슬레이브 디바이스만 통신 가능하도록 플래그(flag)를 세팅함으로써, 데이터 전송에 따른 버스충돌을 피할 수 있게 되는 것이다.Therefore, by checking the ID when transmitting the signal according to the present invention and setting a flag so that only the corresponding slave device can communicate, it is possible to avoid a bus collision due to data transmission.
도 3은 본 발명에 따른 마스터 디바이스와 슬레이브 디바이스 사이의 통신제어방법을 나타내는 흐름도이다.3 is a flowchart illustrating a communication control method between a master device and a slave device according to the present invention.
도시된 바와 같이, 슬레이브 디바이스를 동작시킬 것인가를 판단하는 과정(S1)과, 상기 과정(S1)에서 상기 슬레이브 디바이스를 동작시킬 경우, 슬레이브 디바이스의 고유 ID를 확인하는 과정(S2)과, 상기 고유 ID에 해당하는 슬레이브 디바이스(1,2,..N)를 검출 및 판단하는 과정(S3,S4)과, 확인된 해당 슬레이브 디바이스의 루틴으로 이동하는 과정(S5)과, 상기 확인된 슬레이브 디바이스가 사용중임을 알리는 플래그를 세팅하는 과정(S6)과, 해당 슬레이브 디바이스의 프로토콜에 의한 데이터 전송(통신)(Read/Write)을 수행하는 과정(S7)과, 해당 슬레이브 디바이스에 대한 통신의 수행이 완료되면 사용중이라는 플래그를 클리어(clear)하는 과정(S8)을 구비하여 된 것이다.As shown, the step (S1) of determining whether to operate the slave device, the step of checking the unique ID of the slave device (S2) when operating the slave device in the step (S1), and the unique Detecting and determining the slave device (1, 2, ..N) corresponding to the ID (S3, S4), the process of moving to the routine of the identified slave device (S5), and the identified slave device Setting a flag indicating that it is in use (S6), performing a data transmission (communication) (Read / Write) according to the protocol of the slave device (S7), and when communication with the slave device is completed. A step S8 of clearing a flag in use is provided.
예를 들어, 잉크젯 프린터에 채용되는 슬레이브 디바이스부(200)에 슬레이브 디바이스1(210)이 전술한 NVRAM이고, 슬레이브 디바이스2(220)가 서모미터(Thermometer) 센서라면, 이를 제어하는 함수를 프로그램한다. 즉, 도 4에서와 같이 임의의 프로그램 언어를 이용하여 NVRAM, 서모미터센서의 각각의 함수를 작성한다.For example, if the
작성된 함수는 다시 컴파일 시킨 후 이를 마스터 디바이스(200)가 ASCI인 경우에 컴파일된 각각의 함수를 실행 가능하도록 ASIC에 저장하게 된다. 따라서 마스터 디바이스(100)인 ASIC에 저장된 함수에 의해 슬레이브 디바이스부(200)의 NVRAM, 서모미터 센서는 각각 제어되되, 본 발명에 따른 고유ID 데이터에 의해 버스 충돌이 없이 통신을 실행하여 슬레이브 디바이스를 제어할 수 있게 된다.The compiled function is recompiled and stored in the ASIC so that each compiled function can be executed when the
또한, 도 4에서 작성된 함수에 쓰인 IF 제어문 대신 도 5와 같이 WHILE 제어문을 이용하여 함수의 소스 코드를 작성할 수 있으며, 그 동작 알고리즘은 도 4과 동일하다.In addition, instead of the IF control statement used in the function created in FIG. 4, the source code of the function may be created using the WHILE control statement as shown in FIG.
이상과 같이, 마스터 디바이스(100)와 시리얼 통신이 가능한 슬레이브 디바이스부(200)를 동일한 포트를 갖도록 패러럴로 연결함으로 인해서 슬레이브 디바이스의 추가로 인한 마스터 디바이스(100)에 새로운 통신 포트를 추가하기 위한 설계 변경과 같은 작업 줄일 수 있게 된다.As described above, a design for adding a new communication port to the
이상에서 설명한 바와 같이 본 발명은, 마스터 디바이스에 새로운 슬레이브 디바이스의 추가로 인해 포트를 추가할 경우 마스터 디바이스 설계 제작상에 많은 노력과 비용이 추가되는 것을 이 알고리즘을 사용하여 줄일 수 있는 효과가 있으며, 간단한 알고리즘으로 마스터 디바이스의 동일 포트 그룹을 가지는 여러 슬레이브 디바이스를 핸들링할 수 있는 효과가 있다.As described above, the present invention has an effect of using this algorithm to reduce a lot of effort and cost in the master device design production when adding a port due to the addition of a new slave device to the master device, The simple algorithm has the effect of handling multiple slave devices with the same port group of the master device.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019970047994A KR100258527B1 (en) | 1997-09-22 | 1997-09-22 | Slave device handling algorithm using the same port of a master device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019970047994A KR100258527B1 (en) | 1997-09-22 | 1997-09-22 | Slave device handling algorithm using the same port of a master device |
Publications (2)
Publication Number | Publication Date |
---|---|
KR19990026043A KR19990026043A (en) | 1999-04-15 |
KR100258527B1 true KR100258527B1 (en) | 2000-06-15 |
Family
ID=19521473
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1019970047994A KR100258527B1 (en) | 1997-09-22 | 1997-09-22 | Slave device handling algorithm using the same port of a master device |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100258527B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20030062900A (en) * | 2002-01-21 | 2003-07-28 | 엘지전자 주식회사 | Method and apparatus of preventing collision for iic system |
-
1997
- 1997-09-22 KR KR1019970047994A patent/KR100258527B1/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
KR19990026043A (en) | 1999-04-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9273984B2 (en) | Device and method for transmitting data between a position-measuring device and sequential electronics | |
US5495559A (en) | Non-volatile memory data initialization/rewrite apparatus for a printer | |
JP4066980B2 (en) | Printing recording material container | |
FI74158B (en) | KOPPLINGSANORDNING FOER GIVANDE AV STYRORDER I ETT MIKROCOMPUTERSYSTEM. | |
KR100258527B1 (en) | Slave device handling algorithm using the same port of a master device | |
US5510775A (en) | Method of personalizing an electronic module and electronic circuit and module for implementing the method | |
US4884195A (en) | Multiprocessor system for loading microprograms into a RAM control store of a bus controller | |
EP3192677B1 (en) | Method for burning data into tire pressure monitoring device | |
CN100567053C (en) | Control setup | |
JP2001295694A (en) | Rewrite system for vehicle control device | |
US4725976A (en) | Programmable controller | |
KR20010098508A (en) | Controlling method and electronic device | |
US6766408B2 (en) | Semiconductor integrated circuit and method for writing into non-volatile memory using a program received by external communication | |
JP2004040649A (en) | On-vehicle communication equipment | |
JP2001005720A (en) | Common memory access management device | |
US7600041B2 (en) | Industrial or domestic local network | |
EP1067462B1 (en) | A computer peripheral apparatus and a computer readable medium having a program for controlling the computer peripheral apparatus | |
EP0471806B1 (en) | Method of personalising an electronic module, electronic circuit and module which are designed for the implementation of this method | |
US4941109A (en) | Method of effectively performing a feed operation and printing apparatus for realizing the method | |
JP2007109260A (en) | Storage device and access method to storage device | |
CN109313426B (en) | Controller | |
JP2008149724A (en) | Storage device and method for accessing storage device | |
JP2008080803A (en) | Storage device and method for accessing storage device | |
JPS642180Y2 (en) | ||
JPS6232483B2 (en) |
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 | ||
FPAY | Annual fee payment |
Payment date: 20070227 Year of fee payment: 8 |
|
LAPS | Lapse due to unpaid annual fee |