[go: up one dir, main page]

CN110008155B - Electronic device and operation method thereof - Google Patents

Electronic device and operation method thereof Download PDF

Info

Publication number
CN110008155B
CN110008155B CN201810006999.9A CN201810006999A CN110008155B CN 110008155 B CN110008155 B CN 110008155B CN 201810006999 A CN201810006999 A CN 201810006999A CN 110008155 B CN110008155 B CN 110008155B
Authority
CN
China
Prior art keywords
integrated circuit
pin
data
signal
logic state
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.)
Active
Application number
CN201810006999.9A
Other languages
Chinese (zh)
Other versions
CN110008155A (en
Inventor
林育羣
杨义隆
张耀光
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.)
Himax Technologies Ltd
Original Assignee
Himax Technologies Ltd
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 Himax Technologies Ltd filed Critical Himax Technologies Ltd
Priority to CN201810006999.9A priority Critical patent/CN110008155B/en
Publication of CN110008155A publication Critical patent/CN110008155A/en
Application granted granted Critical
Publication of CN110008155B publication Critical patent/CN110008155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Semiconductor Integrated Circuits (AREA)

Abstract

An electronic device is provided. The electronic device includes a first integrated circuit and a second integrated circuit. The direction pin of the first integrated circuit outputs a direction control signal to the direction pin of the second integrated circuit. When the direction control signal is in the first logic state, the first integrated circuit obtains the control right. When the first integrated circuit obtains the control right, the frequency pin of the first integrated circuit outputs a first frequency signal to the frequency pin of the second integrated circuit. When the direction control signal is in the second logic state, the second integrated circuit obtains the control right. When the second IC obtains the control right, the frequency pin of the second IC outputs the second frequency signal to the frequency pin of the first IC.

Description

电子装置及其操作方法Electronic device and method of operation thereof

发明领域field of invention

本发明涉及一种电子装置及其操作方法。The invention relates to an electronic device and an operating method thereof.

背景技术Background technique

在两个集成电路之间进行协同运作时,除了数据传输接脚外,还需要额外的控制接脚来传递特定的控制信号。一般而言,接脚的数量越多,集成电路的制造成本越高。另外,在两个集成电路之间进行协同运作的过程中,其中一个集成电路担任“主(master)”角色(主控端),而另一个集成电路担任“仆(slave)”角色(被控端)。在公知技术中,主与仆是固定的。举例来说,在主仆架构中,集成电路A担任“主”角色(主控端),而集成电路B担任“仆(slave)”角色(被控端)。同步操作所需的频率信号是固定由集成电路A负责提供,而集成电路B接收集成电路A的频率信号来进行协同运作。集成电路B不能从仆改变为主。When cooperating between two integrated circuits, in addition to data transmission pins, additional control pins are required to transmit specific control signals. Generally speaking, the greater the number of pins, the higher the manufacturing cost of the integrated circuit. In addition, in the process of cooperative operation between two integrated circuits, one of the integrated circuits acts as a "master" (master control terminal), while the other integrated circuit acts as a "slave (slave)" role (controlled end). In the known technology, master and slave are fixed. For example, in the master-slave architecture, integrated circuit A acts as a "master" role (master), and integrated circuit B acts as a "slave (slave)" role (controlled end). The frequency signal required for synchronous operation is fixedly provided by the integrated circuit A, and the integrated circuit B receives the frequency signal of the integrated circuit A for coordinated operation. IC B cannot change from slave to master.

发明内容Contents of the invention

本发明提供一种电子装置及其操作方法,以依照操作需求而将控制权动态地切换给第一集成电路以及第二集成电路其中一者。The invention provides an electronic device and its operation method, which can dynamically switch the control right to one of the first integrated circuit and the second integrated circuit according to the operation requirement.

本发明的实施例提供一种电子装置。所述电子装置包括第一集成电路以及第二集成电路。第一集成电路至少具有方向接脚与频率接脚,其中第一集成电路的方向接脚输出方向控制信号。第二集成电路至少具有方向接脚与频率接脚。第二集成电路的方向接脚耦接第一集成电路的方向接脚,以接收方向控制信号。第二集成电路的频率接脚耦接第一集成电路的频率接脚。当方向控制信号为第一逻辑态时,第一集成电路取得控制权。当第一集成电路取得控制权时,第一集成电路的频率接脚输出第一频率信号给第二集成电路的频率接脚。当方向控制信号为第二逻辑态时,第二集成电路取得控制权。当第二集成电路取得控制权时,第二集成电路的频率接脚输出第二频率信号给第一集成电路的频率接脚。An embodiment of the invention provides an electronic device. The electronic device includes a first integrated circuit and a second integrated circuit. The first integrated circuit has at least a direction pin and a frequency pin, wherein the direction pin of the first integrated circuit outputs a direction control signal. The second integrated circuit has at least a direction pin and a frequency pin. The direction pin of the second integrated circuit is coupled to the direction pin of the first integrated circuit to receive the direction control signal. The clock pin of the second integrated circuit is coupled to the clock pin of the first integrated circuit. When the direction control signal is in the first logic state, the first integrated circuit takes control. When the first integrated circuit takes control, the frequency pin of the first integrated circuit outputs the first frequency signal to the frequency pin of the second integrated circuit. When the direction control signal is in the second logic state, the second integrated circuit takes control. When the second integrated circuit takes control, the frequency pin of the second integrated circuit outputs a second frequency signal to the frequency pin of the first integrated circuit.

