Method for reading Cable ID for HDMI active cable and related products
By using a processor-controlled I2C device to monitor and switch the HDMI-SCL signal line and the HDMI-SDA signal line, the problem of being unable to monitor and respond to I2C data in the existing technology is solved, and the Cable ID data reading of the HDMI2.1 protocol is realized.
Patent Information
- Application Number
- CN202410875738.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-07-02
AI Technical Summary
In the prior art, the Cable ID processing module of the HDMI active cable cannot monitor and respond to I2C data without responding to the I2C slave address, resulting in the inability to complete the Cable ID data reading function of the HDMI2.1 protocol.
By using a processor-controlled I2C device to monitor the HDMI-SCL signal line and HDMI-SDA signal line, and utilizing clock stretching and pin switching, the I2C device can monitor and respond to I2C read operations without responding to the I2C address, thereby completing the Cable ID data reading.
The system can successfully monitor and respond to I2C data using a standard I2C device without responding to the I2C address, thus completing the Cable ID data reading function of the HDMI2.1 protocol.
Smart Images

Figure CN118860942B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the technical field of active cable data processing. More specifically, the present invention relates to a method for processing and reading a Cable ID of an HDMI active cable, a device for controlling and reading the Cable ID of an HDMI active cable, and a method for reading the Cable ID of an HDMI active cable. Background Art
[0002] The HDMI 2.1 (High Definition Multimedia Interface) protocol increases the maximum bandwidth per channel to 12Gbps. To overcome signal attenuation over long copper cables, high-speed signal processing chips are added to the cable to reshape the signal. However, HDMI source devices can only provide a maximum current of 55mA, which is clearly insufficient for cables with active chips. To address this issue, the HDMI 2.1 protocol adds the PCA (Power for Cable Assemblies) feature, allowing the source device to provide up to 300mA of current to the cable and slave devices.
[0003] PCA functionality relies on the Cable ID stored in the cable. The Cable ID is a data structure that identifies the HDMI cable's capabilities, performance, and manufacturer information, accessible to source devices. For Category 3 cables that transmit unidirectionally or require PCA power, the Cable ID is a required item for HDMI certification testing.
[0004] According to the HDMI2.1 protocol, the source device uses the IDCC (ID Communications Channel) protocol to complete Cable ID reading on the I2C bus. This requires the Cable ID processing module in the cable to monitor the data on the I2C channel and respond to the Cable ID data. At the same time, the Cable ID processing module is required not to affect the response of the slave device to the source device. That is, the Cable ID processing module in the cable must not respond to the I2C slave address (NACK, NotAcknowledge, not confirmed / not responded / not ready).
[0005] However, currently, the I2C data monitoring and response are usually completed by using the slave mode of the I2C peripheral on the MCU (Microcontroller Unit). However, when the I2C peripheral of a common MCU does not respond to the I2C slave address, its internal state machine cannot monitor and respond to data.
[0006] Therefore, there is an urgent need to provide a method for processing and reading the Cable ID of an HDMI active cable, a device for controlling the reading of the Cable ID of an HDMI active cable, and a method for reading the Cable ID of an HDMI active cable, which can use standard I2C devices and can monitor I2C data and respond to I2C read operations without responding to the I2C address, thereby completing the Cable ID data reading function of the HDMI2.1 protocol. Summary of the Invention
[0007] In order to at least solve one or more of the technical problems mentioned above, the present invention proposes, in multiple aspects, a method for processing and reading a Cable ID of an HDMI active cable, a device for controlling and reading the Cable ID of an HDMI active cable, and a method for reading the Cable ID of an HDMI active cable.
[0008] In a first aspect, the present invention provides a method for processing Cable ID reading for an HDMI active cable, wherein the method is implemented by a processor. The method includes: the processor using an I2C device to monitor an HDMI-SCL signal line and an HDMI-SDA signal line of an HDMI active cable, wherein the I2C device includes a clock pin and a data pin, the clock pin being connected to the HDMI-SCL signal line, and the data pin being configured to be connected to the HDMI-SDA signal line or to be left floating; the I2C device being configured to respond to I2C read operations and I2C write operations of a source device through the HDMI-SCL signal line and the HDMI-SDA signal line; the processor, in response to detecting a slave address or I2C data output by a source device on the HDMI-SDA signal line, setting the data pin of the I2C device to be left floating, so that an I2C ACK signal generated by the I2C device based on the data output by the source device is not output to the HDMI-SDA signal line; and the processor, in response to detecting an I2C ACK signal output by a slave device based on the data output by the source device on the HDMI-SDA signal line, connecting the data pin of the I2C device to the HDMI-SDA signal line, so that the I2C device exchanges data with the HDMI-SDA signal line.
[0009] In one embodiment, setting the data pin of the I2C device to be floating includes connecting the data pin of the I2C device to a floating pin or a ground pin of a chip where the I2C device is located.
[0010] In one embodiment, the source device and the slave device interact with the HDMI-SDA signal line under the drive of the clock signal of the source device; in response to detecting the slave address or I2C data output by the source device on the HDMI-SDA signal line, the method further includes: performing a clock stretching operation to delay the time for the source device to transmit data to the HDMI-SDA signal line again; after setting the data pin of the I2C device to floating, if the clock stretching operation is performed, the method further includes: releasing the clock signal, so that the source device continues to interact with the HDMI-SDA signal line according to the released clock signal.
[0011] In one embodiment, the processor, in response to detecting an I2C ACK signal output by a slave device in response to an I2C write operation of a source device on the HDMI-SDA signal line, connects a data pin of the I2C device to the HDMI-SDA signal line before a next clock signal appears on the HDMI-SCL signal line, so that the I2C device exchanges data with the HDMI-SDA signal line.
[0012] In one embodiment, the processor, in response to detecting an I2C ACK signal and I2C data sequentially output by a slave device in response to an I2C read operation of a source device on the HDMI-SDA signal line, connects a data pin of the I2C device to the HDMI-SDA signal line before a next clock signal appears on the HDMI-SCL signal line, so that the I2C device exchanges data with the HDMI-SDA signal line.
[0013] In one embodiment, the processor, in response to detecting multiple first signal sequences and a second signal sequence in sequence on the HDMI-SCL signal line and the HDMI-SDA signal line, causes the I2C device to output all or part of the Cable ID through the HDMI-SCL signal line and the HDMI-SDA signal line; wherein based on the offset value and length obtained from the multiple first signal sequences, the data of the Cable ID starting from the offset value and having the length output through the HDMI-SCL signal line and the HDMI-SDA signal line is determined; the processor, in response to detecting a third signal sequence in sequence on the HDMI-SCL signal line and the HDMI-SDA signal line, identifies that the processing of reading the Cable ID is completed.
[0014] In one embodiment, the processor, in response to detecting the second signal sequence, connects the data pin of the I2C device to the HDMI-SDA signal line before a next clock signal appears on the HDMI-SCL signal line.
[0015] In one embodiment, the first signal sequence includes an I2C start signal, an I2C address 0xA0, I2C data, an I2C restart signal, an I2C address 0xA1, an I2C NACK signal, and an I2C stop signal that appear in sequence.
[0016] In one embodiment, the plurality of first signal sequences includes five first signal sequences.
[0017] In one embodiment, the I2C data of the first first signal sequence of the multiple first signal sequences is 0xAE, the I2C data of the second first signal sequence of the multiple first signal sequences is 0x6E, the I2C data of the third first signal sequence of the multiple first signal sequences is 0x61, the I2C data of the fourth first signal sequence of the multiple first signal sequences is the offset value Offset, and the I2C data of the fifth first signal sequence of the multiple first signal sequences is the length Length, where Length is the numerical value of the length.
[0018] In one embodiment, the second signal sequence includes an I2C start signal, an I2C address 0xA0, an I2C data 0x01, an I2C restart signal, and an I2C address 0xA1 that appear in sequence.
[0019] In one embodiment, outputting data of the Cable ID starting from the offset value and having the length through the HDMI-SCL signal line and the HDMI-SDA signal line includes: causing the I2C device to output multiple fourth signal sequences through the HDMI-SCL signal line and the HDMI-SDA signal line.
[0020] In one embodiment, the fourth signal sequence includes one-byte data of Cable ID.
[0021] In one embodiment, the number of the fourth signal sequences is equal to the length.
[0022] In one embodiment, the I2C data of the first fourth signal sequence is the first byte of the Cable-ID, the I2C data of the second fourth signal sequence is the second byte of the Cable-ID, ..., the I2C data of the Lengthth fourth signal sequence is the Lengthth byte of the Cable-ID, where Length is the numerical value of the length.
[0023] In one embodiment, after outputting a fourth signal sequence through the HDMI-SCL signal line and the HDMI-SDA signal line, in response to detecting an I2C ACK signal from the HDMI-SCL signal line and the HDMI-SDA signal line, a next fourth signal sequence is output through the HDMI-SCL signal line and the HDMI-SDA signal line.
[0024] In one embodiment, causing the I2C device to output a fourth signal sequence through the HDMI-SCL signal line and the HDMI-SDA signal line includes: causing the I2C device to output one-byte data of a Cable ID to the HDMI-SDA signal line under the drive of a clock on the HDMI-SCL signal line, wherein the one-byte data is located at an offset from a starting position of the Cable ID by m minus 1 plus the offset value, wherein the fourth signal sequence currently output is the mth fourth signal sequence among the multiple fourth signal sequences, and m is a positive integer greater than or equal to 1.
[0025] In one embodiment, detecting the I2CACK signal from the HDMI-SCL signal line and the HDMI-SDA signal line includes: enabling the I2C device to recognize the presence of the I2CACK signal when a low level is detected on the HDMI-SDA signal line under the next clock drive on the HDMI-SCL signal line.
[0026] In a second aspect, the present invention further provides a device for controlling and reading the Cable ID of an HDMI active cable, comprising: an I2C device, comprising a clock pin and a data pin, wherein the clock pin is connected to the HDMI-SCL signal line of the HDMI active cable, the data pin is connected to the HDMI-SDA signal line of the HDMI active cable, and the I2C device monitors the HDMI-SCL signal line and the HDMI-SDA signal line; a processor, which is connected to the I2C device and is used to execute program instructions; a switch, which is respectively connected to the processor, the data pin of the I2C device, the HDMI-SDA signal line and the floating line; the processor can control the switch to connect the data pin of the I2C device to the HDMI-SDA signal line; The processor comprises a controller, a switch, and a controller. The controller comprises a controller for controlling the data pin of the I2C device to be connected to the HDMI-SDA signal line, or connecting the data pin of the I2C device to the floating line and disconnecting it from the HDMI-SDA signal line; a memory for storing the program instructions, which, when loaded and executed by the processor, causes the processor to perform the following steps: in response to detecting a slave address or I2C data output by a source device on the HDMI-SDA signal line, controlling the switch to connect the data pin of the I2C device to the floating line and disconnect it from the HDMI-SDA signal line, so that the I2C ACK signal generated by the I2C device based on the data output by the source device is not output to the HDMI-SDA signal line; and in response to detecting an I2C ACK signal output by a slave device based on the data output by the source device on the HDMI-SDA signal line, controlling the switch to connect the data pin of the I2C device to the HDMI-SDA signal line, so that the I2C device interacts with the HDMI-SDA signal line.
[0027] In one embodiment, the floating line includes a floating pin or a ground pin of a chip where the I2C device is located.
[0028] In one embodiment, the data pin of the I2C device and the floating pin of the chip are both programmable pins.
[0029] In one embodiment, the processor is further connected to the HDMI-SDA signal line to read the signal transmitted on the HDMI-SDA signal line.
[0030] In one embodiment, the processor and the I2C device are connected to the HDMI-SDA signal line through the same pin. When the processor controls the switch to connect the data pin of the I2C device to the floating line and disconnect it from the HDMI-SDA signal line, the processor can still read the signal transmitted on the HDMI-SDA signal line through the pin.
[0031] In one embodiment, the processor and the I2C device are connected to the HDMI-SDA signal line through a first pin and a second pin respectively. When the processor controls the switch to connect the data pin of the I2C device to the floating line and disconnect it from the HDMI-SDA signal line, the processor can still read the signal transmitted on the HDMI-SDA signal line through the first pin.
[0032] In a third aspect, the present invention also provides a method for reading the Cable ID of an HDMI active cable, characterized in that the HDMI cable is connected to a source device and a slave device, the source device is connected to the HDMI-SCL signal line and the HDMI-SDA signal line of the HDMI active cable, the slave device is connected to the HDMI-SCL signal line and the HDMI-SDA signal line of the HDMI active cable, the HDMI active cable includes an I2C device, the clock pin of the I2C device is connected to the HDMI-SCL signal line, the data pin of the I2C device is connected to the HDMI-SDA signal line and the floating line respectively through a switch, and the processor is also connected to the I2C device and the switch. The method includes: the source device and the slave device communicate through the slave address, I2C data and clock signal on the HDMI-SCL signal line and the HDMI-SDA signal line, and detect the slave address or I2C data output by the source device on the HDMI-SDA signal line; the source device and the slave device communicate through the I2C ACK signal of the slave device on the HDMI-SDA signal line, and the processor detects the I2C ACK signal output by the slave device based on the data output by the source device on the HDMI-SDA signal line; the processor, in response to detecting the slave address or I2C data output by the source device on the HDMI-SDA signal line, controls the switch to connect the data pin of the I2C device to the floating line and disconnect it from the HDMI-SDA signal line, so that the I2C ACK signal generated by the I2C device based on the data output by the source device is not output to the HDMI-SDA signal line; the processor, in response to detecting the I2C ACK signal output by the slave device based on the data output by the source device on the HDMI-SDA signal line, controls the switch to connect the data pin of the I2C device to the floating line and disconnect it from the HDMI-SDA signal line, so that the I2C ACK signal generated by the I2C device based on the data output by the source device is not output to the HDMI-SDA signal line. ACK signal, controls the switch to connect the data pin of the I2C device to the HDMI-SDA signal line, so that the I2C device and the HDMI-SDA signal line perform data exchange.
[0033] In general, the above technical solution conceived by the present invention can achieve the following beneficial effects compared with the existing technology: this solution uses standard I2C devices and can monitor I2C data and respond to I2C read operations without responding to I2C addresses, thereby completing the Cable ID data reading function of the HDMI2.1 protocol. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an illustrative and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0035] Figure 1 An exemplary schematic diagram of a conventional HDMI active cable device is shown;
[0036] Figure 2 An example diagram showing a method for reading Cable ID data;
[0037] Figure 3 An exemplary schematic diagram of an HDMI active cable device to which the present invention is applicable is shown;
[0038] Figure 4 An exemplary flow chart of a method for reading a Cable ID for an HDMI active cable according to an embodiment of the present invention is shown;
[0039] Figure 5 An exemplary schematic diagram of a device for processing Cable ID reading for an HDMI active cable is shown;
[0040] Figure 6 An exemplary flow chart of a method for reading a Cable ID of an HDMI active cable is shown. DETAILED DESCRIPTION
[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0042] It should be understood that the terms "include" and "comprising" used in the description and claims of the present invention indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0043] It should also be understood that the terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the present invention. As used in the specification and claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should further be understood that the term "and / or" as used in the specification and claims refers to any and all possible combinations of one or more of the associated listed items, including and including these combinations.
[0044] As used in this specification and claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0045] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0046] Figure 1 An exemplary schematic diagram of a conventional HDMI active cable device 100 is shown.
[0047] like Figure 1As shown in the figure, the HDMI active cable device 100 may include a source device (HDMI transmitter 101 in the figure), a slave device (HDMI receiver 102 in the figure), a TX module 103 and an RX module 104. The source device may include a host, and the slave device may include a terminal device such as a display. The source device 101 and the slave device 102 are connected via the HDMI-SCL signal line 105 and the HDMI-SDA signal line 106 of the HDMI active cable, respectively, to transmit a clock signal and I2C data. The TX module 103 may be located in the source device, and the RX module may be located in the slave device 102. The high-speed signal processing circuit in the TX module 103 and the high-speed signal processing circuit in the RX module 104 are connected via a high-speed media data line to transmit high-speed signals. The TX module 103 may also include a Cable ID processing module, which may include an MCU 1031 and an I2C device 1032 connected to each other. The Cable ID processing module may be used to monitor the clock signal and I2C data to read the Cable ID data.
[0048] As mentioned in the background technology, in the above-mentioned device, the Slave mode of the I2C peripheral (I2C device 1032) in MCU1031 is usually used to complete the monitoring and response of I2C data. However, when the I2C peripheral of MCU 1031 does not respond to the I2C slave address, its internal state machine cannot monitor and respond to I2C data.
[0049] In view of this, the present disclosure proposes a method for processing and reading the Cable ID of an HDMI active cable, a device for controlling the reading of the Cable ID of an HDMI active cable, and a method for reading the Cable ID of an HDMI active cable. The method uses a standard I2C device and can monitor I2C data and respond to I2C read operations without responding to the I2C address, thereby completing the Cable ID data reading function of the HDMI2.1 protocol.
[0050] In order to facilitate the understanding of the present invention, the following scheme is first combined with Figure 2 and Figure 3 The following describes a method for reading Cable ID data and the structure and principle of an HDMI active cable device to which the present invention is applicable.
[0051] Figure 2An example diagram of a Cable ID data reading method 200 is shown. According to the IDCC protocol, a Cable ID read operation consists of several complete I2C read operations. The Cable ID data structure consists of three parts: Header+Payload+Checksum. The upper table in the figure shows the data reading process of the Header part of the Cable ID, and the lower table shows the data reading process of the Payload and Checksum parts of the Cable ID. In the figure, each data transmission is performed in order from small to large. For example, for Header-Marker1, data is transmitted in the order of 1, 2, 3...11. In addition, the "source device" with a dotted fill in the upper right corner indicates that the data in the dotted cell in the table is transmitted by the source device, the "slave device" with a slash fill in the table indicates that the data in the slash filled cell in the table is transmitted by the slave device, and the "cable" with no fill in the table indicates that the data in the no fill in the table is transmitted by the cable.
[0052] like Figure 2 As shown in the table above, the Header part includes Maker1-Maker2-Maker3-Offset (the offset value of the read data, and the data reading starts from the position corresponding to the offset value)-Length (the length of the read data), which is completed by 5 complete I2C read operations. In this read operation, the source device sends data and the I2C device only listens for data. Figure 2 As shown in the table below, the payload portion is completed by a complete I2C read operation. In this read operation, the source device sends data, and the I2C device listens and responds to the data.
[0053] Figure 3 An exemplary schematic diagram of an HDMI active cable device 300 to which the present invention is applicable is shown.
[0054] like Figure 3As shown in the figure, the HDMI active cable device 300 may include a source device (HDMI transmitting end 301 in the figure), a slave device (HDMI receiving end 302 in the figure), a TX module 303 and an RX module 304. The source device may include a host, and the slave device may include a terminal device such as a display. The source device 301 and the slave device 302 are connected via the HDMI-SCL signal line 305 and the HDMI-SDA signal line 306 of the HDMI active cable respectively, thereby transmitting a clock signal and I2C data. The TX module 303 can be located in the source device, and the RX module can be located in the slave device 302. The high-speed signal processing circuit in the TX module 303 and the high-speed signal processing circuit in the RX module 304 are connected via a high-speed media data line to transmit high-speed signals. The TX module 303 may also include an MCU 3031 and an I2C device 3032 located therein. The I2C device 3032 can be used to monitor the clock signal and I2C data to read and process the Cable ID data.
[0055] The I2C device 3032 includes a clock pin and a data pin. The clock pin is connected to the HDMI-SCL signal line 305 and is used to detect the clock signal of the source device. The data pin can be set to be connected to the HDMI-SDA signal line 306 or floated. When it is set to be connected to the HDMI-SDA signal line 306, it can receive and respond to I2C data; when it is set to be floating, the I2CACK signal generated by the I2C device 3032 based on the output data of the source device is not output to the HDMI-SDA signal line 306.
[0056] In order to know the switching of the above-mentioned lines, the HDMI active cable device 300 may further include a processor 308 and a switch 307. The processor 308 may be connected to the I2C device 3032 to control the execution of the method of the present invention. The processor 308 may include various types of processing devices, which are not limited in this embodiment. In addition, the processor 308 may be as follows: Figure 3 As shown in FIG, it is located inside the MCU3031, but it can also be outside the MCU3031.
[0057] The switch 307 can be connected to the processor 308, the data pin of the I2C device 3032, the HDMI-SDA signal line 306 and the floating line respectively (ie, Figure 3 The processor 308 may control the switch 307 to connect the data pin of the I2C device 3032 to the HDMI-SDA signal line 306, or to connect the data pin of the I2C device 3032 to the floating line and disconnect it from the HDMI-SDA signal line 306. As an example, the floating line may include a floating pin or a ground pin of the chip where the I2C device 3032 is located, such as Figure 3The floating pin or ground pin of MCU 3031 ( Figure 3 The floating end in the description may be understood as a floating pin or a ground pin. In other examples, connecting the data pin of the I2C device 3032 to a floating line may also mean setting the data pin of the I2C device 3032 to a floating state or connecting it to a floating end of another device, which is not limited in this embodiment.
[0058] In one implementation, the data pin of the I2C device 3032 and the floating pin of the chip can both be programmable pins, so that the data pin of the I2C device 3032 can be connected to the floating line through programming without changing the line connection. Obviously, this line switching method is simpler than the method of changing the line connection relationship. In one or more implementations, the switch 307 can be a single switch, such as various controllable switches; the switch 307 can also be a switch matrix. The switch 307 can be as follows Figure 3 As shown in FIG, it is inside the MCU 3031 , but it can also be outside the MCU 3031 .
[0059] In order to monitor the signal transmitted on the HDMI-SDA signal line when the data pin of the I2C device 3032 is connected to a floating line and disconnected from the HDMI-SDA signal line, the processor 308 may also be connected to the HDMI-SDA signal line 306 to read the signal transmitted on the HDMI-SDA signal line 306. In one implementation, the processor 308 and the I2C device 3032 may be connected to the HDMI-SDA signal line 306 through the same pin. When the processor 308 controls the switch 307 to connect the data pin of the I2C device 3032 to the floating line and disconnect it from the HDMI-SDA signal line 306, the processor 308 may still read the signal transmitted on the HDMI-SDA signal line 306 through the pin. In another implementation, the processor 308 and the I2C device 3032 may also be connected to the HDMI-SDA signal line 306 through the first pin and the second pin, respectively (the processor 308 is connected to the HDMI-SDA signal line 306 through the first pin, and the I2C device 3032 is connected to the HDMI-SDA signal line 306 through the second pin, that is, the two are connected to the HDMI-SDA signal line 306 through different pins). When the processor 308 controls the switch 307 to connect the data pin of the I2C device 3032 to the floating line and disconnect it from the HDMI-SDA signal line 306, the processor 308 can still read the signal transmitted on the HDMI-SDA signal line 306 through the first pin.
[0060] Combined with the above Figure 2 and 3The basic structure and conditions applicable to the present invention have been described. The present invention will now be described in detail in conjunction with the structures of the above-mentioned Cable ID data reading method 200 and the HDMI active cable device 300.
[0061] Figure 4 FIG. 4 is a flow chart illustrating an exemplary method 400 for processing Cable ID reading for an HDMI active cable according to an embodiment of the present invention.
[0062] The method of this embodiment can be implemented by a processor, which can be the above-mentioned Figure 3 The processor 308 in FIG. Figure 4 As shown in , the method 400 may include, at step S401, the processor, using an I2C device to monitor the HDMI-SCL signal line and the HDMI-SDA signal line of the HDMI active cable, wherein the I2C device includes a clock pin and a data pin, the clock pin is connected to the HDMI-SCL signal line, and the data pin can be set to be connected to the HDMI-SDA signal line or floated. Figure 3 As described in the illustrated embodiment, setting the data pin of the I2C device 3032 to floating may include connecting the data pin of the I2C device 3032 to a floating pin or a ground pin of the chip (such as the MCU 3031) where the I2C device 3032 is located, or simply changing its state to a floating state, or connecting it to a floating pin or a ground pin of another device.
[0063] At step S402 , the I2C device may be configured to respond to an I2C read operation and an I2C write operation of the source device via the HDMI-SCL signal line and the HDMI-SDA signal line.
[0064] Based on the above operations, at step S403, the processor can, in response to detecting the slave address or I2C data output by the source device on the HDMI-SDA signal line, set the data pin of the I2C device to floating, so that the I2C ACK signal generated by the I2C device based on the data output by the source device is not output to the HDMI-SDA signal line. This step prevents the I2C ACK signal generated by the I2C device based on the data output by the source device from being detected by the source device, that is, the I2C device does not respond to the I2C slave address, and does not affect the I2C data transmitted by the source device. As a result, the I2C device and the slave device can simultaneously access the HDMI-SCL signal line and the HDMI-SDA signal line without conflict.
[0065] according to Figure 2It can be seen that after the source device outputs the slave address or I2C data, the slave device will respond with an I2C ACK signal under the next clock drive of the source device. When to respond to the I2C ACK signal depends on the slave device itself. This makes it possible for the I2C device to not respond (NACK) to the I2C slave address sent by the source device.
[0066] After the source device outputs the slave address or I2C data, the slave device will feedback the I2C ACK signal. After the I2C ACK signal is detected on the HDMI-SDA signal line, before the next clock (rising edge) arrives, the data pin of the I2C device can be reconnected back to the HDMI-SDA signal line to receive and respond to the next I2C data. Based on this, at step S404, the processor can respond to the I2C ACK signal based on the source device output data output by the slave device detected on the HDMI-SDA signal line, and connect the data pin of the I2C device to the HDMI-SDA signal line so that the I2C device and the HDMI-SDA signal line can interact with each other. It can be seen that this solution can solve the problem of not being able to monitor and respond to data as a slave at the same time when not responding to the I2C address when using a standard I2C device. That is, it can monitor I2C data and respond to I2C read operations without responding to the I2C address, thereby completing the Cable ID data reading function of the HDMI2.1 protocol.
[0067] In one implementation scenario, the source device and the slave device interact with the HDMI-SDA signal line under the drive of the clock signal of the source device. In response to detecting the slave address or I2C data output by the source device on the HDMI-SDA signal line, the processor will be notified through an interrupt. In this process, if the processor clock is relatively slow, there may not be enough time to complete the operation of outputting the I2C ACK signal to the floating line. Based on this, the method may also include: performing a clock stretching operation to delay the time for the source device to transmit data to the HDMI-SDA signal line again, and the clock stretching operation can reserve sufficient time to complete the next operation. In one implementation, the cable can use a clock stretching of no more than 60us (microseconds), such as 30us, 40us or 50us.
[0068] It is understood that the clock stretching operation described above is only used at specific time points during the I2C data reading process. At other time points, the clock should be driven according to the normal clock signal level of the source device. Therefore, after setting the data pin of the I2C device to floating, if the clock stretching operation is performed, the method may further include: releasing the clock signal so that the source device can continue to exchange data with the HDMI-SDA signal line based on the released clock signal. This solution ensures that the I2C ACK signal from the slave device is not output to the HDMI-SDA signal line, while other data reading processes proceed normally.
[0069] Since both the source device and the slave device perform each data output operation based on the drive of the clock signal, in one embodiment, the processor can, in response to detecting an I2C ACK signal output by the slave device in response to the slave address or I2C data output by the source device in an I2C write operation on the HDMI-SDA signal line, connect the data pin of the I2C device to the HDMI-SDA signal line before the next clock signal appears on the HDMI-SCL signal line (when the source device has not yet output the next data), so that the I2C device and the HDMI-SDA signal line can exchange data. The timing of connecting the data pin of the I2C device to the HDMI-SDA signal line by using the clock signal can ensure that the source device accurately outputs data to the HDMI-SDA signal line in accordance with the protocol, thereby ensuring reliable data reading operations.
[0070] In one embodiment, the processor may further, in response to detecting on the HDMI-SDA signal line the I2C ACK signal and I2C data sequentially outputted by the slave device in response to the I2C read operation of the source device, connect the data pin of the I2C device to the HDMI-SDA signal line before the next clock signal appears on the HDMI-SCL signal line, so that the I2C device and the HDMI-SDA signal line perform data exchange. The sequentially output I2C ACK signal and I2C data herein may include Figure 2 The header section contains the I2C ACK signal with a transmission bit of 8 and the EDID Byte (i.e., I2C data EDID) with a transmission bit of 9. The clock signal determines the timing of connecting the I2C device's data pin to the HDMI-SDA signal line after the slave device sends back the I2C ACK signal and I2C data. This ensures that the source device accurately outputs data to the HDMI-SDA signal line according to the protocol, thereby ensuring reliable data reading operations.
[0071] The above describes the implementation of not responding to the I2C slave address in conjunction with the embodiments. The following solution will describe the process of reading I2C data in conjunction with multiple embodiments.
[0072] according to Figure 2 As can be seen from the description in, the Header part of the Cable ID data is completed by 5 complete I2C read operations, and the Payload part is completed by 1 complete I2C read operation. Based on this, in one embodiment, the processor, in response to detecting multiple first signal sequences and a second signal sequence in sequence on the HDMI-SCL signal line and the HDMI-SDA signal line, can enable the I2C device to output all or part of the Cable ID through the HDMI-SCL signal line and the HDMI-SDA signal line; wherein, based on the offset value (Offset) and length (Length) obtained from the multiple first signal sequences, it is determined that the data of the Cable ID outputted through the HDMI-SCL signal line and the HDMI-SDA signal line starts from the offset value and has the above-mentioned length. The value of Offset can be 1, 2, 3, 4, etc., and the length of Length can be 1, 2, 3, 4, etc., which is not limited in this embodiment.
[0073] Based on the data transmission process of the above-mentioned Header part, the above-mentioned multiple first signal sequences may include 5 first signal sequences (such as Figure 2 As shown in , "A1" excluding the "ACK signal" with transmission bits of 3, 5, and 8 and the "EDID Byte" with transmission bit of 9 is the first first signal sequence, "A2" excluding the "ACK signal" with transmission bits of 3, 5, and 8 and the "EDID Byte" with transmission bit of 9 is the second first signal sequence, "A3" excluding the "ACK signal" with transmission bits of 3, 5, and 8 and the "EDID Byte" with transmission bit of 9 is the third first signal sequence, "A4" excluding the "ACK signal" with transmission bits of 3, 5, and 8 and the "EDID Byte" with transmission bit of 9 is the fourth first signal sequence, and "A5" excluding the "ACK signal" with transmission bits of 3, 5, and 8 and the "EDID Byte" with transmission bit of 9 is the fifth first signal sequence). Figure 2 As shown in , each of the first signal sequences may include an I2C start signal, an I2C address 0xA0, I2C data, an I2C restart signal, an I2C address 0xA1, an I2C NACK signal, and an I2C stop signal that appear in sequence.
[0074] Based on the data transmission process of the above Header part, Figure 2The data of the 4th transmission bit (i.e., the cell labeled 4) in the Header portion of the table is the I2C data in the first signal sequence. As shown in the figure, the I2C data of the first first signal sequence of the multiple first signal sequences can be 0xAE, the I2C data of the second first signal sequence of the multiple first signal sequences can be 0x6E, the I2C data of the third first signal sequence of the multiple first signal sequences can be 0x61, the I2C data of the fourth first signal sequence of the multiple first signal sequences can be the above-mentioned offset value Offset, and the I2C data of the fifth first signal sequence of the multiple first signal sequences can be the length Length, where Length is the numerical value of the above-mentioned length. The above-mentioned 0xAE is the Cable ID data structure flag 1, 0x6E is the Cable ID data structure flag 2, and 0x61 is the Cable ID data structure flag 3.
[0075] In one embodiment, each signal or data in the first signal sequence may be generated by driving a clock signal. Based on this, detecting the first signal sequence on the HDMI-SCL signal line and the HDMI-SDA signal line may include:
[0076] When a high level appears on the HDMI-SCL signal line, a falling edge is detected on the HDMI-SDA signal line, and the presence of an I2C start signal is recognized;
[0077] According to the clock drive on the HDMI-SCL signal line, data 0xA0 is received on the HDMI-SDA signal line, and the I2C address 0xA0 is recognized;
[0078] Based on the reception of I2C data on the HDMI-SDA signal line under the clock drive on the HDMI-SCL signal line, the presence of I2C data is identified; the I2C data here corresponds to one of the "0XAE", "0x6E", "0x61", "Offset" and "Length" mentioned above, that is, when the first first signal sequence is detected, the I2C data is "0xAE", when the second first signal sequence is detected, the I2C data is "0x6E", when the third first signal sequence is detected, the I2C data is "0x61", when the fourth first signal sequence is detected, the I2C data is "Offset", and when the fifth first signal sequence is detected, the I2C data is "Length".
[0079] When a high level appears on the HDMI-SCL signal line, a falling edge is detected on the HDMI-SDA signal line, and the presence of an I2C restart signal is recognized;
[0080] According to the clock drive on the HDMI-SCL signal line, data 0xA1 is received on the HDMI-SDA signal line, and the I2C address 0xA1 is recognized;
[0081] When a high level is detected on the HDMI-SDA signal line under the next clock drive on the HDMI-SCL signal line, an I2C NACK signal is identified;
[0082] When a high level appears on the HDMI-SCL signal line, a rising edge is detected on the HDMI-SDA signal line, thereby recognizing the presence of an I2C stop signal.
[0083] according to Figure 2 As can be seen from the description of the embodiment, the second signal sequence ( Figure 2 The second signal sequence is excluding the "ACK signal" with transmission bits 3, 5, and 8 in "B" (hereinafter referred to as the second signal sequence) and may include an I2C start signal, an I2C address 0xA0, I2C data 0x01, an I2C restart signal, and an I2C address 0xA1 that appear in sequence.
[0084] Similar to the detection of the first signal sequence above, each signal or data in the second signal sequence can also be generated by driving the clock signal. Therefore, detecting the second signal sequence on the HDMI-SCL signal line and the HDMI-SDA signal line may include:
[0085] When a high level appears on the HDMI-SCL signal line, a falling edge is detected on the HDMI-SDA signal line, and the presence of an I2C start signal is recognized;
[0086] According to the clock drive on the HDMI-SCL signal line, data 0xA0 is received on the HDMI-SDA signal line, and the I2C address 0xA0 is recognized;
[0087] According to the clock drive on the HDMI-SCL signal line, the I2C data 0x01 is received on the HDMI-SDA signal line, and the I2C data 0x01 is recognized;
[0088] When a high level appears on the HDMI-SCL signal line, a falling edge is detected on the HDMI-SDA signal line, and the presence of an I2C restart signal is recognized;
[0089] According to the clock drive on the HDMI-SCL signal line, data 0xA1 is received on the HDMI-SDA signal line, and the I2C address 0xA1 is recognized.
[0090] In one implementation scenario, the above-mentioned outputting of the Cable ID data starting from the offset value and having the length through the HDMI-SCL signal line and the HDMI-SDA signal line may include: enabling the I2C device to output a plurality of fourth signal sequences through the HDMI-SCL signal line and the HDMI-SDA signal line. Figure 2 As can be seen from the description of the embodiment, each fourth signal sequence can include one byte of Cable ID data. The number of fourth signal sequences can be equal to the above length. The I2C data of the first fourth signal sequence is the first byte of Cable ID, the I2C data of the second fourth signal sequence is the second byte of Cable ID, ..., the I2C data of the Lengthth fourth signal sequence is the Lengthth byte of Cable ID, where Length is the value of the above length. As an example, Figure 2 , which includes N fourth sequences, where N is a positive integer greater than 1, such as 3 or 4. Figure 2 In the example, "C1" represents the first fourth signal sequence, ..., and "Cn" represents the Nth fourth signal sequence. In this embodiment, the fourth signal sequence does not include the "ACK" signal following each "Cable ID Byte." It will be appreciated that the fourth signal sequence also includes a checksum, which is used to verify data transmission errors. Length is the number of Cable-ID data structure sections to be read by the source device. The number of fourth signal sequences is Length + 1.
[0091] In this embodiment, the transmission of the fourth signal sequence can also be carried out based on the drive of the clock signal. Based on this, making the I2C device output the fourth signal sequence through the HDMI-SCL signal line and the HDMI-SDA signal line may include: making the I2C device output one byte of Cable ID data to the HDMI-SDA signal line according to the clock drive on the HDMI-SCL signal line, wherein the one byte of data is located at an offset from the starting position of the Cable ID by the offset value plus m minus 1, wherein the fourth signal sequence currently output is the mth fourth signal sequence among multiple fourth signal sequences, and m is a positive integer greater than or equal to 1, such as 1, 2, 3, 4, etc. Figure 2 For example, when m is 1, the first byte of Cable ID, namely Cable ID Byte1, is output through the HDMI-SDA signal line; when m is 2, the second byte of Cable ID, namely Cable ID Byte2, is output through the HDMI-SDA signal line.
[0092] When transmitting Cable ID data, after transmitting one byte of Cable ID data, it is possible to determine whether to continue transmitting the next byte of data based on whether a response signal transmitted by the source device is detected, thereby ensuring reliable transmission of each I2C data. Based on this, after outputting a fourth signal sequence through the HDMI-SCL signal line and the HDMI-SDA signal line, it is also possible to respond to the detection of an I2C ACK signal ( Figure 2 The "ACK signal" after each Cable ID in the table in the lower middle part) outputs the next fourth signal sequence through the HDMI-SCL signal line and the HDMI-SDA signal line. For example, Figure 2 In the example, after the first fourth signal sequence C1 is transmitted, the ACK signal (the "ACK signal" corresponding to label 10) transmitted by the source device is detected before the second fourth signal sequence is output. That is, after the cable transmits a single I2C data item, the source device generates a response signal, thereby confirming the completion of the I2C data transmission. This data transmission method ensures that all I2C data can be read reliably.
[0093] Similar to the principle of detecting signals in the previous article, detecting the I2CACK signal from the HDMI-SCL signal line and the HDMI-SDA signal line may include: enabling the I2C device to recognize the presence of the above-mentioned I2CACK signal when a low level is detected on the HDMI-SDA signal line under the next clock drive on the HDMI-SCL signal line.
[0094] The present solution can also determine that the reading of the Cable ID is completed when another signal sequence is detected, thereby determining that the I2C data transmission of the cable is completed, that is, the entire I2C data reading process is completed. Based on this, the processor can respond to the detection of the third signal sequence (such as Figure 2 the "D" in the .
[0095] like Figure 2 As shown in , detecting the third signal sequence on the HDMI-SCL signal line and the HDMI-SDA signal line may include:
[0096] When a high level is detected on the HDMI-SDA signal line under the next clock drive on the HDMI-SCL signal line, an I2C NACK signal is identified;
[0097] When a high level appears on the HDMI-SCL signal line, a rising edge is detected on the HDMI-SDA signal line, thereby recognizing the presence of an I2C stop signal.
[0098] This solution uses the NACK signal and I2C stop signal transmitted by the source device to indicate the end of the Cable ID acquisition process.
[0099] The above describes a method for reading a Cable ID for an HDMI active cable in conjunction with an embodiment. The present invention will now describe in detail a device for controlling and reading a Cable ID of an HDMI active cable.
[0100] Figure 5 An exemplary schematic diagram of a device 500 for reading a Cable ID for an HDMI active cable is shown. To clearly illustrate the connection between device 500 and other components, the diagram also illustrates an HDMI transmitter (i.e., source device), an HDMI receiver (i.e., slave device), and an HDMI-SCL signal line 506 and an HDMI-SDA signal line 507 connected therebetween.
[0101] like Figure 5 As shown in FIG, device 500 may include an I2C device 501 , a processor 502 , a switch 503 , and a memory 504 .
[0102] In one embodiment, the above-mentioned I2C device 501 may include a clock pin and a data pin, the clock pin is connected to the HDMI-SCL signal line 506 of the HDMI active cable, and the data pin is connected to the HDMI-SDA signal line 507 of the HDMI active cable. The I2C device 501 monitors the HDMI-SCL signal line 506 and the HDMI-SDA signal line 507.
[0103] The processor 502 can be connected to the I2C device 501 to execute program instructions. The processor 502 can include various types of processing devices, which are not limited in this embodiment.
[0104] The switch 503 can be connected to the processor 502, the data pin of the I2C device 501, the HDMI-SDA signal line 507 and the floating line (ie, the data pin of the I2C device 501). Figure 5 The processor 502 can control the switch 503 to connect the data pin of the I2C device 501 to the HDMI-SDA signal line 507, or to connect the data pin of the I2C device 501 to the floating line and disconnect it from the HDMI-SDA signal line 507. As an example, the floating line can include a floating pin or a ground pin of the chip where the I2C device 501 is located, such as Figure 3The floating pin or ground pin of MCU 3031 in the circuit can be connected to the floating circuit. Processor 502, I2C device 501, and switch 503 can all be located within MCU 3031. Switch 307 can be located inside or outside MCU 3031. The data pin of I2C device 501 and the floating pin of the chip are both programmable pins, allowing the data pin of I2C device 501 to be connected to the floating circuit through programming without changing the circuit connection. Obviously, this circuit switching method is simpler than changing the circuit connection relationship. Switch 503 can be a single switch, such as various controllable switches; switch 503 can also be a switch matrix.
[0105] The processor 501 and the memory 502 may communicate with each other via a bus 505. The memory 504 may be used to store program instructions. When the program instructions are loaded and executed by the processor 502, the processor 502 performs the following steps:
[0106] In response to detecting a slave address or I2C data output by the source device on the HDMI-SDA signal line 507, the control switch 503 connects the data pin of the I2C device 501 to a floating line and disconnects it from the HDMI-SDA signal line 507, so that the I2C ACK signal generated by the I2C device 501 based on the data output by the source device is not output to the HDMI-SDA signal line 507; and
[0107] In response to detecting an I2CACK signal based on the source device output data output by the slave device on the HDMI-SDA signal line 507, the control switch 503 connects the data pin of the I2C device 501 to the HDMI-SDA signal line 507 so that the I2C device 501 can exchange data with the HDMI-SDA signal line 507.
[0108] In this plan Figure 3 The same structural parts can be found in the previous article about Figure 3 For the description of the HDMI active cable device 300 in FIG, the steps executed by the processor can refer to the description of various embodiments of the method for reading the Cable ID for the HDMI active cable in the foregoing text, which will not be described in detail here.
[0109] According to the description of the method for reading Cable ID for HDMI active cables in the previous article, it can be seen that the device 500 of this solution can solve the problem of being unable to monitor and respond to data as a slave at the same time when using a standard I2C device without responding to the I2C address. That is, it can monitor I2C data and respond to I2C read operations without responding to the I2C address, thereby completing the Cable ID data reading function of the HDMI2.1 protocol.
[0110] In order to monitor the signal transmitted on the HDMI-SDA signal line when the data pin of the I2C device is connected to the floating line and disconnected from the HDMI-SDA signal line, such as Figure 5 As shown in , the processor 502 can also be connected to the HDMI-SDA signal line 507 to read the signal transmitted on the HDMI-SDA signal line 507. In one implementation, the processor 502 and the I2C device 501 can be connected to the HDMI-SDA signal line 507 through the same pins. When the processor 502 controls the switch 503 to connect the data pin of the I2C device 501 to the floating line and disconnect it from the HDMI-SDA signal line 507, the processor 502 can still read the signal transmitted on the HDMI-SDA signal line 507 through the pins. In another implementation, the processor 502 and the I2C device 501 can be connected to the HDMI-SDA signal line 507 through the first pin and the second pin respectively (the processor 502 is connected to the HDMI-SDA signal line 507 through the first pin, and the I2C device 501 is connected to the HDMI-SDA signal line 507 through the second pin, that is, the two are connected to the HDMI-SDA signal line 507 through different pins). When the processor 502 controls the switch 503 to connect the data pin of the I2C device 501 to the floating line and disconnect it from the HDMI-SDA signal line 507, the processor 502 can still read the signal transmitted on the HDMI-SDA signal line 507 through the first pin.
[0111] Figure 6 An exemplary flow chart of a method 600 for reading a Cable ID of an HDMI active cable is shown.
[0112] In this embodiment, the HDMI cable is connected to the source device and the slave device, the source device is connected to the HDMI-SCL signal line and the HDMI-SDA signal line of the HDMI active cable, the slave device is connected to the HDMI-SCL signal line and the HDMI-SDA signal line of the HDMI active cable, the HDMI active cable includes an I2C device, the clock pin of the I2C device is connected to the HDMI-SCL signal line, the data pin of the I2C device is connected to the HDMI-SDA signal line and the floating line respectively through the switch, and the processor is also connected to the I2C device and the switch. This part can be referred to in the previous article about Figure 3 and Figure 5 The description is not detailed here.
[0113] like Figure 6As shown in , the method 600 may include, at step S601, the source device and the slave device communicate via the slave address, I2C data and clock signal on the HDMI-SCL signal line and the HDMI-SDA signal line, and detect the slave address or I2C data output by the source device on the HDMI-SDA signal line. The slave address is, for example, Figure 2 In "0XA0", "0XA1", I2C data is for example Figure 2 "0XAE", "0X6E", "0X61", "Offset", "Length", "EDID Byte", etc.
[0114] At step S602, the source device communicates with the slave device on the HDMI-SDA signal line through the I2C ACK signal of the slave device, and the processor can detect the I2C ACK signal output by the slave device based on the data output by the source device on the HDMI-SDA signal line. The I2C ACK signal is, for example, Figure 2 The transmission bits of the Header part are 3, 5, and 8, and the transmission bits of the Payload part are 3, 5, and 8, respectively.
[0115] Then, at step S603, the processor may, in response to detecting the slave address or I2C data output by the source device on the HDMI-SDA signal line, control the switch to connect the data pin of the I2C device to the floating line and disconnect it from the HDMI-SDA signal line, so that the I2CACK signal generated by the I2C device based on the data output by the source device is not output to the HDMI-SDA signal line.
[0116] At step S604, the processor may also control the switch to connect the data pin of the I2C device to the HDMI-SDA signal line in response to detecting an I2C ACK signal based on the source device output data output by the slave device on the HDMI-SDA signal line, so that the I2C device interacts with the HDMI-SDA signal line.
[0117] The detailed process of method 600 of this solution can be found in the above description of the method for processing and reading the Cable ID of the HDMI active cable and the device for controlling and reading the Cable ID of the HDMI active cable, which will not be described in detail here.
[0118] According to the description of the method for processing and reading the Cable ID of an HDMI active cable and the device for controlling and reading the Cable ID of an HDMI active cable, the solution of the present invention can solve the problem of being unable to simultaneously monitor and respond to data as a slave when using a standard I2C device without responding to the I2C address. That is, it is possible to monitor I2C data and respond to I2C read operations without responding to the I2C address, thereby completing the Cable ID data reading function of the HDMI2.1 protocol.
[0119] It should be understood that the terms "first," "second," "third," and "fourth," etc. in the claims, description, and drawings of the present invention are used to distinguish different objects, rather than to describe a specific order. The terms "comprise" and "comprising" used in the description and claims of the present invention indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.
[0120] Although a number of embodiments of the present invention have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may devise numerous modifications, variations, and alternatives without departing from the concept and spirit of the present invention. It should be understood that in practicing the present invention, various alternatives to the embodiments of the present invention described herein may be employed. The appended claims are intended to define the scope of the present invention and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A method for reading a Cable ID for an HDMI active cable, characterized in that: The method comprises: The processor monitors the HDMI-SCL signal line and the HDMI-SDA signal line of the HDMI active cable using an I2C device, wherein the I2C device includes a clock pin and a data pin, the clock pin is connected to the HDMI-SCL signal line, and the data pin can be set to be connected to the HDMI-SDA signal line or floated; The I2C device is used to respond to the I2C read operation and I2C write operation of the source device through the HDMI-SCL signal line and the HDMI-SDA signal line; The processor, in response to detecting a slave address or I2C data output by a source device on the HDMI-SDA signal line, sets a data pin of the I2C device to be floating, so that an I2CACK signal generated by the I2C device based on the data output by the source device is not output to the HDMI-SDA signal line; and The processor, in response to detecting an I2C ACK signal output by a slave device based on data output by a source device on the HDMI-SDA signal line, connects a data pin of the I2C device to the HDMI-SDA signal line, so that the I2C device exchanges data with the HDMI-SDA signal line.
2. The method according to claim 1, characterized in that Setting the data pin of the I2C device to be floating includes connecting the data pin of the I2C device to a floating pin or a ground pin of a chip where the I2C device is located.
3. The method according to claim 1 or 2, characterized in that The source device and the slave device perform data exchange with the HDMI-SDA signal line under the drive of the clock signal of the source device; In response to detecting a slave address or I2C data output by a source device on the HDMI-SDA signal line, the method further includes: Performing a clock stretching operation to delay the time when the source device transmits data to the HDMI-SDA signal line again; After setting the data pin of the I2C device to floating, if a clock stretching operation is performed, the method further includes: The clock signal is released so that the source device continues to perform data exchange with the HDMI-SDA signal line according to the released clock signal.
4. The method according to any one of claims 1 to 2, characterized in that The processor, in response to detecting an I2C ACK signal output by a slave device for an I2C write operation of a source device on the HDMI-SDA signal line, connects a data pin of the I2C device to the HDMI-SDA signal line before a next clock signal appears on the HDMI-SCL signal line, so that the I2C device exchanges data with the HDMI-SDA signal line.
5. The method according to any one of claims 1 to 2, characterized in that The processor, in response to detecting an I2C ACK signal and I2C data sequentially output by a slave device in response to an I2C read operation of a source device on the HDMI-SDA signal line, connects a data pin of the I2C device to the HDMI-SDA signal line before a next clock signal appears on the HDMI-SCL signal line, so that the I2C device exchanges data with the HDMI-SDA signal line.
6. The method according to any one of claims 1-2, characterized in that: The processor, in response to sequentially detecting a plurality of first signal sequences and a second signal sequence on the HDMI-SCL signal line and the HDMI-SDA signal line, causes the I2C device to output all or part of the Cable ID through the HDMI-SCL signal line and the HDMI-SDA signal line; wherein data of the Cable ID starting from the offset value and having the length to be output through the HDMI-SCL signal line and the HDMI-SDA signal line is determined based on the offset values and lengths obtained from the plurality of first signal sequences; The processor, in response to sequentially detecting a third signal sequence on the HDMI-SCL signal line and the HDMI-SDA signal line, recognizes that the reading of the Cable ID is completed.
7. The method according to claim 6, characterized in that The processor, in response to detecting the second signal sequence, connects a data pin of the I2C device to the HDMI-SDA signal line before a next clock signal appears on the HDMI-SCL signal line.
8. The method according to claim 6, wherein The first signal sequence includes an I2C start signal, an I2C address 0xA0, I2C data, an I2C restart signal, an I2C address 0xA1, an I2C NACK signal, and an I2C stop signal that appear in sequence.
9. The method according to claim 6, characterized in that The plurality of first signal sequences include five first signal sequences.
10. The method according to claim 9, characterized in that The I2C data of the first first signal sequence of the multiple first signal sequences is 0xAE, the I2C data of the second first signal sequence of the multiple first signal sequences is 0x6E, the I2C data of the third first signal sequence of the multiple first signal sequences is 0x61, the I2C data of the fourth first signal sequence of the multiple first signal sequences is the offset value Offset, and the I2C data of the fifth first signal sequence of the multiple first signal sequences is the length Length, where Length is the numerical value of the length.
11. The method according to claim 6, characterized in that The second signal sequence includes an I2C start signal, an I2C address 0xA0, I2C data 0x01, an I2C restart signal, and an I2C address 0xA1 that appear in sequence.
12. The method according to claim 6, wherein Outputting data of the Cable ID starting from the offset value and having the length through the HDMI-SCL signal line and the HDMI-SDA signal line includes: enabling the I2C device to output multiple fourth signal sequences through the HDMI-SCL signal line and the HDMI-SDA signal line.
13. The method according to claim 12, wherein The fourth signal sequence includes one-byte data of Cable ID.
14. The method according to claim 12, characterized in that The number of the fourth signal sequences is equal to the length.
15. The method according to claim 14, wherein The I2C data of the first fourth signal sequence is the first byte of Cable-ID, the I2C data of the second fourth signal sequence is the second byte of Cable-ID, ..., the I2C data of the Lengthth fourth signal sequence is the Lengthth byte of Cable-ID, where Length is the value of the length.
16. The method according to claim 12, characterized in that in, After outputting a fourth signal sequence through the HDMI-SCL signal line and the HDMI-SDA signal line, in response to detecting an I2C ACK signal from the HDMI-SCL signal line and the HDMI-SDA signal line, the next fourth signal sequence is output through the HDMI-SCL signal line and the HDMI-SDA signal line.
17. The method according to claim 13, wherein Enabling the I2C device to output a fourth signal sequence through the HDMI-SCL signal line and the HDMI-SDA signal line includes: The I2C device is driven by a clock on the HDMI-SCL signal line to output one-byte data of a Cable ID to the HDMI-SDA signal line, wherein the one-byte data is located at an offset from a starting position of the Cable ID by m plus 1 minus the offset value, wherein the fourth signal sequence currently output is the mth fourth signal sequence among the multiple fourth signal sequences, and m is a positive integer greater than or equal to 1.
18. The method according to claim 16, wherein Detecting an I2C ACK signal from the HDMI-SCL signal line and the HDMI-SDA signal line, comprising: The I2C device is driven by the next clock on the HDMI-SCL signal line and, when a low level is detected on the HDMI-SDA signal line, recognizes that the I2C ACK signal occurs.
19. A device for controlling and reading a Cable ID of an HDMI active cable, comprising: An I2C device includes a clock pin and a data pin, wherein the clock pin is connected to the HDMI-SCL signal line of the HDMI active cable, the data pin is connected to the HDMI-SDA signal line of the HDMI active cable, and the I2C device monitors the HDMI-SCL signal line and the HDMI-SDA signal line; a processor connected to the I2C device and configured to execute program instructions; a switch, which is respectively connected to the processor, the data pin of the I2C device, the HDMI-SDA signal line, and the floating line; the processor can control the switch to connect the data pin of the I2C device to the HDMI-SDA signal line, or connect the data pin of the I2C device to the floating line and disconnect it from the HDMI-SDA signal line; A memory for storing the program instructions, which, when loaded and executed by the processor, causes the processor to perform the following steps: In response to detecting a slave address or I2C data output by a source device on the HDMI-SDA signal line, controlling the switch to connect the data pin of the I2C device to the floating line and disconnect it from the HDMI-SDA signal line, so that the I2C device does not output an I2C ACK signal generated based on the data output by the source device to the HDMI-SDA signal line; as well as In response to detecting an I2C ACK signal output by a slave device based on data output by a source device on the HDMI-SDA signal line, controlling the switch to connect a data pin of the I2C device to the HDMI-SDA signal line so that the I2C device exchanges data with the HDMI-SDA signal line.
20. The device according to claim 19, characterized in that The floating line includes a floating pin or a ground pin of the chip where the I2C device is located.
21. The device according to claim 20, characterized in that The data pins of the I2C device and the floating pins of the chip are both programmable pins.
22. The device according to any one of claims 19 to 21, characterized in that The processor is further connected to the HDMI-SDA signal line to read the signal transmitted on the HDMI-SDA signal line.
23. A method for reading the Cable ID of an HDMI active cable, characterized in that: The HDMI cable is connected to a source device and a slave device, the source device is connected to the HDMI-SCL signal line and the HDMI-SDA signal line of the HDMI active cable, the slave device is connected to the HDMI-SCL signal line and the HDMI-SDA signal line of the HDMI active cable, the HDMI active cable includes an I2C device, a clock pin of the I2C device is connected to the HDMI-SCL signal line, and a data pin of the I2C device is respectively connected to the HDMI-SDA signal line and a floating line through a switch, and the processor is also connected to the I2C device and the switch; The method comprises: The source device communicates with the slave device on the HDMI-SCL signal line and the HDMI-SDA signal line through a slave address, I2C data and a clock signal, and detects the slave address or I2C data output by the source device on the HDMI-SDA signal line; The source device communicates with the slave device on the HDMI-SDA signal line through an I2C ACK signal of the slave device, and the processor detects an I2C ACK signal output by the slave device based on data output by the source device on the HDMI-SDA signal line; The processor, in response to detecting a slave address or I2C data output by a source device on the HDMI-SDA signal line, controls the switch to connect a data pin of the I2C device to the floating line and disconnect the data pin from the HDMI-SDA signal line, so that the I2C device does not output an I2C ACK signal generated based on the data output by the source device to the HDMI-SDA signal line; The processor controls the switch to connect the data pin of the I2C device to the HDMI-SDA signal line in response to detecting an I2C ACK signal output by the slave device based on the output data of the source device on the HDMI-SDA signal line, so that the I2C device exchanges data with the HDMI-SDA signal line.
Citation Information
Patent Citations
Bi-directional signal adjusting chip of USB Type-C cable and USB Type-C cable
CN107544934A
Device and method for serial communication interface
KR1020030046927A