KR100962306B1 - Bidirectional Data Communication Device of Embedded System and Its Method - Google Patents
Bidirectional Data Communication Device of Embedded System and Its Method Download PDFInfo
- Publication number
- KR100962306B1 KR100962306B1 KR1020030013820A KR20030013820A KR100962306B1 KR 100962306 B1 KR100962306 B1 KR 100962306B1 KR 1020030013820 A KR1020030013820 A KR 1020030013820A KR 20030013820 A KR20030013820 A KR 20030013820A KR 100962306 B1 KR100962306 B1 KR 100962306B1
- Authority
- KR
- South Korea
- Prior art keywords
- master
- slave
- virtual
- data
- bus protocol
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
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/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
- G06F13/4286—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0016—Inter-integrated circuit (I2C)
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Communication Control (AREA)
- Information Transfer Systems (AREA)
Abstract
본발명은 두개의 CPU를 사용하는 임베디드(Embedded) 시스템의 양방향 데이터 통신장치에 관한 것으로 I2C버스 프로토콜을 이용하여 쌍방간에 데이터 통신을 행하는 직렬데이터 통신장치에 있어서, 매스터 IC, 슬레이브 IC, 상기 매스터 IC와 슬레이브 IC를 I2C버스 프로토콜로 통신이 이루어지게 하는 데이터라인과 클럭라인등으로 구성된 통신라인 및 상기 슬레이브 IC가 상기 매스터 IC를 호출하기 위한 호출신호로 구성하여 상기 매스터IC와 슬레이브IC가 상호 호출을 할 수 있도록 구성된다. 또한, 매스터 IC와 슬레이브 IC간에 I2C버스 프로토콜에 의하여 통신이 이루어지는 임베디드 시스템에 있어서, 슬레이브 IC가 매스터 IC를 호출하는 단계, 매스터 IC가 인터럽트를 발생하는 단계 및 매스터 IC가 I2C버스 프로토콜을 사용하여 슬레이브 IC와 데이터를 송수신하는 단계로 구성된다. 또한, 통상의 매스터 IC의 기능 및 가상의 슬레이브 IC의 기능을 갖는 매스터 IC와 통상의 슬레이브 IC의 기능 및 가상의 매스터 IC의 기능을 갖는 슬레이브 IC간에 I2C버스 프로토콜에 의하여 통신이 이루어지는 임베디드 시스템에 있어서, 슬레이브 IC가 매스터 IC를 호출하는 단계, 상기 매스터 IC가 가상 슬레이브 IC로 그 기능이 전환되고 상기 슬레이브 IC가 가상 매스터 IC로 그 기능을 전환하는 단계 및 상기 전환단계 후 상기 가상 매스터 IC가 I2C버스 프로토콜을 사용하여 상기 가상 슬레이브 IC와 데이터를 송수신하는 단계로 이루어진다.The present invention relates to a bidirectional data communication device of an embedded system using two CPUs, and has a master IC, a slave IC, and the master IC in a serial data communication device that performs data communication between both sides using an I2C bus protocol. And the communication line composed of a data line and a clock line for communicating the slave IC to the I2C bus protocol, and a call signal for the slave IC to call the master IC so that the master IC and the slave IC make mutual calls. Configured to do so. Also, in an embedded system in which communication is performed between the master IC and the slave IC by the I2C bus protocol, the slave IC calls the master IC, the master IC generates an interrupt, and the master IC uses the I2C bus protocol to slave. Transmitting and receiving data with the IC. Also, in an embedded system in which communication is carried out by an I2C bus protocol between a master IC having a function of a normal master IC and a function of a virtual slave IC and a slave IC having a function of a normal slave IC and a function of a virtual master IC. Calling the master IC by the slave IC; switching the function of the master IC to the virtual slave IC; and switching the function of the slave IC to the virtual master IC; and after the switching step, the virtual master IC performs an I2C bus. Transmitting and receiving data with the virtual slave IC using a protocol.
상기한 구성의 임베디드 시스템의 양방향 데이터 통신장치 및 그 방법은 슬 레이브 IC들도 필요한 경우 매스터 IC를 호출할 수 있도록 하여 매스터로 지정된 CPU나 IC를 호출하여 필요한 정보를 송수신할 수 있도록 하는 효과가 있는 것이다.The bidirectional data communication apparatus and method of the embedded system of the above-described configuration have the effect of allowing the slave ICs to call the master IC, if necessary, to send and receive necessary information by calling the CPU or IC designated as the master. will be.
I2C프로토콜, 호출신호, 인터럽트I2C protocol, call signal, and interrupt
Description
도 1은 I2C 버스 프로토콜의 일반적인 인터페이스회로,1 is a general interface circuit of the I2C bus protocol,
도 2는 고유주소(Slave Address)가 "88h"인 슬레이브 IC의 데이터 전송 포멧,2 is a data transmission format of a slave IC having a slave address of "88h";
도 3은 본발명의 일실시예에 따른 임베디드 시스템의 양방향 데이터 통신장치의 블럭도, 그리고3 is a block diagram of an apparatus for bidirectional data communication in an embedded system according to an embodiment of the present invention; and
도 4는 도 4는 본 발명의 일 실시예에 따른 임베디드 시스템의 양방향 데이터 통신장치를 설명하기 위한 흐름도이다.4 is a flow chart illustrating a bidirectional data communication apparatus of the embedded system according to an embodiment of the present invention.
*도면의 주요 부분에 대한 부호 설명*Description of the Related Art [0002]
100 : 매스터 IC 120 : 호출신호입력단자100: master IC 120: call signal input terminal
200 : 슬레이브 IC 220 : 호출신호출력단자200: slave IC 220: call signal output terminal
221 : 호출신호221: call signal
본발명은 두개의 CPU를 사용하는 임베디드(Embedded) 시스템의 양방향 데이 터 통신장치에 관한 것으로 상세하게는, I2C 버스 프로토콜을 이용하여 슬레이브 IC와 매스터 IC간에 데이터를 송수신할 수 있는 양방향 데이터 통신장치에 관한 것이다.The present invention relates to a bidirectional data communication device of an embedded system using two CPUs. Specifically, the present invention relates to a bidirectional data communication device capable of transmitting and receiving data between a slave IC and a master IC using an I2C bus protocol. It is about.
최근들어 복잡한 제품의 기능을 제어하기 위하여 제어 프로그램이 내장된 CPU나 IC들을 복수 개 사용하여 시스템을 제어하고 통신을 하는 제품들이 많이 사용되고 있다. 이러한 CPU나 IC들이 효과적으로 통신을 하기 위한 여러가지 방법이 제시되어 있으나 적은 수의 통신라인을 이용하여 여러개의 IC들이 통신을 할 수 있는 I2C버스 프로토콜을 많이 사용하고 있다. Recently, to control the functions of complex products, many products that control and communicate with a system using a plurality of CPUs or ICs in which a control program is embedded are used. There are various ways to communicate effectively with these CPUs and ICs, but I2C bus protocols that use a small number of communication lines to communicate with multiple ICs are widely used.
도 1은 I2C 버스 프로토콜의 일반적인 인터페이스회로로서 I2C 버스 프로토콜은 마스터(Master) IC(10)와 슬레이브(Slave) IC(20~n)들로 구성되며 Master IC(10)의 데이터 라인(SDA;11)과 Slave IC(20~n)의 데이터라인(21~n1)이 상호 연결되어 있다. 또한, Master IC(10)의 클럭 라인(SCL;12)과 Slave IC(20~n)의 클럭라인(22~n2)이 상호 연결되어 있으며 상기 각 라인에는 전원라인에 연결된 저항(30)이 각각 연결되어 있다. 상기 Slave IC(20~n)들은 각각 고유한 주소(Slave Address)를 갖고 있으며 마스터 IC(10)가 특정 슬레이브(Slave) IC와 통신을 하고자 할 때는 상기 해당 슬레이브(Slave) IC의 고유 주소(Slave Address)를 이용하여 송수신을 하게 된다. 즉 도 2에서와 같이 고유주소(Slave Address)가 "88h"인 슬레이브 IC의 데이터 전송 포멧을 이용하여 상세히 설명한다. 도면에는 쓰기모드(Write Mode)와 읽기모드(Read Mode)로 구분되어 있다. 음영친 부분의 대문자들은 I2C버스 프로토콜로 데이터를 송수신하기 위하여 마스터(Master) IC(10) 와 슬레이브(Slave) IC(20~n)간에 서로 주고 받는 약속의 신호들이다. 즉, "S"의 표기는 송수신을 하기 위한 스타트 컨디션(Start Condition)으로써 마스터(Master) IC가 클럭라인(SCL)을 "high level"로 유지하면서 데이터라인(SDA)을 "high level"에서 "low level"로 변화시키면 송수신을 시작하자는 의미의 신호가 되는 것이다. 표기 "A"는 데이터를 주고 받을 때 상대측에서 인식(Acknowledgment)했다는 신호이며 "P" 표기는 송수신을 중단하기 위한 스탑 컨디션(Stop Condition)으로써 "Acknowledgment" 와 동시에 Master IC가 클럭라인(SCL)을 "high level"로 유지하면서 데이터라인(SDA)을 "low level"에서 "high level"로 변화시키면 송수신을 종료하자는 의미의 신호가 되는 것이다.1 is a general interface circuit of the I2C bus protocol. The I2C bus protocol is composed of a
또한, 데이터의 전송은 클럭라인(SCL)을 "low level"에서 "high level"로 변화시키면서 데이터라인(SDA)의 값을 유지하면 되는 것이다. 통상 데이터 전송은 9 비트(bits)단위로 수행되며 8 비트의 데이터와 1 비트의 인식신호(Acknowledgment)인 "A"로 구성된다. 즉, 선택된 Slave IC가 데이터의 9 비트째를 수신할 때 데이터라인(SDA)을 "low level"로 유지하여 데이터를 송수신하였다는 인식신호(Acknowledgment)인 "A"를 Master IC로 송신하면 정상적으로 데이타의 송수신이 이루어졌음을 인식하게 되는 것이다.In addition, the data transfer may be performed by changing the clock line SCL from "low level" to "high level" while maintaining the value of the data line SDA. In general, data transmission is performed in units of 9 bits and consists of 8 bits of data and 1 bit of acknowledgment "A". That is, when the selected slave IC receives the ninth bit of data, if it transmits the acknowledgment signal "A" to the master IC to keep the data line SDA at "low level" and transmit and receive data, the data is normally transmitted. It will be recognized that the transmission and reception of.
표기 "W"는 쓰기 모드(Write Mode)신호이며 해당 비트를 "low level"로 표시하며 표기 "R"는 읽기모드(Read Mode)신호로서 통상 해당 비트를 "high level"로 표시하여 송수신하는 것이다.The notation "W" is a write mode signal and the corresponding bit is displayed as "low level", and the notation "R" is a read mode signal and the corresponding bit is marked as "high level" to transmit and receive. .
먼저 쓰기모드(Write Mode)에 대하여 설명한다. 고유주소(Slave Address)가 "88h"인 슬레이브 IC를 호출하고 상기 슬레이브 IC의 "5"번지에 "31"이라는 데이터를 저장하는 것을 일례로 설명한다. 먼저 통신을 갯하기 위하여 매스터IC(10)는 스타트 컨디션(Start Condition)을 생성하고 8비트 주소(Slave address)란에 해당되는 "88h"라는 데이터를 입력하여 고유주소가 "88h"인 슬레이브 IC가 선택되도록 하다. 그 다음 데이터를 저장한다는 "low level"의 "W"신호를 입력하여 클럭에 동기하여 전송한다. 고유주소가 "88h"인 슬레이브 IC가 응답을 하게 되며 그 응답은 상기 데이터를 수신하였다는 인식신호(Acknowledge)인 "A"신호를 전송한다. 상기 인식신호(Acknowledge)인 "A"신호를 받은 매스터 IC는 이후 데이터를 저장할 주소인 5번지를 지정하여 송신하게 되고, 상기 슬레이브 IC로부터 인식신호(Acknowledge)인 "A"신호를 확인하여 송신여부를 판단한다. 그런 다음 저장할 데이터에 해당하는 값(31h)을 송신하고 다시 인식신호(Acknowledge)인 "A"신호를 확인하는 것이다. 즉, 송신측과 수신측이 상호 데이터를 송신하면 상대측으로부터 인식신호(Acknowledge)인 "A"신호를 수신하여 정상적으로 신호가 송수신되었음을 확인하는 것이다. 상기 단계에서 데이터를 전송받은 슬레이브 IC는 전송된 데이터값(31h)을 내장된 레지스터의 지정 주소인 5번지 주소에 저장하는 것이다. 모든 데이터의 송수신이 완료되면 스톱 컨디션(Stop Condition)으로 데이터의 전송을 종료하게 된다. First, the write mode will be described. An example of calling a slave IC having a slave address of "88h" and storing data "31" at address "5" of the slave IC will be described. First, in order to enable communication, the
읽기모드(Read Mode)에 대하여 설명한다. 매스터 IC가 다시 슬레이브 IC로부터 지정된 주소에 저장된 데이터를 읽어오는 과정이다. 먼저 매스터 IC가 스타트 컨디션(Start Condition)을 생성하고 고유주소(Slave address)란에 "88h"라는 데이 터를 입력하고 "W"신호를 송신한 다음 인식신호(Acknowledge)인 "A"신호를 받고 데이터가 저장되어 있는 주소인 5번지를 지정하게 된다. 매스터 IC는 인식신호(Acknowledge)인 "A"신호를 확인하고 스탑 컨디션(Stop Condition)으로 데이터의 전송을 종료하게 되면 지정된 슬레이브 IC는 해당되는 주소와 함께 그 주소에 저장된 데이터를 읽어 전송한다는 "high level"의 "R"신호를 전송하게 되면 매스터 IC는 주소가 일치한다는 인식신호(Acknowledge)인 "A"신호를 전송하게 된다. 매스터 IC로부터 인식신호(Acknowledge)를 전송받은 슬레이브 IC는 해당 주소에 저장되어 있는 데이터값(31h)을 레지스터에서 독취하여 전송을 하게 되고 스탑 컨디션(Stop Condition)으로 데이터의 전송을 완료하게 되는 것이다. The read mode will be described. The master IC reads back the data stored at the specified address from the slave IC. First, the master IC creates a start condition, inputs the data "88h" in the slave address field, transmits the "W" signal, and receives the "A" signal, which is an acknowledgment signal. Address 5, the address where data is stored, is designated. The master IC checks the "A" signal, which is an acknowledgment signal, and terminates data transfer in the stop condition. The designated slave IC reads and transmits the data stored at the address along with the corresponding address. When transmitting the "R" signal of "level", the master IC transmits the "A" signal, which is an acknowledgment that the address matches. The slave IC receiving the acknowledgment signal from the master IC reads the data value 31h stored in the corresponding address from the register and transmits the data, and completes the data transfer in the stop condition.
상기와 같은 I2C버스 프로토콜을 이용한 양방향 통신은 1개의 매스터 IC가 여러개의 슬레이브 IC들과 필요한 통신을 하기에는 편리한 방식이다. 슬레이브 IC를 지정하고 특정한 주소에 데이터를 저장할 수도 있으며 미리 약속된 주소에 저장되어 있는 데이터를 읽어올 수도 있다. 즉, 각 슬레이브 IC들이 수집한 정보들을 매스터 IC가 임의로 호출하여 사용할 수가 있다는 장점때문이다. 또한, 공용의 클럭라인과 데이터라인만을 사용하므로 시스템이 간단해진다는 장점이 있다. Bidirectional communication using the I2C bus protocol as described above is a convenient way for one master IC to communicate with several slave ICs. You can designate a slave IC, store data at a specific address, or read data stored at a pre-defined address. That is, the master IC can arbitrarily call and use the information collected by each slave IC. In addition, there is an advantage that the system is simplified because only the common clock line and data line are used.
그러나 상기의 I2C버스 프로토콜은 매스터 IC만 슬레이브 IC를 호출할 수 있다는 단점을 갖고 있다. 슬레이브 IC들은 필요한 경우 매스터 IC를 호출할 수 없기때문에 진정한 양방향 통신이 될 수가 없는 것이다. 필요한 경우 슬레이브 IC들이 매스터 IC를 호출할 수가 없기때문에 항상 매스터 IC가 동작해 주기를 기다려야만 하는 문제가 발생하는 것이다.However, the I2C bus protocol has a disadvantage in that only the master IC can call the slave IC. Slave ICs cannot call the master IC when needed, so there is no true bidirectional communication. If necessary, the slave ICs cannot call the master IC, which causes a problem of waiting for the master IC to operate.
본 발명은 상기한 문제점을 해결하기 위한 것으로서, 2개의 CPU를 사용하는 임베디드(Embedded) 시스템에서 I2C버스 프로토콜을 이용하여 슬레이브 IC도 매스터로 지정된 CPU나 IC를 호출하여 필요한 정보를 송수신할 수 있는 장치를 제공하고자 하는 것이다.An object of the present invention is to solve the above problems, an apparatus capable of transmitting and receiving necessary information by calling a CPU or IC designated as a master using a I2C bus protocol in an embedded system using two CPUs. Is to provide.
상기와 같은 목적을 달성하기 위한 본 발명에 따른 임베디드 시스템의 양방향 데이터 통신장치의 바람직한 일실시예로는 I2C버스 프로토콜을 이용하여 쌍방간에 데이터 통신을 행하는 직렬데이터 통신장치에 있어서, 매스터 IC, 슬레이브 IC, 상기 매스터 IC와 슬레이브 IC를 I2C버스 프로토콜로 통신이 이루어지게 하는 데이터라인과 클럭라인등으로 구성된 통신라인 및 상기 슬레이브 IC가 상기 매스터 IC를 호출하기 위한 호출신호로 구성하여 상기 매스터IC와 슬레이브IC가 상호 호출을 할 수 있도록 하여 양방향 데이터 통신이 가능하도록 한다.A preferred embodiment of the bidirectional data communication device of the embedded system according to the present invention for achieving the above object is a master IC, a slave IC in the serial data communication device for performing data communication between both sides using the I2C bus protocol The master IC and the slave IC are configured by a communication line including a data line and a clock line for communication between the master IC and the slave IC using an I2C bus protocol, and a call signal for the slave IC to call the master IC. Two-way data communication is possible.
상기 슬레이브IC로부터 상기 호출신호를 수신한 매스터IC는 슬레이브IC를 호출하도록 데이터를 출력하고, 상기 매스터 IC는 I2C버스 프로토콜을 이용하여 슬레이브 IC를 호출하고 상기 슬레이브 IC가 상기 매스터 IC를 호출하고자 하는 경우에는 먼저 상기 슬레이브 IC가 인터럽트신호를 매스터 IC로 전송하고 상기 인터럽트신호를 전송받은 매스터 IC가 I2C버스 프로토콜을 이용하여 슬레이브 IC를 호출하도록 하는 것을 특징으로 하여 이루어지는 것이다.When the master IC receiving the call signal from the slave IC outputs data to call the slave IC, the master IC calls the slave IC using the I2C bus protocol, and the slave IC intends to call the master IC. First, the slave IC transmits an interrupt signal to the master IC, and the master IC receiving the interrupt signal calls the slave IC using the I2C bus protocol.
바람직하게는 상기 슬레이브IC는 매스터IC로 동작되기 위한 프로그램이 추가 되어 있으며 상기 매스터 IC는 슬레이브 IC로 동작되기 위한 프로그램이 더 추가되어 있는 것을 특징으로 하며 상기 슬레이브IC로부터 상기 응답요청신호를 수신한 매스터IC는 슬레이브IC로 전환되고 상기 슬레이브IC는 매스터IC로 전환되어 상호 데이터를 송수신하게하여 양방향 통신이 가능하도록 하는 것이다.Preferably, the slave IC has a program for operating as a master IC, and the master IC further includes a program for operating as a slave IC, and the master receiving the response request signal from the slave IC. The IC is switched to the slave IC and the slave IC is converted to the master IC to transmit and receive data to each other to enable bidirectional communication.
또한, 상기와 같은 목적을 달성하기 위한 본 발명에 따른 임베디드 시스템의 양방향 데이터 통신방법으로서는 매스터 IC와 슬레이브 IC간에 I2C버스 프로토콜에 의하여 통신이 이루어지는 임베디드 시스템에 있어서, 슬레이브 IC가 매스터 IC를 호출하는 단계, 매스터 IC가 인터럽트를 발생하는 단계 및 매스터 IC가 I2C버스 프로토콜을 사용하여 슬레이브 IC와 데이터를 송수신하는 단계로 이루어진다.In addition, the bidirectional data communication method of the embedded system according to the present invention for achieving the above object, in the embedded system in which the communication between the master IC and the slave IC by the I2C bus protocol, the slave IC calling the master IC The master IC generates an interrupt and the master IC transmits and receives data to and from the slave IC using the I2C bus protocol.
매스터 IC를 호출하는 단계는 슬레이브 IC가 호출신호를 매스터 IC로 출력하여 이루어지도록 한다.The calling of the master IC is performed by the slave IC outputting the call signal to the master IC.
또한, 상기와 같은 목적을 달성하기 위한 본 발명에 따른 임베디드 시스템의 양방향 데이터 통신방법의 다른 실시예로서는 통상의 매스터 IC의 기능 및 가상의 슬레이브 IC의 기능을 갖는 매스터 IC와 통상의 슬레이브 IC의 기능 및 가상의 매스터 IC의 기능을 갖는 슬레이브 IC간에 I2C버스 프로토콜에 의하여 통신이 이루어지는 임베디드 시스템에 있어서, 슬레이브 IC가 매스터 IC를 호출하는 단계, 상기 매스터 IC가 가상 슬레이브 IC로 그 기능이 전환되고 상기 슬레이브 IC가 가상 매스터 IC로 그 기능을 전환하는 단계 및 상기 전환단계 후 상기 가상 매스터 IC가 I2C버스 프로토콜을 사용하여 상기 가상 슬레이브 IC와 데이터를 송수신하는 단계로 이루어진다. In addition, another embodiment of the bidirectional data communication method of the embedded system according to the present invention for achieving the above object is the function of the master IC and the normal slave IC having the function of the normal master IC and the virtual slave IC and An embedded system in which communication is performed by an I2C bus protocol between slave ICs having a function of a virtual master IC, wherein the slave IC calls a master IC, the master IC switches its function to a virtual slave IC, and the slave IC Switching the function to the virtual master IC, and after the switching, the virtual master IC transmits and receives data to and from the virtual slave IC using an I2C bus protocol.
상기 가상 매스터 IC와 상기 가상 슬레이브 IC간에 데이터 송수신이 완료된 상태에서는 각각 슬레이브 IC와 매스터 IC로 복귀되는 단계를 더 포함하여 이루어진다.The method may further include returning to the slave IC and the master IC in the state where data transmission / reception is completed between the virtual master IC and the virtual slave IC.
이하 첨부한 도면을 참고하여 본 발명의 일실시예에 대하여 상세히 설명하기로 한다.Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings.
도 3은 본발명의 일실시예에 따른 임베디드 시스템의 양방향 데이터 통신장치의 블럭도이다. 매스터 IC(100)는 I2C버스 프로토콜로 통신하기 위한 I2C 인터페이스부(I2C I/F;110)와 슬레이브 IC(200)가 매스터IC(100)의 인터럽트를 요청하는 호출신호 입력단자(120)로 구성되어 있으며 슬레이브 IC(200)는 I2C버스 프로토콜로 통신하기 위한 I2C 인터페이스부(I2C I/F;210)와 슬레이브 IC(200)가 매스터IC(100)를 호출하기 위한 호출신호 출력단자(220)로 구성된다. 또한, 매스터 IC(100)와 슬레이브 IC(200)는 I2C 인터페이스부(I2C I/F;110,210)를 통하여 데이타라인(SDA;240)과 클럭라인(SCL;230)이 상호 연결되어 있다.3 is a block diagram of an apparatus for bidirectional data communication in an embedded system according to an embodiment of the present invention. The
상기한 구성에서 I2C 버스 프로토콜을 이용한 데이터 송수신방법은 종래의 기술과 동일하므로 그 설명은 생략하고 도 4를 참조하여 본발명의 일실시예에 따른 동작에 대하여 설명한다.Since the data transmission and reception method using the I2C bus protocol in the above configuration is the same as the conventional technology, the description thereof will be omitted and operation according to an embodiment of the present invention will be described with reference to FIG. 4.
도 4는 본 발명의 일 실시예에 따른 임베디드 시스템의 양방향 데이터 통신장치를 설명하기 위한 흐름도이다4 is a flowchart illustrating a bidirectional data communication apparatus of an embedded system according to an exemplary embodiment of the present invention.
먼저 통상의 매스터 IC(100)가 슬레이브 IC(200)를 호출하여 기존의 I2C 버스 프로토콜로 양방향통신을 하다가 슬레이브 IC(200)가 매스터IC(100)를 호출할 필요가 발생한 경우 슬레이브 IC(200)는 호출신호 출력단자(220)를 통하여 호출신호(221)를 출력하게 되고(단계 S310) 호출신호 입력단자(120)를 통하여 호출신호(221)를 수신한 매스터 IC(100)는 인터럽트를 발생하여(단계 S320) 슬레이브 IC(200)와 통신을 할 준비를 하기 위하여 실행하던 프로그램을 일시 중지하고 I2C 인터페이스부(I2C I/F;110,210)를 통하여 호출한 슬레이브 IC를 호출하는 것이다(단계 S330). 이하 통상적인 I2C 프로토콜을 사용하여 상기 슬레이브 IC(200)의 모든 어드레스에 데이터를 저장하기 위하여 모든 데이터를 전부 전송하게 되는 것이다. 전송이 완료되었는지를 판단하여(단계 S340) 데이터 전송이 완료되지 않은 경우는 완료될 때까지 전송을 계속하고 데이타 전송이 완료되었거나 상기 단계 S310에서 호출신호가 수신되지 않은 경우는 송수신을 종료하는 것이다. 바람직하게는 슬레이브 IC(200)로 부터 호출신호(221)가 수신된 경우는 매스터 IC가 슬레이브 IC의 일정 어드레스에 데이터를 저장하는 것으로 미리 프로그램되어 있으면 모든 데이터를 전송할 필요없이 간단하고도 신속하게 슬레이브 IC가 필요한 데이터를 얻을 수가 있는 것이다. First, when the
도 5는 본 발명의 다른 실시예에 따른 임베디드 시스템의 양방향 데이터 통신장치를 설명하기 위한 흐름도이다5 is a flowchart illustrating a bidirectional data communication apparatus of an embedded system according to another exemplary embodiment of the present invention.
먼저 통상의 매스터 IC(100)가 슬레이브 IC(200)를 호출하여 기존의 I2C 버스 프로토콜로 양방향통신을 하다가 슬레이브 IC(200)가 매스터IC(100)를 호출할 필요가 발생한 경우 슬레이브 IC(200)는 호출신호 출력단자(220)를 통하여 호출신호(221)를 출력하게 되면(단계 S410) 호출신호 입력단자(120)를 통하여 호출신호(221)를 수신한 매스터 IC(100)는 인터럽트를 발생하고(단계 S420) 슬레이브 IC(200)와 통신을 할 준비를 하기 위하여 매스터 IC(100)는 슬레이브 IC로 전환되고 슬레이브 IC(200)는 매스터 IC로 그 기능을 전환한다(단계 S430). 본실시예에서는 매스터 IC와 슬레이브 IC는 상기 호출신호의 송수신에 의하여 각각 슬레이브 IC와 매스터 IC로 그 기능이 전환될 수 있도록 프로그램되어 있는 경우이다. 상기 단계 430에서 모드가 전환된 경우에는 호출신호를 발송한 슬레이브 IC(200)가 매스터 IC의 기능을 수행하고 종전의 매스터 IC(100)는 슬레이브 IC로 그 기능을 전환하여 I2C 버스 프로토콜을 이용하여 데이터 송수신을 하게 되는 것이다. 데이터 송수신이 완료되었는 지를 판단하여(단계 S440) 완료되지 않은 경우는 계속하여 송수신하고 완료된 경우에는 데이터의 송수신을 종료하게 되는 것이다.First, when the
이상에서 본 발명은 기재된 구체예에 대해서만 상세히 설명되었지만 본 발명의 기술사상 범위 내에서 다양한 변형 및 수정이 가능함은 당업자에게 있어서 명백한 것이며, 이러한 변형 및 수정이 첨부된 특허 청구범위에 속함은 당연한 것이다.Although the present invention has been described in detail only with respect to the described embodiments, it will be apparent to those skilled in the art that various modifications and variations are possible within the technical scope of the present invention, and such modifications and variations belong to the appended claims.
상기에서와 같이 본 발명에 따른 임베디드 시스템의 양방향 데이터 통신장치 및 그 방법에 의하면, 슬레이브 IC들도 필요한 경우 매스터 IC를 호출할 수 있도록 하여 매스터로 지정된 CPU나 IC를 호출하여 필요한 정보를 송수신할 수 있도록 하는 효과가 있는 것이다.As described above, according to the bidirectional data communication apparatus and method of the embedded system according to the present invention, the slave ICs can also call the master IC when necessary so that the CPU or IC designated as the master can be called to transmit and receive necessary information. It is effective to ensure that.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020030013820A KR100962306B1 (en) | 2003-03-05 | 2003-03-05 | Bidirectional Data Communication Device of Embedded System and Its Method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020030013820A KR100962306B1 (en) | 2003-03-05 | 2003-03-05 | Bidirectional Data Communication Device of Embedded System and Its Method |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20040078972A KR20040078972A (en) | 2004-09-14 |
KR100962306B1 true KR100962306B1 (en) | 2010-06-10 |
Family
ID=37364044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020030013820A Expired - Fee Related KR100962306B1 (en) | 2003-03-05 | 2003-03-05 | Bidirectional Data Communication Device of Embedded System and Its Method |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100962306B1 (en) |
-
2003
- 2003-03-05 KR KR1020030013820A patent/KR100962306B1/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
KR20040078972A (en) | 2004-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5958024A (en) | System having a receive data register for storing at least nine data bits of frame and status bits indicating the status of asynchronous serial receiver | |
KR20040076730A (en) | Serial communication interface apparatus of hybrid type adaptable to high peformance wireless lan and method of the same | |
US5896549A (en) | System for selecting between internal and external DMA request where ASP generates internal request is determined by at least one bit position within configuration register | |
KR100348545B1 (en) | Communication dma device | |
KR100962306B1 (en) | Bidirectional Data Communication Device of Embedded System and Its Method | |
KR970007257B1 (en) | Packet transmission system and method utilizing both data bus and dedicated control lines | |
JP3134821B2 (en) | Communications system | |
KR100361511B1 (en) | Multi-Function Serial Communication Interface Device | |
JP2003258922A (en) | Communication device using three-step communication buffer | |
US7032061B2 (en) | Multimaster bus system | |
JP2004334551A (en) | Serial communication system and local terminal for serial communication | |
JP2639248B2 (en) | Communication interface device | |
JP2006079621A (en) | Digital programming interface between baseband processor and radio frequency integrated module | |
JPH10207834A (en) | Serial input/output circuit | |
KR100295683B1 (en) | General call acknowledge apparatus and method for inter-integrated circuit | |
JPH0546535A (en) | Data transfer interface device | |
JP2005251095A (en) | USB device | |
KR100299572B1 (en) | Interface device between microprocessor and peripherals equipped with burst mode bus | |
KR100192523B1 (en) | Shared fax and how to deliver it | |
JP2821320B2 (en) | Home bus protocol controller | |
JPH041544B2 (en) | ||
JP2001136186A (en) | Multiple communication equipment | |
JPH07319841A (en) | Serial control device | |
JPH08265393A (en) | Serial communication method and serial communication controller | |
JPH0461388B2 (en) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20030305 |
|
PG1501 | Laying open of application | ||
A201 | Request for examination | ||
PA0201 | Request for examination |
Patent event code: PA02012R01D Patent event date: 20080229 Comment text: Request for Examination of Application Patent event code: PA02011R01I Patent event date: 20030305 Comment text: Patent Application |
|
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20091030 Patent event code: PE09021S01D |
|
N231 | Notification of change of applicant | ||
PN2301 | Change of applicant |
Patent event date: 20091230 Comment text: Notification of Change of Applicant Patent event code: PN23011R01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20100427 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20100601 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20100603 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration | ||
FPAY | Annual fee payment |
Payment date: 20130530 Year of fee payment: 4 |
|
PR1001 | Payment of annual fee |
Payment date: 20130530 Start annual number: 4 End annual number: 4 |
|
FPAY | Annual fee payment |
Payment date: 20140522 Year of fee payment: 5 |
|
PR1001 | Payment of annual fee |
Payment date: 20140522 Start annual number: 5 End annual number: 5 |
|
FPAY | Annual fee payment |
Payment date: 20150526 Year of fee payment: 6 |
|
PR1001 | Payment of annual fee |
Payment date: 20150526 Start annual number: 6 End annual number: 6 |
|
LAPS | Lapse due to unpaid annual fee | ||
PC1903 | Unpaid annual fee |
Termination category: Default of registration fee Termination date: 20170509 |