本发明的实施例提供一种电子装置的操作方法。电子装置包括第一集成电路以及第二集成电路。所述操作方法包括:由第一集成电路的方向接脚输出方向控制信号给第二集成电路的方向接脚;当方向控制信号为第一逻辑态时,由第一集成电路取得控制权;当第一集成电路取得控制权时,由第一集成电路的频率接脚输出第一频率信号给第二集成电路的频率接脚;当方向控制信号为第二逻辑态时,由第二集成电路取得控制权;以及当第二集成电路取得控制权时,由第二集成电路的频率接脚输出第二频率信号给第一集成电路的频率接脚。An embodiment of the invention provides an operating method of an electronic device. The electronic device includes a first integrated circuit and a second integrated circuit. The operation method includes: outputting a direction control signal from the direction pin of the first integrated circuit to the direction pin of the second integrated circuit; when the direction control signal is in the first logic state, the first integrated circuit obtains the control right; When the first integrated circuit obtains the control right, the frequency pin of the first integrated circuit outputs the first frequency signal to the frequency pin of the second integrated circuit; when the direction control signal is in the second logic state, the second integrated circuit obtains control and when the second integrated circuit obtains the control right, the frequency pin of the second integrated circuit outputs a second frequency signal to the frequency pin of the first integrated circuit.

基于上述,本发明诸实施例所述电子装置及其操作方法可以通过方向控制信号而将控制权动态地切换给第一集成电路以及第二集成电路其中一者。当第一集成电路取得控制权时,第一集成电路可以输出第一频率信号给第二集成电路。当第二集成电路取得控制权时,第二集成电路可以输出第二频率信号给第一集成电路。Based on the above, the electronic device and its operating method according to the embodiments of the present invention can dynamically switch the control right to one of the first integrated circuit and the second integrated circuit through the direction control signal. When the first integrated circuit takes control, the first integrated circuit can output the first frequency signal to the second integrated circuit. When the second integrated circuit takes control, the second integrated circuit can output the second frequency signal to the first integrated circuit.

为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.

附图说明Description of drawings

图1是依照本发明的实施例的一种电子装置的电路方块(circuit block)示意图。FIG. 1 is a schematic diagram of a circuit block of an electronic device according to an embodiment of the present invention.

图2是依照本发明的实施例的一种电子装置的操作方法的流程示意图。FIG. 2 is a schematic flowchart of an operating method of an electronic device according to an embodiment of the invention.

图3是依照本发明的实施例说明图1所示电路的信号的时序示意图。FIG. 3 is a timing diagram illustrating signals of the circuit shown in FIG. 1 according to an embodiment of the present invention.

图4是依照本发明的另一实施例说明图1所示电路的信号的时序示意图。FIG. 4 is a timing diagram illustrating signals of the circuit shown in FIG. 1 according to another embodiment of the present invention.

图5是依照本发明的又一实施例说明图1所示电路的信号的时序示意图。FIG. 5 is a timing diagram illustrating signals of the circuit shown in FIG. 1 according to yet another embodiment of the present invention.

图6是依照本发明的再一实施例说明图1所示电路的信号的时序示意图。FIG. 6 is a timing diagram illustrating signals of the circuit shown in FIG. 1 according to yet another embodiment of the present invention.

具体实施方式Detailed ways

在本发明说明书全文(包括权利要求)中所使用的“耦接(或连接)”一词可指任何直接或间接的连接手段。举例而言,若文中描述第一装置耦接(或连接)于第二装置,则应该被解释成该第一装置可以直接连接于该第二装置,或者该第一装置可以通过其他装置或某种连接手段而间接地连接至该第二装置。另外,凡可能之处,在附图及实施方式中使用相同标号的组件/构件/步骤代表相同或类似部分。不同实施例中使用相同标号或使用相同用语的组件/构件/步骤可以相互参照相关说明。As used throughout the present specification, including the claims, the term "coupled (or connected)" may refer to any means of connection, direct or indirect. For example, if it is described that a first device is coupled (or connected) to a second device, it should be interpreted that the first device can be directly connected to the second device, or the first device can be connected to the second device through other devices or certain A connection means indirectly connected to the second device. In addition, wherever possible, components/members/steps using the same reference numerals in the drawings and embodiments represent the same or similar parts. Components/components/steps using the same symbols or using the same terms in different embodiments can refer to related descriptions.

图1是依照本发明的一实施例的一种电子装置100的电路方块(circuit block)示意图。所述电子装置100包括第一集成电路110以及第二集成电路120。第一集成电路110至少具有方向接脚DR、频率接脚CK、第一数据接脚D1与第二数据接脚D2。第二集成电路120至少具有方向接脚DR、频率接脚CK、第一数据接脚D1与第二数据接脚D2。依照设计需求,第一集成电路110可能还配置有其他接脚,而第二集成电路120亦可能还配置有其他接脚。FIG. 1 is a schematic diagram of a circuit block of an electronic device 100 according to an embodiment of the present invention. The electronic device 100 includes a first integrated circuit 110 and a second integrated circuit 120 . The first integrated circuit 110 has at least a direction pin DR, a frequency pin CK, a first data pin D1 and a second data pin D2. The second integrated circuit 120 has at least a direction pin DR, a frequency pin CK, a first data pin D1 and a second data pin D2. According to design requirements, the first integrated circuit 110 may also be configured with other pins, and the second integrated circuit 120 may also be configured with other pins.

第一集成电路110的方向接脚DR输出方向控制信号DIR。第二集成电路120的方向接脚DR耦接第一集成电路110的方向接脚DR,以接收方向控制信号DIR。第二集成电路120的频率接脚CK耦接第一集成电路110的频率接脚CK。第二集成电路120的第一数据接脚D1耦接第一集成电路110的第一数据接脚D1。第二集成电路120的第二数据接脚D2耦接第一集成电路110的第二数据接脚D2。The direction pin DR of the first integrated circuit 110 outputs a direction control signal DIR. The direction pin DR of the second integrated circuit 120 is coupled to the direction pin DR of the first integrated circuit 110 to receive the direction control signal DIR. The clock pin CK of the second integrated circuit 120 is coupled to the clock pin CK of the first integrated circuit 110 . The first data pin D1 of the second integrated circuit 120 is coupled to the first data pin D1 of the first integrated circuit 110 . The second data pin D2 of the second integrated circuit 120 is coupled to the second data pin D2 of the first integrated circuit 110 .

