JP2003122707A - Electronic equipment with i2c bus and bus control method - Google Patents

Electronic equipment with i2c bus and bus control method

Info

Publication number
JP2003122707A
JP2003122707A JP2001312267A JP2001312267A JP2003122707A JP 2003122707 A JP2003122707 A JP 2003122707A JP 2001312267 A JP2001312267 A JP 2001312267A JP 2001312267 A JP2001312267 A JP 2001312267A JP 2003122707 A JP2003122707 A JP 2003122707A
Authority
JP
Japan
Prior art keywords
control unit
nack
data
bus
electronic device
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.)
Pending
Application number
JP2001312267A
Other languages
Japanese (ja)
Inventor
Takashi Sakuma
崇 佐久間
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2001312267A priority Critical patent/JP2003122707A/en
Publication of JP2003122707A publication Critical patent/JP2003122707A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Bus Control (AREA)
  • Information Transfer Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce influence to be exerted on operating speed of a system by dispensing with NACK monitoring of a device by a host control part and to make data re-transmission to the device be promptly performed. SOLUTION: When an answer of NACK is received from a slave device at a transmitting destination in the case of transmitting I2C (I squar C) data from the host control part 2 to any of slave devices 5-1 to 5-n via an I2C control part 3, the answer is detected by a NACK monitoring part 7, a stop condition signal is generated by a generating circuit 6 based on it and data transmission communication with the transmitting destination is forcibly terminated. In addition, the host control part 2 is informed of NACK by a NACK informing circuit 8 and made to start re-transmission of the I2C data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、I2Cバスを備え
た電子機器及びバス制御方法に関し、特に、スレーブデ
バイス(slave device) からNACK(negative ackno
wledgement:否定応答)の監視を上位制御部が行わずに
済むようにした電子機器及びバス制御方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic device having an I2C bus and a bus control method, and more particularly to a slave device to a NACK (negative ackno).
The present invention relates to an electronic device and a bus control method in which the upper control unit does not have to monitor the (wledgement: negative response).

【0002】[0002]

【従来の技術】例えば、携帯電話機においては多機能化
が進み、本来の電話機能に加え、パケット(packet)通
信機能、メール(mail)通信機能、インターネット(in
ternet)機能などを備えた機種が登場している。さらに
は、本体に小型のカメラが取り付けられ、このカメラで
撮影した周囲の風景、自分の顔画像等を通信相手に送れ
るようにした機種もある。このような携帯電話機におい
ては、その全体の制御をCPU(中央演算処理装置: C
entral Processing Unit)を備える制御部によって行
い、通信用I/Oデバイス( Input/Output device
)、タイマ(timer )部、カメラ部(例えば、CCD
イメージセンサ:charge coupled device imagesenso
r)等の周辺デバイスを制御している。
2. Description of the Related Art For example, mobile phones have become multi-functional, and in addition to the original telephone functions, packet communication functions, mail communication functions, Internet (in
ternet) models with features such as have appeared. In addition, there is also a model in which a small camera is attached to the main body so that the surrounding scenery photographed by this camera and one's own face image can be sent to a communication partner. In such a mobile phone, the entire control is performed by a CPU (Central Processing Unit: C
An I / O device for communication (Input / Output device)
), A timer section, a camera section (for example, a CCD)
Image sensor: charge coupled device imagesenso
r) and other peripheral devices are controlled.

【0003】上記した様な周辺デバイスと制御部を接続
するバス(bus)の1つとして、携帯電話機等に最適
なものに「I2C(I square C)バス」がある。このI
2Cバスはフィリップス(Philips )社の開発によるも
ので、バスを構成するライン(line)数が2本で済むと
いう特徴があり、携帯電話機等のような高密度実装及び
省スペース化が求められている機器に適している。I2
Cバスには複数のスレーブデバイスが接続され、さらに
I2Cバスと上位制御部の間には複数の周辺デバイス
(以下、スレーブデバイス(slave device)という)を
管理する下位制御部が接続されている。
As one of buses connecting the peripheral devices and the control unit as described above, there is an "I2C (I square C) bus" which is most suitable for a mobile phone or the like. This I
The 2C bus was developed by Philips and is characterized by the fact that it requires only two lines to compose the bus, so there is a demand for high-density mounting and space saving, such as for mobile phones. Suitable for equipment that has I2
A plurality of slave devices are connected to the C bus, and a lower control unit for managing a plurality of peripheral devices (hereinafter referred to as slave devices) is connected between the I2C bus and the upper control unit.

