KR101490823B1 - Apparatus of universal inter-integrated circuit interface for controlling devices using fpga and communication method for using the same - Google Patents

Apparatus of universal inter-integrated circuit interface for controlling devices using fpga and communication method for using the same Download PDF

Info

Publication number
KR101490823B1
KR101490823B1 KR20120062078A KR20120062078A KR101490823B1 KR 101490823 B1 KR101490823 B1 KR 101490823B1 KR 20120062078 A KR20120062078 A KR 20120062078A KR 20120062078 A KR20120062078 A KR 20120062078A KR 101490823 B1 KR101490823 B1 KR 101490823B1
Authority
KR
South Korea
Prior art keywords
fpga
mcu
data signal
receiving
serial data
Prior art date
Application number
KR20120062078A
Other languages
Korean (ko)
Other versions
KR20130138472A (en
Inventor
서승범
Original Assignee
삼성탈레스 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성탈레스 주식회사 filed Critical 삼성탈레스 주식회사
Priority to KR20120062078A priority Critical patent/KR101490823B1/en
Publication of KR20130138472A publication Critical patent/KR20130138472A/en
Application granted granted Critical
Publication of KR101490823B1 publication Critical patent/KR101490823B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/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/4291Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol
    • 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/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1689Synchronisation and timing concerns

Abstract

본 발명은 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치 및 이를 이용한 통신 방법에 관한 것으로서, FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치는 I2C(Inter-Integrated Circuit) 버스에 연결된 주변 장치로부터 직렬 데이터 신호를 수신하여 MCU(Micro Controller Unit)에서 처리할 수 있는 데이터 구조로 변환하여 출력하는 FPGA수신부, 상기 MCU로부터 데이터를 수신하고, 상기 수신된 데이터를 직렬 데이터 신호로 변환하여 상기 주변 장치로 송신하는 FPGA송신부 및 상기 MCU와 연결되고, 상기 연결된 MCU로부터 송수신 명령을 받아 상기 FPGA수신부 및 상기 FPGA송신부의 동작을 제어하고, 상기 MCU와 상기 주변 장치를 동기화시키기 위한 클럭을 발생시켜 I2C 버스를 통해 출력하고, 상기 FPGA수신부 및 상기 FPGA송신부가 상기 직렬 데이터 신호를 상기 클럭에 동기화시켜 송수신하도록 제어하는 FPGA제어부를 포함하도록 구성될 수 있다. 상기와 같은 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치 및 이를 이용한 통신 방법에 따르면, 간단한 구성과 대화형 프로토콜을 통해 하드웨어 안정성과 모든 시스템에 유용하게 적용할 수 있는 호환성을 갖는 효과가 있다. The present invention relates to a general-purpose I2C interface device for controlling a device using an FPGA and a communication method using the same, and a general-purpose I2C interface device for controlling the device using an FPGA includes a serial data signal from a peripheral device connected to an I2C (Inter- An FPGA receiving unit for receiving the data and converting the data into a data structure that can be processed by a microcontroller unit (MCU) and outputting the converted data structure, an FPGA transmitter for receiving data from the MCU, converting the received data to a serial data signal, And a control unit connected to the MCU and receiving a transmission / reception command from the connected MCU to control operation of the FPGA receiving unit and the FPGA transmitting unit, generating a clock for synchronizing the MCU and the peripheral device, and outputting the clock through the I2C bus, Wherein the FPGA receiving unit and the FPGA transmitting unit transmit the serial data signal to the clock And an FPGA control unit for controlling transmission and reception of the data. According to the general-purpose I2C interface device for controlling the device using the FPGA and the communication method using the FPGA, there is an effect that the hardware stability and compatibility that can be applied to all systems are compatible through a simple configuration and an interactive protocol.

Description

FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치 및 이를 이용한 통신 방법{APPARATUS OF UNIVERSAL INTER-INTEGRATED CIRCUIT INTERFACE FOR CONTROLLING DEVICES USING FPGA AND COMMUNICATION METHOD FOR USING THE SAME}Field of the Invention [0001] The present invention relates to a general-purpose I2C interface device for controlling a device using an FPGA and a communication method using the same. [0002]

본 발명은 I2C 인터페이스 장치에 관한 것으로서, 좀 더 상세하게는 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치에 관한 것이다.The present invention relates to an I2C interface device, and more particularly, to a general purpose I2C interface device for controlling a device using an FPGA.

마이크로 프로세서와 다른 주변 장치들을 연결하는 방식은 일반적으로 어드레스/데이터 버스 방식을 사용한다. 하지만 이 같은 방식은 장치마다 많은 핀의 사용을 요구하기 때문에 PCB를 소형화시키는데 어려움이 있다. The connection between the microprocessor and other peripherals generally uses an address / data bus scheme. However, this method requires many pins for each device, which makes it difficult to downsize the PCB.

이러한 어려움을 해결하고자 1980년대 Philips사에서 제안한I2C(Inter-Integrated Circuit)는 짧은 통신거리용 직렬 인터페이스로 데이터 전송을 위해 오직 2개의 버스라인만이 필요하다. 두 개의 I/O 핀만으로 최대 400kb/s의 속도로 데이터를 주고받을 수 있다. 또한, 점대점 방식(point-to-point)이 아니라 멀티 포인트(multi-point) 방식을 지원하기 때문에 I2C 버스에는 연속적으로 디바이스들이 연결될 수 있다. 원래 TV 보드상의 CPU와 주변 장치가 쉽게 통신을 할 수 있게 하기 위해 개발되었는데 오늘날에는 많은 임베디드 시스템에서 컨트롤러와 저속 주변장치(외장 EEPROM, 디지털 센서, LCD 드라이버 등)과 통신용도로 사용되고 있다.To address this difficulty, the I2C (Inter-Integrated Circuit) proposed by Philips in the 1980s requires only two bus lines for data transmission with a serial interface for a short distance. With only two I / O pins, data can be exchanged at speeds up to 400kb / s. In addition, because it supports multi-point rather than point-to-point, devices can be connected continuously to the I2C bus. Originally developed to enable easy communication between CPUs and peripherals on TV boards, today many embedded systems are used for communication with controllers and low-speed peripherals (external EEPROMs, digital sensors, LCD drivers, etc.).

하지만, 여러 가지 장점에도 불구하고 I2C 버스를 이용한 통신은 특정 I2C 통신용 모듈이 장착된 컨트롤러에서만 사용이 가능하기 때문에, 다양한 장치에 범용으로 적용할 수 있는 호환성을 확보하기에 어려운 경우가 대부분이다. 따라서, I2C 모듈이 장착되어 있지 않는 컨트롤러에서도 I2C 버스를 이용한 통신을 할 수 있도록 I2C 프로토콜에 따라 데이터를 변환해주고 송수신하는 범용 인터페이스 장치가 필요하다. 또한, 두 라인만을 이용하는 I2C 통신의 특성에 맞추어 범용 I2C 인터페이스 장치 역시 간단한 구성을 가진 소형 회로로 이루어질 필요성이 있다.
However, in spite of its many advantages, communication using the I2C bus can be used only by a controller equipped with a specific I2C communication module, so that it is often difficult to ensure compatibility that can be universally applied to various devices. Therefore, a controller that does not have an I2C module needs a general-purpose interface device that converts and transmits / receives data according to the I2C protocol so that communication using the I2C bus can be performed. In addition, in order to meet the characteristics of I2C communication using only two lines, it is necessary to make a general-purpose I2C interface device with a small-sized circuit having a simple configuration.

본 발명의 목적은 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 제공하는 데 있다.An object of the present invention is to provide a general-purpose I2C interface device for controlling a device using an FPGA.

본 발명의 다른 목적은 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법을 제공하는 데 있다.It is another object of the present invention to provide a communication method using a general-purpose I2C interface device for controlling a device using an FPGA.

상술한 본 발명의 목적에 따른 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치는 I2C(Inter-Integrated Circuit) 버스에 연결된 주변 장치로부터 직렬 데이터 신호를 수신하여 MCU(Micro Controller Unit)에서 처리할 수 있는 데이터 구조로 변환하여 출력하는 FPGA수신부, 상기 MCU로부터 데이터를 수신하고, 상기 수신된 데이터를 직렬 데이터 신호로 변환하여 상기 주변 장치로 송신하는 FPGA송신부 및 상기 MCU와 연결되고, 상기 연결된 MCU로부터 송수신 명령을 받아 상기 FPGA수신부 및 상기 FPGA송신부의 동작을 제어하고, 상기 MCU와 상기 주변 장치를 동기화시키기 위한 클럭을 발생시켜 I2C 버스를 통해 출력하고, 상기 FPGA수신부 및 상기 FPGA송신부가 상기 직렬 데이터 신호를 상기 클럭에 동기화시켜 송수신하도록 제어하는 FPGA제어부를 포함하도록 구성될 수 있다. The general-purpose I2C interface device for controlling devices using the FPGA according to the above-described object of the present invention receives serial data signals from a peripheral device connected to an I2C (Inter-Integrated Circuit) bus and outputs data An FPGA transmitter for receiving data from the MCU and converting the received data to a serial data signal and transmitting the serial data signal to the peripheral device; and an FPGA transmitter connected to the MCU, And outputs the serial data signal to the FPGA receiver and the FPGA transmitter through the I2C bus, and controls the operation of the FPGA receiver and the FPGA transmitter to generate a clock for synchronizing the MCU and the peripheral device, And an FPGA control unit for controlling the transmission and reception of the signals in synchronization with each other.

그리고 상기 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치는 상기 MCU가 I2C의 마스터(Master) 장치로 작동하고, 하나 또는 두 개 이상의 주변 장치가 I2C의 슬레이브(Slave) 장치로 작동하도록 구성되는 것이 바람직하다. 여기에서, 상기 주변 장치는 내부 메모리, 센서 또는 출력 장치일 수 있다. The general purpose I2C interface device for controlling a device using the FPGA is preferably configured such that the MCU operates as an I2C master device and one or more peripheral devices operate as a slave device of the I2C . Here, the peripheral device may be an internal memory, a sensor, or an output device.

상술한 본 발명의 다른 목적에 따른 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법은 FPGA제어부가 MCU(Micro Controller Unit)로부터 데이터 송수신 명령을 받고, 상기 MCU와 상기 주변 장치를 동기화시키기 위한 클럭을 발생시켜 I2C 버스를 통해 출력하는 단계, 상기 MCU로부터 데이터 수신 명령을 받은 경우, FPGA수신부가 I2C 버스에 연결된 주변 장치로부터 직렬 데이터 신호를 수신하고, 상기 MCU로부터 데이터 송신 명령을 받은 경우, FPGA송신부가 상기 MCU로부터 데이터를 수신하는 단계 및 상기 MCU로부터 데이터 수신 명령을 받은 경우, 상기 FPGA수신부가 상기 수신된 직렬 데이터 신호를 상기 클럭에 동기화시켜 MCU에서 처리할 수 있는 데이터 구조로 변환하여 출력하고, 상기 MCU로부터 데이터 송신 명령을 받은 경우, FPGA송신부가 상기 수신된 데이터를 직렬 데이터 신호로 변환하여 상기 클럭에 동기화시켜 상기 주변 장치로 송신하는 단계를 포함하도록 구성될 수 있다. Another object of the present invention is to provide a communication method using a general-purpose I2C interface device for controlling a device using an FPGA, in which a FPGA control unit receives a data transmission / reception instruction from an MCU (Micro Controller Unit), synchronizes the MCU with the peripheral device Outputting the serial data signal from the peripheral device connected to the I2C bus and receiving a data transmission command from the MCU when the data receiving instruction is received from the MCU; When the transmitter receives data from the MCU and receives a data reception command from the MCU, the FPGA receiver synchronizes the received serial data signal with the clock to convert the received serial data signal into a data structure that can be processed by the MCU, , And when receiving a data transmission command from the MCU, Converting the clocked data into a serial data signal, and synchronizing the serial data signal with the clock signal and transmitting the serial data signal to the peripheral device.

또한, FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법은, 상기 MCU가 I2C의 마스터(Master) 장치로 작동하고, 하나 또는 두 개 이상의 주변 장치가 I2C의 슬레이브(Slave) 장치로 작동하도록 구성되는 것이 바람직하다. 여기에서, 상기 주변 장치는 내부 메모리, 센서 또는 출력 장치일 수 있다.In addition, a communication method using a general-purpose I2C interface device for device control using an FPGA is characterized in that the MCU operates as a master device of I2C and one or more peripheral devices operate as a slave device of I2C . Here, the peripheral device may be an internal memory, a sensor, or an output device.

상기와 같은 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치 및 이를이용한 통신 방법에 따르면, FPGA를 활용하여 범용 I2C 인터페이스를 설계함으로써, 간단한 구성과 대화형 프로토콜을 통해 하드웨어 안정성과 모든 시스템에 유용하게 적용할 수 있는 호환성을 갖는 효과가 있다. 따라서, I2C 통신용 모듈이 장착되지 않은 컨트롤러에서도 2개의 라인으로만 이루어진 I2C 버스를 이용하여 많은 주변 장치들과 쉽게 통신할 수 있다.According to the general-purpose I2C interface device for controlling the device using the FPGA and the communication method using the same, by designing the general-purpose I2C interface using the FPGA, the hardware stability and the interactive protocol There is an effect of compatibility. Therefore, controllers without an I2C communication module can easily communicate with many peripherals using an I2C bus with only two lines.

또한, FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용하여 하드웨어 회로를 최소화할 수 있으며, 이에 따라 개발 비용과 시간의 최소화 효과를 가진다.In addition, it is possible to minimize the hardware circuit by using the general-purpose I2C interface device for device control using the FPGA, thereby minimizing the development cost and time.

도 1은 본 발명의 일 실시예에 따른 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치의 블록 구성도이다.
도 2는 본 발명의 일 실시예에 따른 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 I2C 통신 시스템의 블록 구성도이다.
도 3은 본 발명의 일 실시예에 따른 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법의 순서도이다.
1 is a block diagram of a general purpose I2C interface device for controlling a device using an FPGA according to an embodiment of the present invention.
2 is a block diagram of an I2C communication system using a general-purpose I2C interface device for controlling a device using an FPGA according to an embodiment of the present invention.
3 is a flowchart of a communication method using a general-purpose I2C interface device for controlling a device using an FPGA according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시 예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.The terms first, second, A, B, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the contextual meaning of the related art and are to be interpreted as either ideal or overly formal in the sense of the present application Do not.

이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치의 블록 구성도이다.1 is a block diagram of a general purpose I2C interface device for controlling a device using an FPGA according to an embodiment of the present invention.

도 1을 참조하면, FPGA를 활용한 장치 제어용 범용 I2C(Inter-Integrated Circuit) 인터페이스 장치(100)는 FPGA수신부(110), FPGA송신부(120) 및 FPGA제어부(130)를 포함하도록 구성될 수 있다. 여기에서 FPGA수신부(110), FPGA송신부(120) 및 FPGA제어부(130)는 모두 FPGA를 활용하여 설계된 모듈이다. 그리고 범용 I2C 인터페이스 장치(100)는 I2C 모듈이 내장되어 있지 않은 MCU(Micro Controller Unit)(300)에 연결되어 SDA과 SCL의 두 라인으로 이루어진 I2C 버스(200)를 통해 주변장치(400)와 통신할 수 있도록 데이터를 변환해주는 장치이다. I2C 버스용 직렬 데이터의 구성은 주변 장치들을 가리키는 7비트의 주소와 R/W(Read 혹은 Write 신호) 신호, 전송 데이터, 데이터의 수신 응답 신호인 Acknowledge 신호 및 시작과 종료를 알리는 START와 STOP신호를 포함한다.1, a general purpose I 2 C (Inter-Integrated Circuit) interface device 100 for controlling a device using an FPGA may be configured to include an FPGA receiving unit 110, an FPGA transmitting unit 120, and an FPGA controlling unit 130 . Here, the FPGA receiving unit 110, the FPGA transmitting unit 120, and the FPGA controlling unit 130 are all modules designed using the FPGA. The general-purpose I2C interface device 100 is connected to an MCU (Micro Controller Unit) 300 having no I2C module and communicates with the peripheral device 400 via an I2C bus 200 having two lines of SDA and SCL It is a device that converts data to be able to do. The serial data for I2C bus consists of 7 bit address, R / W (read or write signal), transmission data, Acknowledge signal to receive data, START and STOP signals to inform start and end .

FPGA수신부(110)는 I2C 버스(200)에 연결된 주변 장치(400)로부터 직렬 데이터 신호를 수신하여 MCU(300)에서 처리할 수 있는 데이터 구조로 변환한 후, 변환된 데이터를 출력한다.The FPGA receiving unit 110 receives the serial data signal from the peripheral device 400 connected to the I2C bus 200, converts the serial data signal into a data structure that can be processed by the MCU 300, and outputs the converted data.

또한, FPGA송신부(120)는 MCU(300)로부터 데이터를 수신하고, 수신된 데이터를 직렬 데이터 신호로 변환하여 I2C 버스(200)의 SDA 라인을 통해 주변 장치(400)로 송신한다.The FPGA transmission unit 120 receives data from the MCU 300, converts the received data into a serial data signal, and transmits the serial data signal to the peripheral device 400 via the SDA line of the I2C bus 200.

FPGA제어부(130)는 MCU(300)와 연결되고, MCU(300)로부터 데이터와 주소및 송수신 명령(RD/WR)을 받아 FPGA수신부(110) 및 FPGA송신부(120)의 동작을 제어한다. 수신 명령을 받은 경우, FPGA송신부(120)는 동작을 중지하고, FPGA수신부(110)가 MCU(300)로부터 받은 주소에 해당하는 주변 장치로부터 직렬 데이터 신호를 수신하도록 제어한다. 또한, 송신 명령을 받은 경우에는 FPGA수신부(110)는 동작을 중지하고, FPGA송신부(120)가 MCU(300)로부터 받은 주소에 해당하는 주변 장치에게 데이터를 송신하도록 제어한다. I2C 버스(200)는 하나의 SDA 라인으로만 데이터를 주고받는 방식이기 때문에 동시에 송수신을 할 수 없어 FPGA수신부(110)와 FPGA송신부(1230)가 동시에 동작하지 않도록 제어해야 한다. The FPGA control unit 130 is connected to the MCU 300 and controls the operation of the FPGA receiving unit 110 and the FPGA transmitting unit 120 by receiving data, an address and a transmission / reception instruction (RD / WR) from the MCU 300. The FPGA transmitting unit 120 stops the operation and controls the FPGA receiving unit 110 to receive the serial data signal from the peripheral device corresponding to the address received from the MCU 300. [ When receiving the transmission command, the FPGA receiving unit 110 stops the operation and controls the FPGA transmitting unit 120 to transmit data to the peripheral device corresponding to the address received from the MCU 300. Since the I2C bus 200 transmits and receives data to and from only one SDA line, the FPGA receiver 110 and the FPGA transmitter 1230 must be controlled not to operate at the same time.

그리고 FPGA제어부(130)는 MCU(300)와 주변 장치(400)를 동기화시키기 위한 클럭을 발생시켜 I2C 버스(200)의 SCL 라인을 통해 출력하고, FPGA수신부(110) 및 FPGA송신부(120)가 직렬 데이터 신호를 클럭에 동기화시켜 송수신하도록 제어하게 된다.The FPGA control unit 130 generates a clock for synchronizing the MCU 300 and the peripheral device 400 and outputs the clock through the SCL line of the I2C bus 200. The FPGA receiving unit 110 and the FPGA transmitting unit 120 The serial data signal is controlled to be transmitted and received in synchronization with the clock.

도 2는 본 발명의 일 실시예에 따른 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 I2C 통신 시스템의 블록 구성도이다.2 is a block diagram of an I2C communication system using a general-purpose I2C interface device for controlling a device using an FPGA according to an embodiment of the present invention.

도 2를 참조하면, FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치(100)는 MCU(300)가 I2C의 마스터(Master) 장치로 작동하고, 하나 또는 두 개 이상의 주변 장치(400)가 I2C의 슬레이브(Slave) 장치로 작동하도록 구성되는 것이 바람직하다. 여기에서, 상기 주변 장치는 내부 메모리(410), 센서(420) 또는 출력 장치(430)일 수 있다. 2, the general purpose I2C interface device 100 for controlling a device using an FPGA is configured such that the MCU 300 operates as an I2C master device and one or more peripheral devices 400 are connected to the I2C slave (Slave) device. Here, the peripheral device may be an internal memory 410, a sensor 420, or an output device 430.

I2C 버스(200)의 SDA 라인과 SCL 라인은 모두 오픈 드레인이므로 두 라인에는 각각 풀업 저항(500)을 연결해 주어야 한다. 그리고, I2C 버스(200)에 연결된 주변장치들(400)은 각각의 주소를 가지고 있어 마스터는 이 주소로 원하는 슬래이브, 즉 주변 장치를 불러 통신할 수 있다. 이때, I2C 버스(200)에 연결된 장치의 수가 아무리 많아도 한 순간에는 오직 하나의 마스터와 하나의 슬래이브만이 통신할 수 있다.Since both the SDA line and the SCL line of the I2C bus 200 are open drain, a pull-up resistor 500 should be connected to each of the two lines. The peripheral devices 400 connected to the I2C bus 200 have respective addresses, so that the master can call the desired slave, i.e., the peripheral device, with this address. At this time, no matter how many devices are connected to the I2C bus 200, only one master and one slave can communicate at a time.

도 3은 본 발명의 일 실시예에 따른 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법의 순서도이다 3 is a flowchart of a communication method using a general-purpose I2C interface device for controlling a device using an FPGA according to an embodiment of the present invention

FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법은 먼저 FPGA제어부(130)가 MCU(Micro Controller Unit)(300)로부터 데이터 송수신 명령을 받는다(S110). 그리고 MCU(300)와 상기 주변 장치(400)를 동기화시키기 위한 클럭을 발생시켜 I2C 버스(200)를 통해 출력하게 된다(S110).In the communication method using the general-purpose I2C interface device for controlling devices using the FPGA, the FPGA control unit 130 receives a data transmission / reception instruction from the MCU (Micro Controller Unit) 300 (S110). Then, a clock for synchronizing the MCU 300 and the peripheral device 400 is generated and output through the I2C bus 200 (S110).

제어부는 MCU(300)로부터 받은 데이터 송수신 명령을 판단하여(S120) MCU(300)로부터 데이터 수신 명령을 받은 경우, FPGA수신부(110)가 I2C 버스(200)에 연결된 주변 장치(400)로부터 직렬 데이터 신호를 수신하고(S131), MCU(300)로부터 데이터 송신 명령을 받은 경우에는, FPGA송신부(120)가 상기 MCU(300)로부터 데이터를 수신하게 된다(S132).The control unit determines the data transmission / reception instruction received from the MCU 300 in step S120 and receives the data reception instruction from the MCU 300. The control unit receives the serial data from the peripheral device 400 connected to the I2C bus 200, (S131). When receiving a data transmission command from the MCU 300, the FPGA transmission unit 120 receives data from the MCU 300 (S132).

다음으로, MCU(300)로부터 데이터 수신 명령을 받은 경우, FPGA수신부(110)가 수신된 직렬 데이터 신호를 클럭에 동기화시켜 MCU(300)에서 처리할 수 있는 데이터 구조로 변환하여 출력하고(S141), MCU(300)로부터 데이터 송신 명령을 받은 경우, FPGA송신부(120)가 수신된 데이터를 직렬 데이터 신호로 변환하여 클럭에 동기화시켜 주변 장치(300)로 송신하게 된다(S142).Next, when receiving the data reception instruction from the MCU 300, the FPGA receiving unit 110 synchronizes the received serial data signal with the clock, converts the received serial data signal into a data structure that can be processed by the MCU 300, , The FPGA transmission unit 120 converts the received data into a serial data signal and transmits the serial data signal to the peripheral device 300 in synchronization with the clock (S142).

이때, FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법에서, MCU(300)가 I2C의 마스터(Master) 장치로 작동하고, 하나 또는 두 개 이상의 주변 장치가 I2C의 슬레이브(Slave) 장치로 작동하도록 구성되는 것이 바람직하다. 여기에서, 상기 주변 장치는 내부 메모리, 센서 또는 출력 장치일 수 있다.At this time, in the communication method using the general-purpose I2C interface device for device control using the FPGA, the MCU 300 operates as the master device of the I2C and one or more peripheral devices are connected to the slave device of the I2C It is desirable to be configured to operate. Here, the peripheral device may be an internal memory, a sensor, or an output device.

이상 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined in the appended claims. It will be possible.

100: 범용 I2C 인터페이스 장치 110: FPGA수신부
120: FPGA송신부 130: FPGA제어부
200: I2C 버스 300: MCU
400: 주변 장치 410: 내부 메모리
420: 센서 430: 출력 장치
100: general-purpose I2C interface device 110: FPGA receiver
120: FPGA transmission unit 130: FPGA control unit
200: I2C bus 300: MCU
400: peripheral device 410: internal memory
420: sensor 430: output device

Claims (6)

I2C(Inter-Integrated Circuit) 버스에 연결된 주변 장치로부터 직렬 데이터 신호를 수신하여 MCU(Micro Controller Unit)에서 처리할 수 있는 데이터 구조의 병렬 데이터 신호로 변환하여 출력하는 FPGA수신부;
상기 MCU로부터 병렬 데이터 신호를 수신하고, 상기 수신된 병렬 데이터 신호를 직렬 데이터 신호로 변환하여 상기 주변 장치로 송신하는 FPGA송신부;
상기 MCU와 연결되고, 상기 연결된 MCU로부터 데이터, 주소 및 송수신 명령을 받아 상기 FPGA수신부 및 상기 FPGA송신부의 동작을 제어하고, 상기 MCU와 상기 주변 장치를 동기화시키기 위한 클럭을 발생시켜 I2C 버스의 SCL 라인을 통해 출력하고, 상기 FPGA수신부 및 상기 FPGA송신부가 상기 직렬 데이터 신호를 상기 클럭에 동기화시켜 I2C 버스의 SDA 라인을 통해 송수신하도록 제어하는 FPGA제어부를 포함하고,
상기 FPGA제어부는,
상기 MCU로부터 수신 명령을 받은 경우 상기 FPGA송신부의 동작을 중지시키고 상기 FPGA수신부가 상기 MCU로부터 받은 주소에 해당하는 주변 장치로부터 직렬 데이터 신호를 수신하도록 제어하고, 상기 MCU로부터 송신 명령을 받은 경우 상기 FPGA수신부의 동작을 중지시키고 상기 FPGA송신부가 상기 MCU로부터 받은 주소에 해당하는 주변 장치로 직렬 데이터 신호를 송신하도록 제어하고, 상기 FPGA수신부 및 상기 FPGA송신부가 동시에 동작하지 않도록 제어하는 것을 특징으로 하는 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치.
An FPGA receiving unit for receiving a serial data signal from a peripheral device connected to an I2C (Inter-Integrated Circuit) bus and converting the parallel data signal into a parallel data signal having a data structure that can be processed by an MCU (Micro Controller Unit);
An FPGA transmitting unit receiving a parallel data signal from the MCU, converting the received parallel data signal into a serial data signal, and transmitting the parallel data signal to the peripheral device;
And a controller for controlling operation of the FPGA receiving unit and the FPGA transmitting unit by receiving data, address and transmission / reception command from the connected MCU, generating a clock for synchronizing the MCU and the peripheral device, And an FPGA control unit for controlling the FPGA receiving unit and the FPGA transmitting unit to synchronize the serial data signal with the clock and transmit and receive the serial data signal through the SDA line of the I2C bus,
Wherein the FPGA control unit comprises:
When receiving a reception command from the MCU, stops the operation of the FPGA transmitter and controls the FPGA receiver to receive a serial data signal from a peripheral device corresponding to an address received from the MCU, And controls the FPGA receiving unit and the FPGA transmitting unit to not operate at the same time, and controls the FPGA transmitting unit to transmit a serial data signal to a peripheral device corresponding to an address received from the MCU, A general-purpose I2C interface device for controlling the utilized device.
제1항에 있어서, 상기 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치 는,
상기 MCU가 I2C의 마스터(Master) 장치로 작동하고, 하나 또는 두 개 이상의 주변 장치가 I2C의 슬레이브(Slave) 장치로 작동하는 것을 특징으로 하는 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치.
The general-purpose I2C interface device for controlling a device using the FPGA according to claim 1,
Wherein the MCU operates as a master device of an I2C and one or more peripheral devices operate as a slave device of an I2C.
제2항에 있어서, 상기 주변 장치는,
내부 메모리, 센서 또는 출력 장치인 것을 특징으로 하는 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치.
3. The apparatus of claim 2,
Wherein the I2C interface device is an internal memory, a sensor, or an output device.
FPGA제어부가 MCU(Micro Controller Unit)로부터 데이터, 주소 및 송수신 명령을 받고, 상기 MCU와 주변 장치를 동기화시키기 위한 클럭을 발생시켜 I2C 버스를 통해 출력하는 단계;
상기 MCU로부터 데이터 수신 명령을 받은 경우, FPGA수신부가 I2C 버스에 연결된 주변 장치로부터 직렬 데이터 신호를 수신하고, 상기 MCU로부터 데이터 송신 명령을 받은 경우, FPGA송신부가 상기 MCU로부터 데이터를 수신하는 단계;
상기 MCU로부터 데이터 수신 명령을 받은 경우, 상기 FPGA수신부가 상기 수신된 직렬 데이터 신호를 상기 클럭에 동기화시켜 MCU에서 처리할 수 있는 데이터 구조로 변환하여 출력하고, 상기 MCU로부터 데이터 송신 명령을 받은 경우, FPGA송신부가 상기 수신된 데이터를 직렬 데이터 신호로 변환하여 상기 클럭에 동기화시켜 상기 주변 장치로 송신하는 단계를 포함하고,
상기 MCU로부터 데이터 수신 명령을 받은 경우, 상기 FPGA수신부가 상기 수신된 직렬 데이터 신호를 상기 클럭에 동기화시켜 MCU에서 처리할 수 있는 데이터 구조로 변환하여 출력하고, 상기 MCU로부터 데이터 송신 명령을 받은 경우, FPGA송신부가 상기 수신된 데이터를 직렬 데이터 신호로 변환하여 상기 클럭에 동기화시켜 상기 주변 장치로 송신하는 단계는,
상기 FPGA제어부가 상기 FPGA수신부 및 상기 FPGA송신부가 동시에 동작하지 않도록 제어하는 것으로 구성되는 것을 특징으로 하는 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법.
Receiving a data, address, and transmission / reception command from an MCU (Micro Controller Unit), generating a clock for synchronizing the MCU with a peripheral device, and outputting the generated clock through the I2C bus;
Receiving a serial data signal from a peripheral device connected to the I2C bus and receiving an instruction to transmit data from the MCU when the FPGA receiving unit receives the data receiving command from the MCU;
When receiving a data reception instruction from the MCU, the FPGA receiving unit synchronizes the received serial data signal with the clock to convert the received serial data signal into a data structure that can be processed by the MCU, and outputs the data structure, And the FPGA transmitter converts the received data into a serial data signal and transmits the serial data signal to the peripheral device in synchronization with the clock,
When receiving a data reception instruction from the MCU, the FPGA receiving unit synchronizes the received serial data signal with the clock to convert the received serial data signal into a data structure that can be processed by the MCU, and outputs the data structure, Wherein the step of converting the received data into a serial data signal and transmitting the serial data signal to the peripheral device in synchronization with the clock,
And the FPGA control unit controls the FPGA receiving unit and the FPGA transmitting unit to not operate simultaneously. The communication method using the general-purpose I2C interface apparatus for controlling a device using an FPGA.
제4항에 있어서, FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법은,
상기 MCU가 I2C의 마스터(Master) 장치로 작동하고, 하나 또는 두 개 이상의 주변 장치가 I2C의 슬레이브(Slave) 장치로 작동하는 것을 특징으로 하는 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법.
The communication method according to claim 4, wherein the general-purpose I2C interface device for device control using an FPGA is used,
A communication method using a general-purpose I2C interface device for controlling a device using an FPGA, wherein the MCU operates as a master device of an I2C and one or more peripheral devices operate as a slave device of an I2C .
제5항에 있어서, 상기 주변 장치는,
내부 메모리, 센서 또는 출력 장치인 것을 특징으로 하는 FPGA를 활용한 장치 제어용 범용 I2C 인터페이스 장치를 이용한 통신 방법.
6. The apparatus of claim 5,
Wherein the I2C interface device is an internal memory, a sensor, or an output device.
KR20120062078A 2012-06-11 2012-06-11 Apparatus of universal inter-integrated circuit interface for controlling devices using fpga and communication method for using the same KR101490823B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR20120062078A KR101490823B1 (en) 2012-06-11 2012-06-11 Apparatus of universal inter-integrated circuit interface for controlling devices using fpga and communication method for using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR20120062078A KR101490823B1 (en) 2012-06-11 2012-06-11 Apparatus of universal inter-integrated circuit interface for controlling devices using fpga and communication method for using the same

Publications (2)

Publication Number Publication Date
KR20130138472A KR20130138472A (en) 2013-12-19
KR101490823B1 true KR101490823B1 (en) 2015-02-06

Family

ID=49984174

Family Applications (1)

Application Number Title Priority Date Filing Date
KR20120062078A KR101490823B1 (en) 2012-06-11 2012-06-11 Apparatus of universal inter-integrated circuit interface for controlling devices using fpga and communication method for using the same

Country Status (1)

Country Link
KR (1) KR101490823B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103941615A (en) * 2014-02-24 2014-07-23 国家电网公司 Microcontroller controlling method used for wind-power-plant ultrasonic wind speed monitoring
CN104598418A (en) * 2015-01-27 2015-05-06 北京奥普维尔科技有限公司 System and method for controlling I2C communication based on FPGA (Field Programmable Gate Array)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020040957A (en) * 2000-11-25 2002-05-31 구자홍 Serial communication apparatus for processor and external unit
KR100914174B1 (en) * 2009-02-18 2009-08-26 (주) 제노맥스 Tester interface apparatus based on field programmable gate array controller
KR20100024805A (en) * 2008-08-26 2010-03-08 주식회사 아모센스 High speed interface apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020040957A (en) * 2000-11-25 2002-05-31 구자홍 Serial communication apparatus for processor and external unit
KR20100024805A (en) * 2008-08-26 2010-03-08 주식회사 아모센스 High speed interface apparatus
KR100914174B1 (en) * 2009-02-18 2009-08-26 (주) 제노맥스 Tester interface apparatus based on field programmable gate array controller

Also Published As

Publication number Publication date
KR20130138472A (en) 2013-12-19

Similar Documents

Publication Publication Date Title
US20090234998A1 (en) Connection system
US10102177B2 (en) Serial communication system, communication control unit, and electronic device for finding and assigning unused addresses
EP1877911B1 (en) I2c slave/master interface enhancement using state machines
US8898358B2 (en) Multi-protocol communication on an I2C bus
US20120030388A1 (en) Conversion of a two-wire bus into a single-wire bus
CN108111382B (en) Communication device based on I3C bus and communication method thereof
US10038865B2 (en) Communication system
JP2011138466A (en) Circuit structure and integrated circuit structure of i2c/spi control interface, and bus structure
CN105279130A (en) Method for operating multiple I2C devices with same address
CN104834620A (en) SPI (serial peripheral interface) bus circuit, realization method and electronic equipment
US9015365B2 (en) Integrated circuit using I2C bus and control method thereof
CN108920401B (en) Multi-master multi-slave I2C communication method, system and node equipment
AU2011313404B2 (en) Electronic device and serial data communication method
CN101247491A (en) Communication protocol conversion device, on-line upgrading system and method for TV set software
US9684619B2 (en) I2C router system
KR101490823B1 (en) Apparatus of universal inter-integrated circuit interface for controlling devices using fpga and communication method for using the same
CN102445981B (en) Data transmission system and data transmission method
JP5107205B2 (en) Display connection adapter and display connection system
CN211831017U (en) Function expansion device of display equipment and intelligent display system
Kalinsky et al. Introduction to I2C
KR20150103905A (en) Method and apparatus for switching between master MCU(micro controller unit) and slave MCU of dual MCU
CN105068962A (en) I2C controller access method and I2C controller access system
TWI384371B (en) Interface card for extending input/output interface
CN108184085B (en) Method and system for converting MIPI (Mobile industry processor interface) to HDMI (high-definition multimedia interface) data
KR101082110B1 (en) Timing controller, apparatus for data sending and receving using timing controller

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: 20180126

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20200203

Year of fee payment: 6