图2是依照本发明的一实施例的一种电子装置的操作方法的流程示意图。请参照图1与图2。在步骤S210中,第一集成电路110的方向接脚DR输出方向控制信号DIR给第二集成电路120的方向接脚DR。步骤S220判断方向控制信号DIR的逻辑态。当步骤S220的判断结果表示方向控制信号DIR为第一逻辑态时,步骤S230会被进行。当步骤S220的判断结果表示方向控制信号DIR为第二逻辑态时,步骤S250会被进行。FIG. 2 is a schematic flowchart of an operating method of an electronic device according to an embodiment of the present invention. Please refer to Figure 1 and Figure 2. In step S210 , the direction pin DR of the first integrated circuit 110 outputs a direction control signal DIR to the direction pin DR of the second integrated circuit 120 . Step S220 determines the logic state of the direction control signal DIR. When the determination result of step S220 indicates that the direction control signal DIR is in the first logic state, step S230 will be performed. When the determination result of step S220 indicates that the direction control signal DIR is in the second logic state, step S250 will be performed.

所述第一逻辑态与所述第二逻辑态可以依照设计需求来决定。举例来说,在一实施例中,所述第一逻辑态可以是逻辑态“1”(例如高逻辑准位),而所述第二逻辑态可以是逻辑态“0”(例如低逻辑准位)。在另一实施例中,所述第一逻辑态可以是逻辑态“0”,而所述第二逻辑态可以是逻辑态“1”。The first logic state and the second logic state can be determined according to design requirements. For example, in one embodiment, the first logic state may be a logic state "1" (such as a high logic level), and the second logic state may be a logic state "0" (such as a low logic level bits). In another embodiment, the first logic state may be a logic state "0" and the second logic state may be a logic state "1".

所述方向控制信号DIR的初始态可以依照设计需求来决定。举例来说,在一实施例中,所述方向控制信号DIR的初始态可以是第二逻辑态。在另一实施例中,所述方向控制信号DIR的初始态可以是第一逻辑态。The initial state of the direction control signal DIR can be determined according to design requirements. For example, in an embodiment, the initial state of the direction control signal DIR may be the second logic state. In another embodiment, the initial state of the direction control signal DIR may be a first logic state.

当方向控制信号DIR为第一逻辑态时,第一集成电路110在步骤S230中取得控制权。当第一集成电路110取得控制权时,第一集成电路110的频率接脚CK在步骤S240中输出频率信号SCL给第二集成电路120的频率接脚CK。当方向控制信号DIR为第二逻辑态时,第二集成电路120在步骤S250中取得控制权。当第二集成电路120取得控制权时,第二集成电路120的频率接脚CK在步骤S260中输出频率信号SCL给第一集成电路110的频率接脚CK。When the direction control signal DIR is at the first logic state, the first integrated circuit 110 takes control in step S230. When the first integrated circuit 110 takes control, the clock pin CK of the first integrated circuit 110 outputs the clock signal SCL to the clock pin CK of the second integrated circuit 120 in step S240 . When the direction control signal DIR is at the second logic state, the second integrated circuit 120 takes control in step S250 . When the second integrated circuit 120 takes control, the clock pin CK of the second integrated circuit 120 outputs the clock signal SCL to the clock pin CK of the first integrated circuit 110 in step S260 .

因此,本实施例可以通过方向控制信号DIR而将控制权动态地切换给第一集成电路110以及第二集成电路120其中一者。举例来说,在主仆架构中,取得控制权的第一集成电路110可以担任“主(master)”角色(主控端),而第二集成电路120则担任“仆(slave)”角色(被控端)。当第一集成电路110取得控制权时,第一集成电路110可以输出频率信号SCL给第二集成电路120。在控制权从第一集成电路110动态地被切换给第二集成电路120后,取得控制权的第二集成电路120可以改担任“主”角色(主控端),而第一集成电路110则改担任“仆”角色(被控端)。当第二集成电路120取得控制权时,第二集成电路120可以输出第二频率信号SCL给第一集成电路110。基于频率信号SCL,第一集成电路110与第二集成电路120可以进行协同操作。Therefore, in this embodiment, the control right can be dynamically switched to one of the first integrated circuit 110 and the second integrated circuit 120 through the direction control signal DIR. For example, in the master-slave architecture, the first integrated circuit 110 that obtains the control can act as a "master (master)" role (master control end), while the second integrated circuit 120 acts as a "slave (slave)" role ( controlled end). When the first integrated circuit 110 takes control, the first integrated circuit 110 can output the frequency signal SCL to the second integrated circuit 120 . After the control right is dynamically switched from the first integrated circuit 110 to the second integrated circuit 120, the second integrated circuit 120 that has obtained the control right can be changed to the "master" role (master control terminal), while the first integrated circuit 110 is Change to the role of "servant" (accused end). When the second integrated circuit 120 takes control, the second integrated circuit 120 can output the second frequency signal SCL to the first integrated circuit 110 . Based on the frequency signal SCL, the first integrated circuit 110 and the second integrated circuit 120 can perform cooperative operations.

当第一集成电路110取得控制权时,第一集成电路110的第一数据接脚D1作为第一集成电路110的数据输出接脚,而第二集成电路120的第一数据接脚D1作为第二集成电路120的数据输入接脚。因此,取得控制权的第一集成电路110可以输出主数据信号MOSI给第二集成电路120。当第一集成电路110取得控制权时,第一集成电路110的第二数据接脚D2作为第一集成电路110的数据输入接脚,而第二集成电路120的第二数据接脚D2作为第二集成电路120的数据输出接脚。因此,基于第一集成电路110的控制,第二集成电路120可以输出仆数据信号MISO给第一集成电路110。When the first integrated circuit 110 takes control, the first data pin D1 of the first integrated circuit 110 acts as the data output pin of the first integrated circuit 110, and the first data pin D1 of the second integrated circuit 120 acts as the second A data input pin of the integrated circuit 120 . Therefore, the first integrated circuit 110 that obtains the control right can output the main data signal MOSI to the second integrated circuit 120 . When the first integrated circuit 110 takes control, the second data pin D2 of the first integrated circuit 110 acts as the data input pin of the first integrated circuit 110, and the second data pin D2 of the second integrated circuit 120 acts as the second A data output pin of the integrated circuit 120 . Therefore, based on the control of the first integrated circuit 110 , the second integrated circuit 120 can output the slave data signal MISO to the first integrated circuit 110 .