【0004】上位制御部とスレーブデバイスとの間には
I2C制御部が設けられており、上位制御部からのデー
タ(I2Cデータ)はI2C制御部を通して指定のスレ
ーブデバイスに送られる。この送信に際しては、同一内
容のデータが4回連続的に送られ、確実にI2Cデータ
が送信されるようにしている。4回のデータ送信が終わ
ると、スレーブデバイスからはACK( acknowledgeme
nt:肯定応答又は確認通知)又はNACK(negative a
cknowledgement:否定応答)が返送され、I2C制御部
を介して上位制御部に通知される。ACKであった場
合、データは無事にスレーブデバイスにおいて受信され
たものとして通信は終了する。
An I2C control unit is provided between the upper control unit and the slave device, and data (I2C data) from the upper control unit is sent to the designated slave device through the I2C control unit. At the time of this transmission, data of the same content is continuously transmitted four times, and I2C data is surely transmitted. When the data has been transmitted four times, the slave device sends an ACK (acknowledgeme
nt: acknowledgment or confirmation notification or NACK (negative a)
(cknowledgement: negative acknowledgment) is returned and notified to the upper control unit via the I2C control unit. If it is ACK, the communication ends as if the data was successfully received at the slave device.

【0005】一方、NACKであった場合、上位制御部
からI2Cバス規格の1つに規定されているストップコ
ンディション(stop condition:送信データの完了を知
らせる信号)と呼ばれる信号が上位制御部からNACK
を出したスレーブデバイスへ送られ、上位制御部とスレ
ーブデバイスの間の通信を一旦終了する。そして、送信
に失敗したときと同じデータを4回連続的に再送信す
る。この送信に対して、ACKが出れば通信は終了する
が、再度NACKが返答された場合、ストップコンディ
ションの発生→再送信が、ACKの出るまで繰り返し実
施される。
On the other hand, in the case of NACK, a signal called a stop condition (a signal notifying the completion of transmission data) specified by one of the I2C bus standards from the upper control unit is sent from the upper control unit as NACK.
Is sent to the slave device that issued the command, and the communication between the upper control unit and the slave device is once terminated. Then, the same data as when the transmission failed is continuously retransmitted four times. In response to this transmission, the communication ends if an ACK appears, but if a NACK is returned again, the stop condition occurs → retransmission is repeated until an ACK appears.

【0006】バス制御に関しては種々の提案がある。例
えば、特開平56−23056号公報では、共通バスに
応答監視回路を接続し、要求指示回路からデータ転送を
要求する要求信号が共通バスに出力した後、データ転送
の再試行を繰り返し、予め設定した時間内に再試行要求
応答が解除されないときに応答監視回路から異常報知信
号を発生する。この異常報知信号に基づいて時間監視回
路の初期化等を行うことにより、システムダウンを防止
できるようにしている。
There are various proposals regarding bus control. For example, in Japanese Unexamined Patent Publication No. 56-23056, a response monitor circuit is connected to a common bus, and after a request signal requesting data transfer is output from the request instruction circuit to the common bus, retry of data transfer is repeated and preset. When the retry request response is not canceled within the specified time, the response monitor circuit generates an abnormality notification signal. System initialization can be prevented by initializing the time monitoring circuit based on this abnormality notification signal.

【0007】また、特開平8−84205号公報では、
通話料金管理装置に生じた異常を迅速に報知し、復旧を
早めることができるようにするため、交換機への通話料
金管理装置の接続が検出されながら、通話料金管理装置
から応答が無いとき、その応答無しが或る回数に達した
とき、異常フラグ(flag)を立て、これを基に警報ラン
プを交換機や通話料金管理装置において点灯させるよう
にしている。
Further, in JP-A-8-84205,
When there is no response from the call charge management device while the connection of the call charge management device to the exchange is detected, in order to promptly notify the abnormality occurred in the call charge management device and to speed up recovery When the number of times of no response reaches a certain number of times, an abnormality flag (flag) is set, and based on this, an alarm lamp is turned on in the exchange or the call charge management device.

【0008】[0008]

【発明が解決しようとする課題】しかし、従来の電子機
器及びバス制御方法によると、スレーブデバイスのNA
CKの監視は上位制御部によって行われており、システ
ムビジー( system busy)等のためにNACKを監視で
きなくなると、いつまでも通信不能状態が続き、データ
を正常に送信できなくなる場合がある。また、スレーブ
デバイスの監視(ACKかNACKかの検知)は上位制
御部によって行われており、NACKになると上位制御
部によってストップコンディションを生成し、一旦通信
を終えた後にデータの再送信を行うため、システムの動
作速度を低下させることがある。更に、I2Cデータの
送信は、常に同一内容のデータを4回送信しているた
め、通信環境が良好で1回の送信で済む場合であって
も、通信の終了に4回分の時間を要している。
However, according to the conventional electronic equipment and bus control method, the NA of the slave device is
The monitoring of CK is performed by the host controller, and if NACK cannot be monitored due to system busy or the like, communication may continue indefinitely and data may not be normally transmitted. Further, the slave device is monitored (detection of ACK or NACK) by the upper control unit. When the NACK occurs, the stop condition is generated by the upper control unit, and data is retransmitted after the communication is finished. , It may reduce the operating speed of the system. Furthermore, since I2C data is always transmitted the same content four times, it takes four times to complete the communication even if the communication environment is good and only one transmission is required. ing.

【0009】また、特開平56−23056号公報で
は、データ転送の再試行を繰り返した後、予め設定した
時間内に再試行要求応答が解除されないことが検出され
るまでデータ転送されない状態が継続されるため、シス
テムの回復に相当の時間がとられることになる。さら
に、特開平8−84205号公報においても、通話料金
管理装置からの応答無しの回数が或る値になるまで異常
フラグが発生しないため、同様にシステムの回復に相当
の時間を要することになる。
Further, in Japanese Unexamined Patent Publication No. 56-23056, after repeated data transfer retries, a state in which data is not transferred continues until it is detected that the retry request response is not canceled within a preset time. Therefore, it takes a considerable amount of time to recover the system. Further, in Japanese Patent Laid-Open No. 8-84205, an abnormal flag does not occur until the number of times of no response from the call charge management device reaches a certain value, and thus it takes a considerable time to recover the system. .

【0010】したがって、本発明の目的は、上位制御部
によるデバイスのNACK監視を不要にし、システムの
稼働速度に及ぼす影響を低減すると共にデバイスへのデ
ータ再送信が素早く行われるようにした電子機器及びバ
ス制御方法を提供することにある。
Therefore, an object of the present invention is to eliminate the need for the NACK monitoring of the device by the host controller, reduce the influence on the operating speed of the system, and quickly retransmit the data to the device. It is to provide a bus control method.

【0011】[0011]

【課題を解決するための手段】本発明は、上記の目的を
達成するため、第1の特徴として、全体を管理するほか
データの送出源となる上位制御部と、前記上位制御部か
らの前記データを受信する1又は複数のデバイスと、前
記1又は複数のデバイスのそれぞれに接続されたI2C
バスと、前記I2Cバスに接続され、前記上位制御部の
管理のもとに前記1又は複数のデバイスを制御する下位
制御部と、前記データを受信した前記デバイスがNAC
Kを返送したとき、このNACKに基づいて前記データ
の送信処理を強制終了させるためのストップコンディシ
ョン信号を生成するストップコンディション生成回路
と、前記NACKの発生を監視し、前記NACKを検知
したときに前記上位制御部に前記デバイスがNACK状
態にあることを通知して前記データの再送信を促すNA
CK監視手段を備えることを特徴とする電子機器を提供
する。
In order to achieve the above-mentioned object, the present invention has, as a first feature, a high-order control unit which manages the whole and is a data transmission source, and the above-mentioned high-order control unit. One or more devices for receiving data and I2C connected to each of the one or more devices
A bus, a lower control unit connected to the I2C bus and controlling the one or more devices under the control of the higher control unit, and the device receiving the data are NAC.
When K is returned, a stop condition generation circuit that generates a stop condition signal for forcibly ending the transmission process of the data based on this NACK; and a stop condition generation circuit that monitors the occurrence of the NACK and detects the NACK when the NACK is detected. NA that notifies the upper-level control unit that the device is in the NACK state and prompts retransmission of the data
Provided is an electronic device including CK monitoring means.

【0012】この構成によれば、上位制御部からデバイ
スへデータが送られた際、デバイスからNACKの返答
があったことをNACK監視手段が検知すると、これに
基づいてストップコンディション生成回路によりストッ
プコンディション信号が生成され、データ送信の処理を
強制的に終了させると共に、上位制御部にNACK状態
にあることを通知し、データ送信を再実行させる。NA
CK監視が下位制御部側で行われるため、デバイスの状
態を上位制御部で監視する必要が無くなり、上位制御部
の負担が軽減され、システムの稼働速度に及ぼす影響が
低減される。そして、ストップコンディション信号の生
成によりNACK状態が解除され、再送信の準備が開始
されるので、データの再送信が迅速に行われるようにな
る。
According to this configuration, when the NACK monitoring means detects that a NACK response has been received from the device when data is sent from the upper control unit to the device, the stop condition generating circuit based on this detects the stop condition. A signal is generated, the process of data transmission is forcibly ended, the upper control unit is notified of the NACK state, and data transmission is re-executed. NA
Since the CK monitoring is performed by the lower control unit, it is not necessary to monitor the device status by the upper control unit, the burden on the upper control unit is reduced, and the influence on the operating speed of the system is reduced. Then, the NACK state is released by the generation of the stop condition signal, and the preparation for retransmission is started, so that the data can be retransmitted quickly.

【0013】本発明は、上記の目的を達成するため、第
2の特徴として、上位制御部からI2Cバスを介して指
定のデバイスへデータを送信し、前記データを受信した
前記デバイスから受信状態に応じてACK又はNACK
を前記上位制御部へ返送し、前記NACKに対応して前
記上位制御部から前記デバイスへ前記データの再送信を
行うバス制御方法において、前記NACKの発生に応じ
て前記データの送信処理を強制終了させるためのストッ
プコンディション信号を生成して前記デバイスへ送信
し、前記NACKの発生に基づいて前記デバイスへ再度
前記データを送信することを特徴とするバス制御方法を
提供する。
In order to achieve the above-mentioned object, the present invention has a second feature that data is transmitted from a higher-order control unit to a designated device via an I2C bus, and the device that has received the data enters a receiving state. ACK or NACK depending on
In the bus control method of returning the data to the upper control unit and retransmitting the data from the higher control unit to the device in response to the NACK, the transmission process of the data is forcibly terminated when the NACK occurs. A bus control method is provided, wherein a stop condition signal for causing the device is generated and transmitted to the device, and the data is transmitted again to the device based on the occurrence of the NACK.

【0014】この方法によれば、データの送信先のデバ
イスがNACKを返送したとき、ストップコンディショ
ン信号を生成して通信を終了させ、改めて上位制御部か
らデータを再送信する。したがって、NACK監視が下
位制御部側で行われるため、デバイス側の状態を上位制
御部で監視する必要が無くなり、上位制御部の負担が軽
減されることにより、システムの稼働速度に及ぼす影響
が低減される。更に、ストップコンディション信号の生
成により再送信の準備が開始されるので、データの再送
信が迅速に行われるようになる。
According to this method, when the device to which the data is transmitted returns NACK, a stop condition signal is generated to terminate the communication, and the data is retransmitted from the upper control unit. Therefore, since the NACK monitoring is performed by the lower control unit, it is not necessary to monitor the state of the device side by the upper control unit, and the burden on the upper control unit is reduced, so that the influence on the operating speed of the system is reduced. To be done. Furthermore, since the preparation for retransmission is started by the generation of the stop condition signal, the data can be retransmitted quickly.

【0015】[0015]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて説明する。図1は、本発明による電子機器の
構成を示す。本発明の電子機器1は、マスターデバイス
としての上位制御部2、この上位制御部2に接続された
下位制御部としてのI2C制御部3、このI2C制御部
3に接続されたI2Cバス4、このI2Cバス4に接続
されたn個のスレーブデバイス5-1〜5-n、I2C制御
部3に接続されたストップコンディション生成回路6、
このストップコンディション生成回路6に接続されたN
ACK監視部7、及びNACK監視部7と上位制御部2
の間に接続されたNACK通知回路8を備えて構成され
ている。ここでは、I2Cバスを使用する構成部分のみ
が示され、電子機器を構成する上で必要であってもデー
タ伝送に関与しない部分については、図示を省略してい
る。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows the configuration of an electronic device according to the present invention. The electronic device 1 of the present invention includes an upper control unit 2 as a master device, an I2C control unit 3 as a lower control unit connected to the upper control unit 2, an I2C bus 4 connected to the I2C control unit 3, and an I2C control unit. N slave devices 5-1 to 5-n connected to the bus 4, a stop condition generation circuit 6 connected to the I2C control unit 3,
N connected to this stop condition generation circuit 6
ACK monitoring unit 7, NACK monitoring unit 7 and host control unit 2
And a NACK notification circuit 8 connected between the two. Here, only the components that use the I2C bus are shown, and the components that are necessary for configuring the electronic device but are not involved in data transmission are not shown.

【0016】図1の様な構成の電子機器1は、例えば携
帯電話機に適用される。上位制御部2はCPUやROM
(Read Only Memory)を用いて構成され、携帯電話機の
全体を制御する。I2C制御部3は、I2Cバス4及び
スレーブデバイス5-1〜5-nを制御する。スレーブデバ
イス5-1〜5-nは、例えば、5-1が携帯電話機に搭載さ
れたカメラのイメージセンサ部であり、5-nが或るデバ
イスを制御するために用いられるタイマである。ストッ
プコンディション生成回路6は、段落番号〔0005〕
で説明したストップコンディション信号をスレーブデバ
イスからNACKが出されたときに生成し、I2C制御
部3を介してI2Cバス4へ送信する。NACK監視部
7は、スレーブデバイス(5-1〜5-nのいずれか)がN
ACK状態か否かを監視する。NACK通知回路8は、
NACK監視部7がNACK状態を検知したとき、これ
を上位制御部2へ通知する。この通知を受けた上位制御
部2は、スレーブデバイス(スレーブデバイス5-1〜5
-nの内の送信先となる1つ)の再設定(再選択)を実行
する。
The electronic device 1 having the configuration shown in FIG. 1 is applied to, for example, a mobile phone. The upper control unit 2 is a CPU or ROM
It is configured using (Read Only Memory) and controls the entire mobile phone. The I2C control unit 3 controls the I2C bus 4 and the slave devices 5-1 to 5-n. In the slave devices 5-1 to 5-n, for example, 5-1 is an image sensor unit of a camera mounted on a mobile phone, and 5-n is a timer used to control a certain device. The stop condition generation circuit 6 uses the paragraph number [0005].
The stop condition signal described in 1 above is generated when the NACK is issued from the slave device, and is transmitted to the I2C bus 4 via the I2C control unit 3. In the NACK monitoring unit 7, the slave device (any one of 5-1 to 5-n) is N
It monitors whether or not it is in the ACK state. The NACK notification circuit 8
When the NACK monitoring unit 7 detects the NACK state, it notifies the upper control unit 2 of this. The higher-level control unit 2 that has received this notification notifies the slave devices (slave devices 5-1 to 5-5).
-Reset (reselect) one of the destinations in n.

【0017】図2は、図1の電子機器におけるバス制御
処理を示す。図中、“S”はステップを表している。以
下においては、上位制御部2からデータ(I2Cデー
タ)を送る先は、スレーブデバイス5-1であるとする。
I2Cバスの制御が開始されると(S101)、まず、
上位制御部2から指定のスレーブデバイス5-1へI2C
制御部3を介してI2Cデータの送信が実施される(S
102)。この送信は、従来のようにデータを4回繰り
返すのではなく、従来の1回分のデータが送信される。
このI2Cデータの送信が問題なく終了し、スレーブデ
バイス5-1からI2C制御部3にACKが返送されて来
れば(S103)、I2Cデータは正常に送信されたも
のと判断し(S104)、正常終了する(S105)。
FIG. 2 shows a bus control process in the electronic device of FIG. In the figure, "S" represents a step. In the following, it is assumed that the destination of the data (I2C data) from the host controller 2 is the slave device 5-1.
When the control of the I2C bus is started (S101), first,
I2C from the host controller 2 to the designated slave device 5-1
Transmission of I2C data is performed via the control unit 3 (S
102). In this transmission, the conventional one-time data is transmitted instead of repeating the data four times as in the conventional case.
If the transmission of the I2C data is completed without any problem and an ACK is returned from the slave device 5-1 to the I2C control unit 3 (S103), it is determined that the I2C data has been normally transmitted (S104), and the I2C data is normally transmitted. It ends (S105).

【0018】一方、S103において、NACK監視部
7によりスレーブデバイス5-1のNACKが検知された
場合、この情報に基づいて、ストップコンディション生
成回路6はストップコンディション信号を自動生成し
(S106)、このストップコンディション信号をI2
C制御部3及びスレーブデバイス5-1へ送信する。この
ストップコンディション信号により、I2C制御部3は
送信処理を強制的に終了し、また、スレーブデバイス5
-1では受信処理を強制的に終了する。
On the other hand, when the NACK of the slave device 5-1 is detected by the NACK monitoring unit 7 in S103, the stop condition generating circuit 6 automatically generates a stop condition signal based on this information (S106). Stop condition signal is I2
It is transmitted to the C control unit 3 and the slave device 5-1. With this stop condition signal, the I2C control unit 3 forcibly ends the transmission process, and the slave device 5
At -1, the receiving process is forced to end.

【0019】また、NACK監視部7がNACKを検知
すると、NACK通知回路8は、スレーブデバイス5-1
がNACKであることを上位制御部2に通知する(S1
07)。上位制御部2は、NACK通知回路8からのN
ACKの通知を受けとると、I2C制御部3に指示を出
し、スレーブデバイス5-1へI2Cデータを再送するた
めの処理を実行させる(S108)。I2C制御部3と
スレーブデバイス5-1の間の通信手順が完了すると、処
理はS102に戻され、上位制御部2からスレーブデバ
イス5-1へのI2Cデータの再送信が開始される。以
下、上記した処理が正常に送信されるまで繰り返し実行
される。
When the NACK monitoring section 7 detects a NACK, the NACK notifying circuit 8 causes the slave device 5-1.
Is sent to the upper control unit 2 (S1).
07). The upper control unit 2 receives the N from the NACK notification circuit 8.
When receiving the notification of ACK, the I2C control unit 3 is instructed to execute the process for retransmitting the I2C data to the slave device 5-1 (S108). When the communication procedure between the I2C control unit 3 and the slave device 5-1 is completed, the process is returned to S102, and the retransmission of the I2C data from the upper control unit 2 to the slave device 5-1 is started. Hereinafter, the above-described processing is repeatedly executed until it is normally transmitted.

【0020】以上のように、1回のデータ送信に対して
NACK監視部7によりACK状態かNACK状態かを
判定し、NACK状態であれば直ちにストップコンディ
ション信号を生成して通信を終了すると共に上位制御部
2にNACK通知を行い、上位制御部2からの次回の送
信開始の準備をするようにしたため、上位制御部2が従
来行っていたスレーブデバイス(5-1〜5-n)のNAC
K状態の監視が不要になり、上位制御部2の負担及びシ
ステムへの影響が軽減される。また、スレーブデバイス
5-1〜5-nへのデータ送信或いは再送信が素早く行える
ようになる。更に、ACK時のデータ伝送も従来の4回
から1回にできるため、データの送信時間を短縮するこ
とが可能になる。
As described above, the NACK monitoring unit 7 determines whether the data is transmitted once or not, and if it is in the NACK state, a stop condition signal is immediately generated to terminate the communication and the higher order. Since the NACK notification is sent to the control unit 2 to prepare for the start of the next transmission from the upper control unit 2, the NAC of the slave devices (5-1 to 5-n) conventionally performed by the upper control unit 2 is performed.
It is not necessary to monitor the K state, and the burden on the host controller 2 and the influence on the system are reduced. Further, it becomes possible to quickly perform data transmission or re-transmission to the slave devices 5-1 to 5-n. Further, since the data transmission at the time of ACK can be done once instead of the conventional four times, the data transmission time can be shortened.