当第二集成电路120取得控制权时,第二集成电路120的第一数据接脚D1作为第二集成电路120的数据输出接脚,而第一集成电路110的第一数据接脚D1作为第一集成电路110的数据输入接脚。因此,取得控制权的第二集成电路120可以输出主数据信号MOSI给第一集成电路110。当第二集成电路120取得控制权时,第二集成电路120的第二数据接脚D2作为第二集成电路120的数据输入接脚,而第一集成电路110的第二数据接脚D2作为第一集成电路110的数据输出接脚。因此,基于第二集成电路120的控制,第一集成电路110可以输出仆数据信号MISO给第二集成电路120。When the second integrated circuit 120 takes control, the first data pin D1 of the second integrated circuit 120 acts as the data output pin of the second integrated circuit 120, and the first data pin D1 of the first integrated circuit 110 acts as the first A data input pin of the integrated circuit 110 . Therefore, the second integrated circuit 120 that obtains the control right can output the main data signal MOSI to the first integrated circuit 110 . When the second integrated circuit 120 takes control, the second data pin D2 of the second integrated circuit 120 acts as a data input pin of the second integrated circuit 120, and the second data pin D2 of the first integrated circuit 110 acts as the first A data output pin of the integrated circuit 110 . Therefore, based on the control of the second integrated circuit 120 , the first integrated circuit 110 can output the slave data signal MISO to the second integrated circuit 120 .

在本实施例中,“在频率接脚CK的信号为第三逻辑态时,第一数据接脚D1的信号从第四逻辑态转态至第五逻辑态”被定义为一个起始信号。所述起始信号表示数据传输期间的开始。“在频率接脚CK的信号为第三逻辑态时,第一数据接脚D1的信号从第五逻辑态转态至第四逻辑态”被定义为一个结束信号。所述结束信号表示数据传输期间的结束。所述第三逻辑态、第四逻辑态与第五逻辑态可以依照设计需求来设定。举例来说,在本实施例中,所述第三逻辑态可以是逻辑态“1”(例如高逻辑准位),所述第四逻辑态可以是逻辑态“1”,而所述第五逻辑态可以是逻辑态“0”(例如低逻辑准位)。在另一实施例中,所述第三逻辑态可以是逻辑态“0”,所述第四逻辑态可以是逻辑态“0”,而所述第五逻辑态可以是逻辑态“1”。In this embodiment, “the signal of the first data pin D1 transitions from the fourth logic state to the fifth logic state when the signal of the clock pin CK is in the third logic state” is defined as a start signal. The start signal indicates the beginning of a data transfer period. “When the signal of the clock pin CK is at the third logic state, the signal of the first data pin D1 transitions from the fifth logic state to the fourth logic state” is defined as an end signal. The end signal indicates the end of the data transmission period. The third logic state, the fourth logic state and the fifth logic state can be set according to design requirements. For example, in this embodiment, the third logic state may be a logic state "1" (such as a high logic level), the fourth logic state may be a logic state "1", and the fifth logic state may be a logic state "1". The logic state may be a logic state "0" (eg, a low logic level). In another embodiment, the third logic state may be a logic state "0", the fourth logic state may be a logic state "0", and the fifth logic state may be a logic state "1".

图3是依照本发明的一实施例说明图1所示电路的信号的时序示意图。请参照图1与图3。在图3所示实施例中,“在频率接脚CK的频率信号SCL为逻辑态1(例如高逻辑准位)时,第一数据接脚D1的主数据信号MOSI从逻辑态1转态至逻辑态0(例如低逻辑准位)”被定义为一个起始信号STA,而“在频率信号SCL为逻辑态1时,主数据信号MOSI从逻辑态0转态至逻辑态1”被定义为一个结束信号STP。所述起始信号STA表示数据传输期间的开始,而所述结束信号STP表示数据传输期间的结束。FIG. 3 is a timing diagram illustrating signals of the circuit shown in FIG. 1 according to an embodiment of the present invention. Please refer to Figure 1 and Figure 3. In the embodiment shown in FIG. 3, "when the frequency signal SCL of the frequency pin CK is in logic state 1 (for example, a high logic level), the main data signal MOSI of the first data pin D1 transitions from logic state 1 to Logic state 0 (such as low logic level)" is defined as a start signal STA, and "when the frequency signal SCL is logic state 1, the main data signal MOSI transitions from logic state 0 to logic state 1" is defined as An end signal STP. The start signal STA indicates the start of a data transmission period, and the end signal STP indicates the end of a data transmission period.