【0021】図3は、本発明の電子機器の第2の実施の
形態の構成を示す。また、図4は図3の電子機器におけ
るバス制御方法を示す。図3の構成が図1の構成と異な
るところは、NACK監視部7に警告表示部9が接続さ
れていることにある。この警告表示部9は、電子機器1
を適用する装置又は機器が移動通信装置(携帯電話機、
PHS(Personal Handyphone System)電話機等)やPD
A(Personal DigitalAssistant)等であれば、液晶表
示器を代用したり、着信用LED(発光ダイオード)を
代用することができる。もちろん、専用の表示器やLE
Dを設けることもできる。
FIG. 3 shows the configuration of the second embodiment of the electronic apparatus of the present invention. FIG. 4 shows a bus control method in the electronic device of FIG. The configuration of FIG. 3 differs from that of FIG. 1 in that a warning display unit 9 is connected to the NACK monitoring unit 7. This warning display unit 9 is used for the electronic device 1
The device or equipment to which is applied is a mobile communication device (mobile phone,
PHS (Personal Handyphone System) telephone etc.) and PD
If it is A (Personal Digital Assistant) or the like, it is possible to substitute the liquid crystal display or the incoming call LED (light emitting diode). Of course, a dedicated display and LE
D can also be provided.

【0022】図4において、S101〜S108までの
処理は、図2と同じである。したがって、ここでは説明
を省略する。S108によりI2C制御部3からスレー
ブデバイス5-1へのI2Cデータの送信準備が整った時
点で、警告表示部9が動作する(S201)。警告表示
部9は、NACK監視部7がNACK状態にあることを
検知したとき、その情報を基に警告表示部9に警告の表
示を行う。警告表示部9に液晶表示器等が用いられてい
る場合には、文字メッセージやマーク(イラスト)を表
示して警告を行い、警告表示部9がLED等であれば、
これを点灯、或いは点滅させることにより警告を行うこ
とができる。
In FIG. 4, the processing from S101 to S108 is the same as that in FIG. Therefore, the description is omitted here. When the preparation for transmitting the I2C data from the I2C control unit 3 to the slave device 5-1 is completed in S108, the warning display unit 9 operates (S201). When the NACK monitoring unit 7 detects that the NACK state is in the NACK state, the warning display unit 9 displays a warning on the warning display unit 9 based on the information. When a liquid crystal display or the like is used as the warning display unit 9, a warning is displayed by displaying a character message or a mark (illustration). If the warning display unit 9 is an LED or the like,
A warning can be issued by lighting or blinking this.

【0023】警告表示部9による警告を見たユーザー
は、使用している装置又は機器の動作状況を把握するこ
とができる。また、警告表示部9が何度も動作し、或い
は警告表示部9が動作し続ける状態が発生していれば、
電子機器に異常が発生し、或いはスレーブデバイスの故
障又は破損(例えば、カメラ部の損傷)等が生じたこと
を警告できるので、サービスステーションに持ち込む必
要性の有無等を判断することができる。
The user who sees the warning displayed on the warning display unit 9 can grasp the operation status of the device or equipment being used. In addition, if the warning display unit 9 operates many times or a state where the warning display unit 9 continues to operate occurs,
Since it is possible to warn that an abnormality has occurred in the electronic device, or a slave device has failed or damaged (for example, the camera unit has been damaged), it is possible to determine whether or not it is necessary to bring the device to the service station.

【0024】図5は、本発明の電子機器の第2の実施の
形態の構成を示す。図5の構成が図1の構成と異なると
ころは、上位制御部2とI2C制御部3の間に記憶部1
0が設けられていることにある。この記憶部10には、
小型の機器では半導体メモリが用いられるが、規模の大
きいシステムにおいてはハードディスク(hard disc )
等を用いることができる。記憶部10には、上位制御部
2によってI2C制御部3に対する処理要求情報及びI
2Cデータが格納される。
FIG. 5 shows the configuration of the second embodiment of the electronic apparatus of the present invention. The configuration of FIG. 5 differs from that of FIG. 1 in that the storage unit 1 is provided between the host control unit 2 and the I2C control unit 3.
0 is provided. In this storage unit 10,
Semiconductor memory is used in small devices, but hard disk in large systems.
Etc. can be used. The storage unit 10 stores the processing request information and the I information for the I2C control unit 3 by the upper control unit 2.
2C data is stored.