在图3所示实施例中,所述方向控制信号DIR的初始态被假设是逻辑态“0”(例如低逻辑准位)。当方向控制信号DIR为逻辑态“0”时,第二集成电路120取得控制权。当第二集成电路120取得控制权时(亦即当方向控制信号DIR为逻辑态“0”时),第二集成电路120可以输出频率信号SCL给第一集成电路110,以及第二集成电路120可以输出起始信号STA给第一集成电路110,以开启一个数据传输期间DP1。在数据传输期间DP1中,频率信号SCL的脉冲宽度(持续高逻辑准位的时间长)或波谷宽度(持续低逻辑准位的时间长)小于门坎宽度,其中所述门坎宽度可以依照设计需求来决定。在数据传输期间DP1中,第二集成电路120可以输出主数据信号MOSI给第一集成电路110,并且第一集成电路110可以输出仆数据信号MISO给第二集成电路120。在数据传输期间DP1中,主数据信号MOSI在频率信号SCL为低逻辑准位时可以进行转态(transition),而且主数据信号MOSI在频率信号SCL为高逻辑准位时不进行转态。仆数据信号MISO的操作可以参照主数据信号MOSI的相关说明来类推。第二集成电路120可以输出结束信号STP给第一集成电路110,以结束数据传输期间DP1。In the embodiment shown in FIG. 3 , the initial state of the direction control signal DIR is assumed to be a logic state “0” (eg, a low logic level). When the direction control signal DIR is at the logic state “0”, the second integrated circuit 120 takes control. When the second integrated circuit 120 takes control (that is, when the direction control signal DIR is logic state "0"), the second integrated circuit 120 can output the frequency signal SCL to the first integrated circuit 110, and the second integrated circuit 120 can The start signal STA is output to the first integrated circuit 110 to start a data transmission period DP1. During the data transmission period DP1, the pulse width (the duration of the high logic level) or the valley width (the duration of the low logic level) of the frequency signal SCL is smaller than the threshold width, wherein the threshold width can be adjusted according to design requirements. Decide. During the data transmission period DP1 , the second integrated circuit 120 may output the master data signal MOSI to the first integrated circuit 110 , and the first integrated circuit 110 may output the slave data signal MISO to the second integrated circuit 120 . During the data transmission period DP1, the main data signal MOSI can transition when the clock signal SCL is at a low logic level, and the main data signal MOSI does not transition when the clock signal SCL is at a high logic level. The operation of the slave data signal MISO can be analogized with reference to the related description of the master data signal MOSI. The second integrated circuit 120 may output an end signal STP to the first integrated circuit 110 to end the data transmission period DP1.

第一集成电路110可以将方向控制信号DIR拉升至逻辑态1(例如高逻辑准位),以便从第二集成电路120取回控制权。当第一集成电路110取得控制权时(亦即当方向控制信号DIR为逻辑态“1”时),第一集成电路110可以输出频率信号SCL给第二集成电路120,以及第一集成电路110可以输出起始信号STA给第二集成电路120,以开启一个数据传输期间DP2。在数据传输期间DP2中,第一集成电路110可以输出主数据信号MOSI给第二集成电路120,并且第二集成电路120可以输出仆数据信号MISO给第一集成电路110。在数据传输期间DP2中的频率信号SCL、主数据信号MOSI与仆数据信号MISO的操作可以参照数据传输期间DP1的相关说明来类推。第一集成电路110可以输出结束信号STP给第二集成电路120,以结束数据传输期间DP2。The first integrated circuit 110 can pull up the direction control signal DIR to a logic state 1 (for example, a high logic level), so as to take back control from the second integrated circuit 120 . When the first integrated circuit 110 takes control (that is, when the direction control signal DIR is logic state "1"), the first integrated circuit 110 can output the frequency signal SCL to the second integrated circuit 120, and the first integrated circuit 110 can The start signal STA is output to the second integrated circuit 120 to start a data transmission period DP2. During the data transmission period DP2 , the first integrated circuit 110 may output the master data signal MOSI to the second integrated circuit 120 , and the second integrated circuit 120 may output the slave data signal MISO to the first integrated circuit 110 . The operation of the clock signal SCL, the main data signal MOSI and the slave data signal MISO in the data transmission period DP2 can be analogized with reference to the related description of the data transmission period DP1. The first integrated circuit 110 may output an end signal STP to the second integrated circuit 120 to end the data transmission period DP2.

在此假设频率信号SCL于数据传输期间(例如图3所示数据传输期间DP1或数据传输期间DP2)的脉冲宽度(或波谷宽度)小于一个门坎宽度。所述门坎宽度可以依照设计需求来决定。在图1所示实施例中,“当第一集成电路110取得控制权时,频率信号SCL的脉冲宽度(或波谷宽度)大于门坎宽度”被定义为一个重置信号。第一集成电路110可以通过所述重置信号来重置第二集成电路120。因此,第一集成电路110(第二集成电路120)可以省去额外的重置接脚。It is assumed here that the pulse width (or valley width) of the clock signal SCL during the data transmission period (eg, the data transmission period DP1 or the data transmission period DP2 shown in FIG. 3 ) is smaller than a threshold width. The threshold width may be determined according to design requirements. In the embodiment shown in FIG. 1 , “when the first integrated circuit 110 takes control, the pulse width (or valley width) of the frequency signal SCL is greater than the threshold width” is defined as a reset signal. The first integrated circuit 110 can reset the second integrated circuit 120 through the reset signal. Therefore, the first integrated circuit 110 (the second integrated circuit 120 ) can save an extra reset pin.

图4是依照本发明的另一实施例说明图1所示电路的信号的时序示意图。请参照图1与图4。在图4所示实施例中,“当第一集成电路110取得控制权时(亦即当方向控制信号DIR为逻辑态”1“时),频率信号SCL与/或主数据信号MOSI被下拉并持续超过所述门坎宽度(例如超过1毫秒)”被定义为一个重置信号RST。第一集成电路110可以通过所述重置信号RST来重置第二集成电路120。FIG. 4 is a timing diagram illustrating signals of the circuit shown in FIG. 1 according to another embodiment of the present invention. Please refer to Figure 1 and Figure 4. In the embodiment shown in FIG. 4, "when the first integrated circuit 110 takes control (that is, when the direction control signal DIR is logic state "1"), the frequency signal SCL and/or the main data signal MOSI are pulled down and last Exceeding the threshold width (for example, exceeding 1 millisecond)" is defined as a reset signal RST. The first integrated circuit 110 can reset the second integrated circuit 120 through the reset signal RST.