【0025】最初の送信時、上位制御部2からスレーブ
デバイス5-1に向けての処理要求情報及びI2Cデータ
が、記憶部10に格納される。この処理要求情報に従っ
てI2C制御部3は、送信先のスレーブデバイス5-1に
I2Cデータを送信する。以後は、図2又は図4のS1
02〜S106に示した処理が実行される。S103で
スレーブデバイス5-1のNACK状態が判定されたと
き、NACK通知回路8からのNACK通知は、上位制
御部2ではなく記憶部10に対して行われる。このNA
CK通知に基づいて、記憶部10からI2C制御部3へ
処理要求情報の読み出しが行われる。この処理要求情報
に基づいて、I2C制御部3は記憶部10から送信対象
のI2Cデータを読み出し、I2C制御部3は、スレー
ブデバイス5-1へI2Cデータを再送する。この様に、
従来、上位制御部2の役割であった仕事の一部をI2C
制御部3と記憶部10が代行することにより、上位制御
部2に負担をかけることなく、スレーブデバイスへI2
Cデータを再送信することができる。また、システムの
動作速度の低下を防止することができる。
At the time of the first transmission, the processing request information and I2C data from the upper control unit 2 to the slave device 5-1 are stored in the storage unit 10. According to the processing request information, the I2C control unit 3 transmits the I2C data to the slave device 5-1 that is the transmission destination. After that, S1 in FIG. 2 or FIG.
The processing shown in 02 to S106 is executed. When the NACK state of the slave device 5-1 is determined in S103, the NACK notification from the NACK notification circuit 8 is sent to the storage unit 10 instead of the upper control unit 2. This NA
The processing request information is read from the storage unit 10 to the I2C control unit 3 based on the CK notification. Based on this processing request information, the I2C control unit 3 reads the I2C data to be transmitted from the storage unit 10, and the I2C control unit 3 retransmits the I2C data to the slave device 5-1. Like this
In the past, part of the work that was the role of the host controller 2
By substituting the control unit 3 and the storage unit 10 for the slave device, I2 can be transferred to the slave device without burdening the host control unit 2.
C data can be retransmitted. In addition, it is possible to prevent a decrease in the operating speed of the system.

【0026】[0026]

【発明の効果】以上より明らかなように、本発明の電子
機器及びバス制御方法によれば、上位制御部からデバイ
スへデータを送信した際、デバイスからのNACKに対
し、ストップコンディション信号を自動生成して通信を
終了させ、改めて上位制御部からデータを再送信するよ
うにしたので、デバイスの状態を上位制御部が監視する
必要がなくなり、上位制御部の負担軽減によってシステ
ムの稼働速度に及ぼす影響が低減されるほか、ストップ
コンディション信号の生成によりNACK状態が解除さ
れるので、データの再送信が迅速に行われるようにな
る。
As is apparent from the above, according to the electronic device and the bus control method of the present invention, when data is transmitted from the host controller to the device, a stop condition signal is automatically generated in response to the NACK from the device. Then, the communication is terminated and the data is sent again from the host controller, so it is not necessary for the host controller to monitor the status of the device, which reduces the load on the host controller and affects the operating speed of the system. And the NACK state is released by the generation of the stop condition signal, so that the data can be retransmitted quickly.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の電子機器の第1の実施の形態の構成を
示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a first embodiment of an electronic device of the present invention.

【図2】図1の電子機器のバス制御処理を示すフローチ
ャートである。
FIG. 2 is a flowchart showing a bus control process of the electronic device of FIG.

【図3】本発明の電子機器の第2の実施の形態の構成を
示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a second embodiment of an electronic device of the present invention.

【図4】図3の電子機器のバス制御処理を示すフローチ
ャートである。
4 is a flowchart showing a bus control process of the electronic device of FIG.

【図5】本発明の電子機器の第3の実施の形態の構成を
示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a third exemplary embodiment of an electronic device of the present invention.

【符号の説明】[Explanation of symbols]

1 電子機器 2 上位制御部 3 I2C制御部 4 I2Cバス 5-1〜5-n スレーブデバイス 6 ストップコンディション生成回路 7 NACK監視部 8 NACK通知回路 9 警告表示部 10 記憶部 1 electronic equipment 2 Host controller 3 I2C controller 4 I2C bus 5-1 to 5-n slave devices 6 Stop condition generation circuit 7 NACK monitoring section 8 NACK notification circuit 9 Warning display 10 memory

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 全体を管理するほかデータの送出源とな
る上位制御部と、 前記上位制御部からの前記データを受信する1又は複数
のデバイスと、 前記1又は複数のデバイスのそれぞれに接続されたI2
Cバスと、 前記I2Cバスに接続され、前記上位制御部の管理のも
とに前記1又は複数のデバイスを制御する下位制御部
と、 前記データを受信した前記デバイスがNACKを返送し
たとき、このNACKに基づいて前記データの送信処理
を強制終了させるためのストップコンディション信号を
生成するストップコンディション生成回路と、 前記NACKの発生を監視し、前記NACKを検知した
ときに前記上位制御部に前記デバイスがNACK状態に
あることを通知して前記データの再送信を促すNACK
監視手段を備えることを特徴とする電子機器。
1. A high-order control unit that manages the whole and is a data transmission source, one or a plurality of devices that receive the data from the high-order control unit, and are connected to the one or a plurality of devices, respectively. I2
A C bus, a lower control unit that is connected to the I2C bus and controls the one or more devices under the control of the upper control unit, and the device that receives the data returns NACK, A stop condition generation circuit for generating a stop condition signal for forcibly ending the transmission process of the data based on NACK; and a device for controlling the upper control unit to monitor the occurrence of the NACK and to notify the upper control unit when the NACK is detected. NACK notifying that it is in NACK state and prompting retransmission of the data
An electronic device comprising a monitoring means.
【請求項2】 前記NACK監視手段は、前記NACK
状態にあることを文字メッセージ又はマークの表示、点
滅、点灯のいずれかにより警告する警告表示部が接続さ
れていることを特徴とする請求項1記載の電子機器。
2. The NACK monitoring means is for the NACK.
The electronic device according to claim 1, further comprising a warning display unit for warning that the user is in a state by displaying, blinking, or lighting a character message or mark.
【請求項3】 前記上位制御部は、前記下位制御部に提
供する処理要求情報及び前記データを格納する記憶部が
接続されていることを特徴とする請求項1記載の電子機
器。
3. The electronic device according to claim 1, wherein the upper control unit is connected to a storage unit that stores the processing request information provided to the lower control unit and the data.
【請求項4】 前記記憶部は、前記NACK監視手段か
らNACK状態にあることが通知されたとき、格納して
いる前記処理要求情報及び前記データを前記下位制御部
へ送出することを特徴とする請求項3記載の電子機器。
4. The storage unit sends the stored processing request information and the stored data to the lower control unit when notified by the NACK monitoring means that the storage unit is in the NACK state. The electronic device according to claim 3.
【請求項5】 前記上位制御部は、1回の送信におい
て、同一内容のデータを繰り返し送信しないことを特徴
とする請求項1記載の電子機器。
5. The electronic device according to claim 1, wherein the upper control unit does not repeatedly transmit data having the same content in one transmission.
【請求項6】 前記上位制御部は、マスターデバイスと
して機能し、 前記デバイスは、前記上位制御部に従属し、スレーブデ
バイスとして機能する周辺回路部品であることを特徴と
する請求項1記載の電子機器。
6. The electronic device according to claim 1, wherein the higher-order control unit functions as a master device, and the device is a peripheral circuit component that is subordinate to the higher-order control unit and functions as a slave device. .
【請求項7】 前記上位制御部、前記下位制御部、前記
I2Cバス、及び前記1又は複数のデバイスは、携帯電
話機、その他の移動通信装置、又は携帯端末装置に用い
られることを特徴とする請求項1記載の電子機器。
7. The high-order control unit, the low-order control unit, the I2C bus, and the one or more devices are used in a mobile phone, another mobile communication device, or a mobile terminal device. Item 1. The electronic device according to item 1.
【請求項8】 上位制御部からI2Cバスを介して指定
のデバイスへデータを送信し、前記データを受信した前
記デバイスから受信状態に応じてACK又はNACKを
前記上位制御部へ返送し、前記NACKに対応して前記
上位制御部から前記デバイスへ前記データの再送信を行
うバス制御方法において、 前記NACKの発生に応じて前記データの送信処理を強
制終了させるためのストップコンディション信号を生成
して前記デバイスへ送信し、 前記NACKの発生に基づいて前記データを前記上位制
御部から前記デバイスへ再度送信することを特徴とする
バス制御方法。
8. The upper control unit transmits data to a specified device via an I2C bus, and the device which receives the data returns ACK or NACK to the upper control unit according to a reception state, and the NACK is transmitted. In the bus control method of retransmitting the data from the upper control unit to the device in response to the above, a stop condition signal for forcibly ending the transmission process of the data in response to the occurrence of the NACK is generated, and A bus control method comprising transmitting the data to a device, and again transmitting the data from the upper control unit to the device based on the occurrence of the NACK.
【請求項9】 前記データを再送信するステップは、前
記NACKの発生を警告するステップを含むことを特徴
とする請求項8記載のバス制御方法。
9. The bus control method according to claim 8, wherein the step of retransmitting the data includes the step of warning the occurrence of the NACK.
JP2001312267A 2001-10-10 2001-10-10 Electronic equipment with i2c bus and bus control method Pending JP2003122707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001312267A JP2003122707A (en) 2001-10-10 2001-10-10 Electronic equipment with i2c bus and bus control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001312267A JP2003122707A (en) 2001-10-10 2001-10-10 Electronic equipment with i2c bus and bus control method