图5是依照本发明的又一实施例说明图1所示电路的信号的时序示意图。请参照图1与图5。在图5所示实施例中,“方向控制信号DIR的脉冲宽度PW落于一个宽度范围内”被定义为一个中断(interrupt)信号INT。所述宽度范围可以依照设计需求来决定。例如,所述宽度范围可以是1微秒至10微秒。第一集成电路110可以通过中断信号INT通知第二集成电路一个中断要求。因此,第一集成电路110(第二集成电路120)可以省去额外的中断接脚。FIG. 5 is a timing diagram illustrating signals of the circuit shown in FIG. 1 according to yet another embodiment of the present invention. Please refer to Figure 1 and Figure 5. In the embodiment shown in FIG. 5 , "the pulse width PW of the direction control signal DIR falls within a width range" is defined as an interrupt signal INT. The width range may be determined according to design requirements. For example, the width may range from 1 microsecond to 10 microseconds. The first integrated circuit 110 can notify the second integrated circuit of an interrupt request through the interrupt signal INT. Therefore, the first integrated circuit 110 (the second integrated circuit 120 ) can save an extra interrupt pin.

图6是依照本发明的再一实施例说明图1所示电路的信号的时序示意图。请参照图1与图6。在此假设第一集成电路110具有一个中断旗标(或是中断缓存器)。在图6所示实施例中,当第二集成电路120从第一集成电路110取得控制权时(亦即在方向控制信号DIR为从逻辑态“1”转态至逻辑态“0”后),第二集成电路120会先通过主数据信号MOSI要求读取第一集成电路110的所述中断旗标(或是中断缓存器)。基于第二集成电路120的要求/控制,第一集成电路110可以通过仆数据信号MISO而将所述中断旗标(或是中断缓存器)的内容回传给第二集成电路120。依照所述中断旗标(或是中断缓存器)的内容,第二集成电路120可以得知第一集成电路有无提出中断要求。因此,第一集成电路110(第二集成电路120)可以省去额外的中断接脚。FIG. 6 is a timing diagram illustrating signals of the circuit shown in FIG. 1 according to yet another embodiment of the present invention. Please refer to Figure 1 and Figure 6. Here it is assumed that the first integrated circuit 110 has an interrupt flag (or an interrupt register). In the embodiment shown in FIG. 6, when the second integrated circuit 120 obtains the control right from the first integrated circuit 110 (that is, after the direction control signal DIR is changed from a logic state "1" to a logic state "0"), The second integrated circuit 120 first requests to read the interrupt flag (or interrupt register) of the first integrated circuit 110 through the main data signal MOSI. Based on the requirement/control of the second integrated circuit 120 , the first integrated circuit 110 may send back the content of the interrupt flag (or the interrupt register) to the second integrated circuit 120 through the slave data signal MISO. According to the content of the interrupt flag (or the interrupt register), the second integrated circuit 120 can know whether the first integrated circuit has issued an interrupt request. Therefore, the first integrated circuit 110 (the second integrated circuit 120 ) can save an extra interrupt pin.

值得注意的是,在不同的应用情境中,第一集成电路110及/或第二集成电路120的相关功能可以利用一般的编程语言(programming languages,例如C或C++)、硬件描述语言(hardware description languages,例如Verilog HDL或VHDL)或其他合适的编程语言来实现为软件、韧体或硬件。可执行所述相关功能的编程语言可以被布置为任何已知的计算器可存取媒体(computer-accessible medias),例如磁带(magnetic tapes)、半导体(semiconductors)内存、磁盘(magnetic disks)或光盘(compact disks,例如CD-ROM或DVD-ROM),或者可通过互联网(Internet)、有线通信(wired communication)、无线通信(wireless communication)或其它通信介质传送所述编程语言。所述编程语言可以被存放在计算器的可存取媒体中,以便于由计算器的处理器来存取/执行所述软件(或韧体)的编程码(programming codes)。对于硬件实现,一或多个控制器、微控制器、微处理器、特殊应用集成电路(Application-specific integrated circuit,ASIC)、数字信号处理器(digital signal processor,DSP)、场可程序逻辑门阵列(Field Programmable GateArray,FPGA)及/或其他处理单元中的各种逻辑区块、模块和电路可以被用于实现或执行本文实施例所述功能。另外,本发明的装置和方法可以通过硬件和软件的组合来实现。It should be noted that, in different application scenarios, the relevant functions of the first integrated circuit 110 and/or the second integrated circuit 120 can use general programming languages (programming languages, such as C or C++), hardware description languages (hardware description) languages, such as Verilog HDL or VHDL) or other suitable programming languages to be implemented as software, firmware or hardware. The programming language that can perform the relevant functions can be arranged as any known computer-accessible media, such as magnetic tapes, semiconductors memory, magnetic disks or optical disks (compact disks, such as CD-ROM or DVD-ROM), or the programming language can be transmitted through the Internet (Internet), wired communication (wired communication), wireless communication (wireless communication) or other communication media. The programming language can be stored in an accessible medium of the computer, so that the processor of the computer can access/execute the programming codes of the software (or firmware). For hardware implementation, one or more controllers, microcontrollers, microprocessors, application-specific integrated circuits (ASICs), digital signal processors (DSPs), field programmable logic gates Various logic blocks, modules and circuits in an array (Field Programmable Gate Array, FPGA) and/or other processing units may be used to implement or execute the functions described in the embodiments herein. In addition, the apparatus and method of the present invention can be realized by a combination of hardware and software.