Publications (1)

Publication Number Publication Date
JP2003122707A true JP2003122707A (en) 2003-04-25

Family

ID=19130958

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001312267A Pending JP2003122707A (en) 2001-10-10 2001-10-10 Electronic equipment with i2c bus and bus control method

Country Status (1)

Country Link
JP (1) JP2003122707A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7133947B2 (en) * 2003-09-05 2006-11-07 Alpine Electronics, Inc. Data communication system, data communication method, and communication unit
KR100812710B1 (en) 2006-11-14 2008-03-12 엠텍비젼 주식회사 Method and apparatus for communication using control bus
JP2009037526A (en) * 2007-08-03 2009-02-19 Mimaki Engineering Co Ltd Data transfer apparatus, request generation apparatus, and request generation method
US8521932B2 (en) 2010-03-19 2013-08-27 Asustek Computer Inc. Arbitrator and arbitrating method applied to system management bus system
JP2017208712A (en) * 2016-05-18 2017-11-24 ソニー株式会社 Communication device, communication method, program, and communication system
CN109384110A (en) * 2017-08-08 2019-02-26 东芝电梯株式会社 Elevator device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7133947B2 (en) * 2003-09-05 2006-11-07 Alpine Electronics, Inc. Data communication system, data communication method, and communication unit
KR100812710B1 (en) 2006-11-14 2008-03-12 엠텍비젼 주식회사 Method and apparatus for communication using control bus
JP2009037526A (en) * 2007-08-03 2009-02-19 Mimaki Engineering Co Ltd Data transfer apparatus, request generation apparatus, and request generation method
US8521932B2 (en) 2010-03-19 2013-08-27 Asustek Computer Inc. Arbitrator and arbitrating method applied to system management bus system
TWI407311B (en) * 2010-03-19 2013-09-01 Asustek Comp Inc Arbitrator and arbitrating method applied to system management bus system
JP2017208712A (en) * 2016-05-18 2017-11-24 ソニー株式会社 Communication device, communication method, program, and communication system
KR20190008855A (en) * 2016-05-18 2019-01-25 소니 주식회사 COMMUNICATION DEVICE, COMMUNICATION METHOD, PROGRAM, AND COMMUNICATION SYSTEM
US10740172B2 (en) 2016-05-18 2020-08-11 Sony Corporation Communication apparatus, communication method, program, and communication system
KR102375363B1 (en) * 2016-05-18 2022-03-17 소니그룹주식회사 Communication device, communication method, program, and communication system
CN109384110A (en) * 2017-08-08 2019-02-26 东芝电梯株式会社 Elevator device
JP2019031374A (en) * 2017-08-08 2019-02-28 東芝エレベータ株式会社 Elevator system
CN109384110B (en) * 2017-08-08 2020-12-15 东芝电梯株式会社 Elevator system

Similar Documents

Publication Publication Date Title
JP4480897B2 (en) Selective alternate use of interfaces
JP2007079726A (en) Communication device, communication state detection method and communication state detection program
JP2003122707A (en) Electronic equipment with i2c bus and bus control method
JPH05175964A (en) Control method for lan
JPH09224069A (en) Infrared ray communication equipment
JPH0473178B2 (en)
JP2001177508A (en) Radio communication equipment
JP2004260562A (en) Method and device for transmitting and receiving packet
JPS59191960A (en) Communication system
JP2544481B2 (en) Communication control method
JPH08292920A (en) Network management system
JPS6197754A (en) Back-up system
JP2004088206A (en) Radio base station apparatus
JP2003272982A (en) Apparatus adjustable by radio communication, method and system for apparatus adjustment
JP3156102B2 (en) Power system information input method and device
KR950010483B1 (en) The method transmitting a message for an electronic exchanger
JP3738636B2 (en) Dimming system bus control method
JP2010124388A (en) Wireless communication terminal
JPH10217580A (en) Image forming apparatus and maintaining method therefor
JP2925215B2 (en) Line control system and line control device used in the line control system
JP3454264B2 (en) Wireless communication system and wireless communication method
JPH06244852A (en) Diagnostic system
JPH1070617A (en) Building management system
JP2000293443A (en) Data transfer system and data transferring method used for the same
JP3586672B2 (en) Communication control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040914

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070130

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070605