综上所述,上述诸实施例所述电子装置100及其操作方法可以通过方向控制信号DIR而控制权动态地切换给第一集成电路110以及第二集成电路120其中一者。当第一集成电路110取得控制权时,第一集成电路110可以输出频率信号SCL给第二集成电路120,以及第一集成电路110可以输出主数据信号MOSI给第二集成电路120。基于取得控制权的第一集成电路110的控制,第二集成电路120可以输出仆数据信号MISO给第一集成电路110。当第二集成电路120取得控制权时,第二集成电路120可以输出频率信号SCL给第一集成电路110,以及第二集成电路120可以输出主数据信号MOSI给第一集成电路110。基于取得控制权的第二集成电路120的控制,第一集成电路110可以输出仆数据信号MISO给第二集成电路120。To sum up, the electronic device 100 and its operating method in the above embodiments can be dynamically switched to one of the first integrated circuit 110 and the second integrated circuit 120 through the direction control signal DIR. When the first integrated circuit 110 takes control, the first integrated circuit 110 can output the clock signal SCL to the second integrated circuit 120 , and the first integrated circuit 110 can output the main data signal MOSI to the second integrated circuit 120 . Based on the control of the first integrated circuit 110 which has taken control, the second integrated circuit 120 may output the slave data signal MISO to the first integrated circuit 110 . When the second integrated circuit 120 takes control, the second integrated circuit 120 can output the clock signal SCL to the first integrated circuit 110 , and the second integrated circuit 120 can output the main data signal MOSI to the first integrated circuit 110 . Based on the control of the second integrated circuit 120 which takes control, the first integrated circuit 110 may output the slave data signal MISO to the second integrated circuit 120 .

虽然本发明已以实施例揭露如上,然其并非用以限定本发明,任何本领域技术人员,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,故本发明的保护范围当视后附的权利要求所界定者为准。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection shall prevail as defined by the appended claims.

Claims (14)

1. An electronic device, comprising:
a first integrated circuit having at least a direction pin and a frequency pin, wherein the direction pin of the first integrated circuit outputs a direction control signal; and
a second integrated circuit having at least a direction pin and a frequency pin, wherein the direction pin of the second integrated circuit is coupled to the direction pin of the first integrated circuit to receive the direction control signal, the frequency pin of the second integrated circuit is coupled to the frequency pin of the first integrated circuit,
wherein the first integrated circuit gains control when the direction control signal is in a first logic state, the frequency pin of the first integrated circuit outputs a first frequency signal to the frequency pin of the second integrated circuit when the first integrated circuit gains the control, the second integrated circuit gains the control when the direction control signal is in a second logic state, and the frequency pin of the second integrated circuit outputs a second frequency signal to the frequency pin of the first integrated circuit when the second integrated circuit gains the control.
2. The electronic device of claim 1, wherein the initial state of the direction control signal is the second logic state.
3. The electronic device of claim 1, wherein the first integrated circuit further has a first data pin and a second data pin, the second integrated circuit further has a first data pin and a second data pin, the first data pin of the second integrated circuit is coupled to the first data pin of the first integrated circuit, the second data pin of the second integrated circuit is coupled to the second data pin of the first integrated circuit;
wherein when the first integrated circuit obtains the control right, the first data pin of the first integrated circuit is used as a data output pin of the first integrated circuit, the first data pin of the second integrated circuit is used as a data input pin of the second integrated circuit, the second data pin of the first integrated circuit is used as a data input pin of the first integrated circuit, and the second data pin of the second integrated circuit is used as a data output pin of the second integrated circuit; and
when the second integrated circuit obtains the control right, the first data pin of the second integrated circuit is used as the data output pin of the second integrated circuit, the first data pin of the first integrated circuit is used as the data input pin of the first integrated circuit, the second data pin of the second integrated circuit is used as the data input pin of the second integrated circuit, and the second data pin of the first integrated circuit is used as the data output pin of the first integrated circuit.
4. The electronic device according to claim 3, wherein "the transition of the signals of the plurality of first data pins from a fourth logic state to a fifth logic state when the signals of the frequency pins of the first and second integrated circuits are in the third logic state" is defined as a start signal indicating the start of a data transfer period, "the transition of the signals of the plurality of first data pins from the fifth logic state to the fourth logic state when the signals of the frequency pins of the first and second integrated circuits are in the third logic state" is defined as an end signal indicating the end of the data transfer period.
5. The electronic device of claim 1, wherein a pulse width of the first clock signal during data transmission is less than a threshold width, and a reset signal is defined as the pulse width of the first clock signal being greater than the threshold width when the first integrated circuit obtains the control right, and the first integrated circuit resets the second integrated circuit through the reset signal.
6. The electronic apparatus according to claim 1, wherein "a pulse width of the direction control signal falls within a width range" is defined as an interrupt signal by which the first integrated circuit notifies the second integrated circuit of an interrupt request.
7. The electronic device as claimed in claim 1, wherein the first IC has an interrupt flag, and when the second IC obtains the control right from the first IC, the second IC reads the interrupt flag of the first IC to know whether the first IC has an interrupt request.
8. A method of operation of an electronic device, wherein the electronic device includes a first integrated circuit and a second integrated circuit, the method of operation comprising:
outputting a direction control signal to a direction pin of the second integrated circuit by the direction pin of the first integrated circuit;
when the direction control signal is in a first logic state, the first integrated circuit obtains control power;
when the first integrated circuit obtains the control right, the frequency pin of the first integrated circuit outputs a first frequency signal to the frequency pin of the second integrated circuit;
when the direction control signal is in a second logic state, the second integrated circuit obtains the control right; and
when the second IC obtains the control right, the frequency pin of the second IC outputs a second frequency signal to the frequency pin of the first IC.
9. The method of operation of claim 8, wherein the initial state of the direction control signal is the second logic state.
10. The method of claim 8, wherein a first data pin of the second integrated circuit is coupled to a first data pin of the first integrated circuit, and a second data pin of the second integrated circuit is coupled to a second data pin of the first integrated circuit;
when the first integrated circuit obtains the control right, a first data pin of the first integrated circuit is used as a data output pin of the first integrated circuit, a first data pin of the second integrated circuit is used as a data input pin of the second integrated circuit, a second data pin of the first integrated circuit is used as a data input pin of the first integrated circuit, and a second data pin of the second integrated circuit is used as a data output pin of the second integrated circuit; and
when the second integrated circuit obtains the control right, the first data pin of the second integrated circuit is used as the data output pin of the second integrated circuit, the first data pin of the first integrated circuit is used as the data input pin of the first integrated circuit, the second data pin of the second integrated circuit is used as the data input pin of the second integrated circuit, and the second data pin of the first integrated circuit is used as the data output pin of the first integrated circuit.
11. The method of operation of claim 10, further comprising:
defining "signals of the plurality of first data pins transition from a fourth logic state to a fifth logic state when signals of the frequency pins of the first and second integrated circuits are in a third logic state" as a start signal, wherein the start signal represents a start of a data transfer period; and
defining "the signals of the plurality of first data pins transition from the fifth logic state to the fourth logic state when the signals of the frequency pins of the first and second integrated circuits are the third logic state" as an end signal, wherein the end signal indicates an end of the data transfer period.
12. The method of operation of claim 8, wherein a pulse width of the first frequency signal during data transmission is less than a threshold width, the method of operation further comprising:
defining the pulse width of the first clock signal greater than the threshold width when the first integrated circuit obtains the control right as a reset signal, wherein the first integrated circuit resets the second integrated circuit through the reset signal.
13. The method of operation of claim 8, further comprising:
defining "the pulse width of the direction control signal falls within a width range" as an interrupt signal, wherein the first integrated circuit informs the second integrated circuit of an interrupt requirement through the interrupt signal.
14. The method of operation of claim 8, wherein the first integrated circuit has an interrupt flag, the method of operation further comprising:
when the second IC obtains the control right from the first IC, the second IC reads the interrupt flag of the first IC to know whether the first IC has proposed an interrupt request.
CN201810006999.9A 2018-01-04 2018-01-04 Electronic device and operation method thereof Active CN110008155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810006999.9A CN110008155B (en) 2018-01-04 2018-01-04 Electronic device and operation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810006999.9A CN110008155B (en) 2018-01-04 2018-01-04 Electronic device and operation method thereof

Publications (2)

Publication Number Publication Date
CN110008155A CN110008155A (en) 2019-07-12
CN110008155B true CN110008155B (en) 2023-02-28

Family

ID=67164205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810006999.9A Active CN110008155B (en) 2018-01-04 2018-01-04 Electronic device and operation method thereof

Country Status (1)

Country Link
CN (1) CN110008155B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727801A (en) * 2008-10-31 2010-06-09 扬智科技股份有限公司 Integrated circuit for controlling operation of display module and first circuit module by shared pins
WO2011092548A1 (en) * 2010-01-26 2011-08-04 Freescale Semiconductor, Inc. Integrated circuit device and method of using combinatorial logic in a data processing circuit
CN102237873A (en) * 2010-05-05 2011-11-09 立锜科技股份有限公司 Frequency setting circuit and method for integrated circuit
CN104808132A (en) * 2014-01-29 2015-07-29 新唐科技股份有限公司 Operation recording circuit applied to integrated circuit and operation method thereof
CN106612065A (en) * 2015-10-17 2017-05-03 英特希尔美国公司 Enhanced fault reporting in voltage regulators

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080039021A (en) * 2006-10-31 2008-05-07 삼성전자주식회사 Integrated circuit system and its control method
US7673084B2 (en) * 2007-02-20 2010-03-02 Infineon Technologies Ag Bus system and methods of operation using a combined data and synchronization line to communicate between bus master and slaves
US10140243B2 (en) * 2015-12-10 2018-11-27 Qualcomm Incorporated Enhanced serial peripheral interface with hardware flow-control

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727801A (en) * 2008-10-31 2010-06-09 扬智科技股份有限公司 Integrated circuit for controlling operation of display module and first circuit module by shared pins
WO2011092548A1 (en) * 2010-01-26 2011-08-04 Freescale Semiconductor, Inc. Integrated circuit device and method of using combinatorial logic in a data processing circuit
CN102237873A (en) * 2010-05-05 2011-11-09 立锜科技股份有限公司 Frequency setting circuit and method for integrated circuit
CN104808132A (en) * 2014-01-29 2015-07-29 新唐科技股份有限公司 Operation recording circuit applied to integrated circuit and operation method thereof
CN106612065A (en) * 2015-10-17 2017-05-03 英特希尔美国公司 Enhanced fault reporting in voltage regulators

Also Published As

Publication number Publication date
CN110008155A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
TWI312937B (en) Wait aware memory arbiter
CN101135921A (en) Multi-clock switching device and switching method thereof
CN110045782B (en) Data read-write synchronous circuit and data read-write method
TW409204B (en) Expansion interface conversion device and conversion method therefor
CN114371876B (en) Configuration circuit of register and integrated circuit chip
CN103873031A (en) Non-clock trigger register
CN110008155B (en) Electronic device and operation method thereof
US8375238B2 (en) Memory system
TWI637269B (en) Electronic apparatus and operation method thereof
JP4988411B2 (en) Method and apparatus for reading data from a serial data source in a parallel format
TW510101B (en) Data transmitting device, data transmission system and method
JP2002149419A (en) Logic unit for clarifying interruption and integrated circuit
JP2006293927A (en) Direct memory access controller and system lsi including direct memory access controller
CN111984575A (en) Signal transmission circuit and method
JP2020127184A5 (en)
US10459869B2 (en) Electronic apparatus and operation method thereof
JP5528939B2 (en) Microcomputer
CN112711558B (en) Serial interrupt system, method and medium of LPC bus
CN113849445B (en) A PCIe board and its application method, system and related device
JP2019056964A (en) Semiconductor integrated circuit
KR20050122973A (en) Apparatus for reducing power consumption of advanced micro-controller bus architecture(amba)
JP4093872B2 (en) Memory control circuit
JP2005258783A (en) Data transfer device, data transfer method, image forming apparatus, and option board
JP2007334600A (en) Semiconductor integrated circuit device
CN115469583A (en) Control circuit and control method for awakening low power consumption mode

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant