An optical module and a method of improving communication of the optical module
By introducing an MCU into the optical module to monitor the level changes of the module selection pin and using an interrupt function to control the I2C interface, the communication anomaly caused by level jitter during the initialization of the optical module was solved, and stable communication between the optical module and the host computer was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HISENSE BROADBAND MULTIMEDIA TECH
- Filing Date
- 2024-12-27
- Publication Date
- 2026-06-30
AI Technical Summary
During the initialization process of the optical module, the level jitter of the module selection pin causes I2C communication abnormalities, affecting the normal communication between the host computer and the optical module.
By setting interrupt flags and interrupt functions in the MCU, the level changes of the module selection pin can be monitored in real time. The interrupt function is used to control the opening and closing of the I2C interface, avoiding repeated entry into the interrupt function when the level flips, thus ensuring normal communication.
This ensures stable I2C communication between the optical module and the host computer, avoids communication anomalies caused by level jitter during initialization, and guarantees the normal operation of the optical module.
Smart Images

Figure CN122316482A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of optical fiber communication technology, and in particular to an optical module and a method for improving the communication of the optical module. Background Technology
[0002] With the development of new business and application models such as cloud computing, mobile internet, and video, the advancement of optical communication technology has become increasingly important. In optical communication technology, optical modules are the tools for converting between photoelectric signals and signals, and are one of the key components in optical communication equipment. Furthermore, with the evolving needs of optical communication technology, the transmission rate of optical modules is constantly increasing. Summary of the Invention
[0003] This disclosure provides an optical module and a method for improving the communication of the optical module, enabling normal communication with a host computer via I2C.
[0004] In some embodiments, an optical module is provided, comprising:
[0005] The circuit board has the following structure on one end:
[0006] Module selection pin;
[0007] First I2C interface;
[0008] An MCU, located on the circuit board, is connected to the module selection pin to monitor the level of the module selection pin; the MCU is also connected to the first I2C interface to control the first I2C interface to be enabled or disabled; the MCU includes:
[0009] The register stores the interrupt flag, interrupt function, and monitoring level; the monitoring level is the real-time level of the module selection pin.
[0010] The MCU is configured as follows:
[0011] Upon detecting a change in the level of the module selection pin, the interrupt flag is set to a first value;
[0012] If the interrupt flag is read as the first value, the interrupt function is started.
[0013] The interrupt flag is set to the second value using the interrupt function.
[0014] If the monitored level is high, the first I2C interface is shut down using the interrupt function.
[0015] If the monitored level is low, the first I2C interface is enabled using the interrupt function.
[0016] The above technical solution has the following beneficial effects: This disclosure provides an optical module, including a circuit board with an MCU mounted on it. One end of the circuit board has a module selection pin and a first I2C interface. The MCU is connected to the module selection pin to detect its voltage level. The MCU is also connected to the first I2C interface to control its opening or closing. The MCU includes a register storing an interrupt flag, an interrupt function, and a monitoring level, which is the real-time voltage level of the module selection pin. When the interrupt flag is at a first value, the interrupt function is started; when it is at a second value, the interrupt function is not started. The MCU supports edge triggering, meaning that either a rising or falling edge can start the interrupt function. Therefore, the MCU monitors the voltage level of the module selection pin in real time. When a change in the voltage level is detected, the interrupt flag is set to the first value; when the interrupt flag is read as the first value, the interrupt function is started. When the interrupt flag is read as the second value, the interrupt function is not started. After the interrupt function is started, the MCU uses the interrupt function to set the interrupt flag to the second value, thus clearing the interrupt flag and preventing repeated entry into the interrupt function before the next interrupt function is started. Since the module selection pin's voltage level changes from low to high and from high to low, if the voltage level changes from low to high, the monitored voltage level is high. If the voltage level changes from high to low, the monitored voltage level is low. Therefore, the MCU uses an interrupt function to determine if the monitored voltage level is low. If the monitored voltage level is not low (i.e., it is high), the interrupt function closes the first I2C interface; if the monitored voltage level is low, the interrupt function opens the first I2C interface, allowing the host computer and the optical module to communicate normally via I2C. The interrupt function sets the interrupt flag to the second value before determining if the monitored voltage level is low. This avoids clearing the interrupt flag set when the module selection pin's voltage level changes from high to low, allowing the interrupt function to open the first I2C interface and thus enabling normal communication between the host computer and the optical module via I2C.
[0017] In some embodiments, an optical module is provided in which the level change of the module selection pin includes a change from low level to high level and a change from high level to low level;
[0018] The MCU is configured as follows:
[0019] If the level of the module selection pin changes from low to high, the interrupt flag is set to the first value.
[0020] If the interrupt flag is read as the first value, the interrupt function is started.
[0021] The interrupt flag is set to the second value using the interrupt function.
[0022] The interrupt function is used to determine that the monitored level is high, and the interrupt function is used to shut down the first I2C interface;
[0023] If the level of the module selection pin changes from high to low, the interrupt flag is set to the first value.
[0024] After the previous interrupt function exits, if the interrupt flag is read as the first value, the interrupt function is started.
[0025] The interrupt flag is set to the second value using the interrupt function.
[0026] The interrupt function is used to determine that the monitored level is low, and the first I2C interface is enabled using the interrupt function.
[0027] The above technical solution has the following beneficial effects: Before the optical module is initialized, the level of the module selection pin is low; when the optical module starts initialization, the level of the module selection pin is high. The MCU detects the change in the level of the module selection pin from low to high and sets the interrupt flag to the first value. When the interrupt flag is read as the first value, the interrupt function is started. When the interrupt flag is read as the second value, the interrupt function is not started. After the interrupt function is started, the MCU uses the interrupt function to set the interrupt flag to the second value, that is, to clear the interrupt flag, which can avoid repeatedly entering this interrupt function before starting the next interrupt function. Since the level change of the module selection pin includes both low to high and high to low, if the level change of the module selection pin is from low to high, the monitored level is high. If the level change of the module selection pin is from high to low, the monitored level is low. Therefore, the MCU uses the interrupt function to determine whether the monitored level is low. Because the module selection pin changes from low to high, and the monitored level is high, the interrupt function disables the first I2C interface, preventing normal communication between the host computer and the optical module via I2C. After the optical module is initialized, the module selection pin is low. The MCU detects this change and sets the interrupt flag to the first value. When the interrupt flag is read as the first value, the interrupt function is initiated. If the interrupt flag is read as the second value, the interrupt function is not initiated. After the interrupt function is initiated, the MCU uses it to set the interrupt flag to the second value, effectively clearing the interrupt flag and preventing repeated entry into the same interrupt function before the next interrupt function is initiated. Since the module selection pin changes from low to high and from high to low, if the change is from low to high, the monitored level is high; if the change is from high to low, the monitored level is low. Therefore, the MCU uses the interrupt function to determine if the monitored level is low. Since the level change of the module selection pin is from high to low, and the monitoring level is low, the interrupt function enables the first I2C interface, and the host computer and the optical module can communicate normally through I2C.
[0028] In some embodiments, an optical module is provided, wherein the MCU includes a second I2C interface, the second I2C interface is connected to the first I2C interface via I2C, and the MCU controls the first I2C interface to be turned on or off via the second I2C interface and the I2C.
[0029] The above technical solution has the following beneficial effects: The MCU includes a second I2C interface, which is connected to the first I2C interface via I2C, so that the MCU can control the first I2C interface to be turned on or off through the second I2C interface and I2C.
[0030] In some embodiments, an optical module is provided, wherein the MCU is configured to:
[0031] The interrupt function is used to determine whether the monitored level is less than a preset value.
[0032] The above technical solution has the following beneficial effects: The MCU uses an interrupt function to determine whether the monitored level is low by checking if the monitored level is less than a preset value. If the monitored level is less than the preset value, the monitored level is low. If the monitored level is greater than the preset value, the monitored level is high.
[0033] In some embodiments, an optical module is provided, wherein the first I2C interface includes:
[0034] First serial data line pin;
[0035] First serial clock line pin;
[0036] The second I2C interface includes:
[0037] The second serial data line pin is connected to the first serial data line pin via a serial data line.
[0038] The second serial clock line pin is connected to the first serial clock line pin via a serial clock line; the serial data line and the serial clock line together form the I2C.
[0039] The above technical solution has the following beneficial effects: The first I2C interface includes a first serial data line pin and a first serial clock line pin, and the second I2C interface includes a second serial data line pin and a second serial clock line pin. The second serial data line pin is connected to the first serial clock line pin through a serial data line, and the second serial clock line pin is connected to the first serial clock line pin through a serial clock line. The serial data line and the serial clock line form I2C, so that the MCU and the gold finger can communicate and connect through I2C.
[0040] In some embodiments, a method for improving optical module communication is provided, the method comprising:
[0041] The monitoring module selects the level of the pin;
[0042] Upon detecting a change in the level of the module selection pin, the interrupt flag is set to the first value;
[0043] Read the interrupt flag bit;
[0044] If the interrupt flag is read as the first value, the interrupt function is started;
[0045] The interrupt flag is set to the second value using the interrupt function.
[0046] If the monitored level is high, the first I2C interface is shut down using the interrupt function.
[0047] If the monitored level is low, the first I2C interface is enabled using the interrupt function.
[0048] The above technical solution has the following beneficial effects: The MCU supports level edge triggering, meaning that either a rising edge or a falling edge can initiate an interrupt function. Therefore, the MCU monitors the level of the module selection pin in real time. Upon detecting a level change in the module selection pin, it sets the interrupt flag to the first value; it reads the interrupt flag. If the interrupt flag is the first value, the interrupt function is initiated. If the interrupt flag is the second value, the interrupt function is not initiated. After the interrupt function is initiated, the MCU uses the interrupt function to set the interrupt flag to the second value, i.e., clearing the interrupt flag, which avoids repeatedly entering the interrupt function before initiating the next interrupt function. Since the level change of the module selection pin includes both low to high and high to low levels, if the level change is from low to high, the monitored level is high. If the level change is from high to low, the monitored level is low. Therefore, the MCU uses the interrupt function to determine whether the monitored level is low. If the monitored level is not low (i.e., high), the interrupt function closes the first I2C interface; if the monitored level is low, the interrupt function opens the first I2C interface, allowing the host computer and the optical module to communicate normally via I2C. Before determining if the monitored level is low, the interrupt function sets the interrupt flag to the second value. This avoids clearing the interrupt flag set when the module's select pin changes from high to low, allowing the interrupt function to open the first I2C interface and thus enabling normal I2C communication between the host computer and the optical module.
[0049] In some embodiments, a method for improving optical module communication is provided, the method comprising:
[0050] The monitoring module selects the level of the pin;
[0051] If the level of the module selection pin changes from low to high, the interrupt flag is set to the first value.
[0052] Read the interrupt flag bit;
[0053] If the interrupt flag is read as the first value, the interrupt function is started;
[0054] The interrupt flag is set to the second value using the interrupt function.
[0055] The interrupt function is used to determine that the monitored level is high, and the interrupt function is used to shut down the first I2C interface;
[0056] If the level of the module selection pin changes from high to low, the interrupt flag is set to the first value.
[0057] After the previous interrupt function exits, if the interrupt flag is read as the first value, the interrupt function is started.
[0058] The interrupt flag is set to the second value using the interrupt function.
[0059] The interrupt function is used to determine that the monitored level is low, and the first I2C interface is enabled using the interrupt function.
[0060] The above technical solution has the following beneficial effects: Before the optical module is initialized, the level of the module selection pin is low. At the beginning of the optical module initialization stage, the level of the module selection pin is high. When the MCU detects that the level of the module selection pin changes from low to high, it sets the interrupt flag to the first value. When the interrupt flag is read as the first value, the interrupt function is started. When the interrupt flag is read as the second value, the interrupt function is not started. After the interrupt function is started, the MCU uses the interrupt function to set the interrupt flag to the second value, that is, to clear the interrupt flag, which can avoid repeatedly entering this interrupt function before starting the next interrupt function. Since the level change of the module selection pin includes both low to high and high to low, if the level change of the module selection pin is from low to high, the monitored level is high. If the level change of the module selection pin is from high to low, the monitored level is low. Therefore, the MCU uses the interrupt function to determine whether the monitored level is low. Because the module selection pin changes from low to high, and the monitored level is high, the interrupt function disables the first I2C interface, preventing normal communication between the host computer and the optical module via I2C. After the optical module is initialized, the module selection pin is low. The MCU detects this change and sets the interrupt flag to the first value. When the interrupt flag is read as the first value, the interrupt function is initiated. If the interrupt flag is read as the second value, the interrupt function is not initiated. After the interrupt function is initiated, the MCU uses it to set the interrupt flag to the second value, effectively clearing the interrupt flag and preventing repeated entry into the same interrupt function before the next interrupt function is initiated. Since the module selection pin changes from low to high and from high to low, if the change is from low to high, the monitored level is high; if the change is from high to low, the monitored level is low. Therefore, the MCU uses the interrupt function to determine if the monitored level is low. Since the level change of the module selection pin is from high to low, and the monitoring level is low, the interrupt function enables the first I2C interface, and the host computer and the optical module can communicate normally through I2C.
[0061] In some embodiments, a method for improving optical module communication is provided, which uses the interrupt function to determine whether the monitored level is low, including:
[0062] The interrupt function is used to determine whether the monitored level is less than a preset value;
[0063] If the monitoring level is less than a preset value, the monitoring level is low.
[0064] If the monitoring level is less than a preset value, the monitoring level is high.
[0065] The above technical solution has the following beneficial effects: The MCU uses an interrupt function to determine whether the monitored level is low by checking if the monitored level is less than a preset value. If the monitored level is less than the preset value, the monitored level is low. If the monitored level is greater than the preset value, the monitored level is high. Attached Figure Description
[0066] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0067] Figure 1 This is a partial structural diagram of an optical communication system according to some embodiments;
[0068] Figure 2 This is a partial structural diagram of a host computer according to some embodiments;
[0069] Figure 3 This is a structural diagram of an optical module according to some embodiments;
[0070] Figure 4 An exploded view of an optical module according to some embodiments;
[0071] Figure 5 This is a partial view of the internal structure of an optical module according to some embodiments;
[0072] Figure 6 This is a partial view of an optical module connected to a host computer according to some embodiments;
[0073] Figure 7 This is a principle of the internal structure of an optical module according to some embodiments. Figure 1 ;
[0074] Figure 8 This is a principle of the internal structure of an optical module according to some embodiments. Figure 2 ;
[0075] Figure 9 This is a method flow for improving optical module communication according to some embodiments. Figure 1 ;
[0076] Figure 10 This is a method flow for improving optical module communication according to some embodiments. Figure 2 . Detailed Implementation
[0077] The embodiments of this disclosure will now be described clearly and in detail with reference to the accompanying drawings. However, the described embodiments are merely some, and not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure are within the scope of protection of this disclosure.
[0078] Unless the context otherwise requires, throughout the specification and claims, the term "comprising" is interpreted as open and inclusive, meaning "including, but not limited to"; the terms "first" and "second" should not be construed as indicating or implying relative importance or indicating an upper limit on the number; the term "multiple" means two or more; the term "connection" should be interpreted broadly, for example, "connection" can be a fixed connection, a detachable connection, or an integral part, and can be a direct connection or an indirect connection through an intermediate medium; the use of the terms "applicable to" or "configured to" implies open and inclusive language, which does not exclude applicability to or configuration to devices performing additional tasks or steps; descriptions such as "parallel," "perpendicular," "identical," "consistent," and "aligned" are not limited to absolute mathematical theoretical relationships, but also include acceptable error ranges arising in practice, and differences based on the same design concept but due to manufacturing reasons.
[0079] In optical communication technology, to establish information transmission between information processing devices, information is loaded onto light, and the speed of light propagation is used to transmit the information. This light carrying information is called an optical signal. When optical signals are transmitted in optical information transmission equipment, optical power loss can be reduced, enabling long-distance transmission of optical signals. At the same time, the cost of optical information transmission equipment such as optical fibers is lower than that of electrical information transmission equipment such as copper wires. Therefore, optical communication technology can achieve high-speed, long-distance, and low-cost information transmission.
[0080] Information processing equipment typically includes optical network units (ONUs), gateways, routers, switches, mobile phones, computers, servers, tablets, televisions, etc., while optical information transmission equipment typically includes optical fibers and optical waveguides. Information processing equipment can only recognize and process electrical signals, while optical communication technology uses optical signals for transmission, requiring optical modules to convert between optical and electrical signals.
[0081] An optical module enables the conversion between optical signals and electrical signals between information processing equipment and optical information transmission equipment. In some embodiments, at least one of the optical signal input or output terminals of the optical module is connected to an optical fiber, and at least one of the electrical signal input or output terminals of the optical module is connected to an optical network terminal. A first optical signal from the optical fiber is transmitted to the optical module, which converts the first optical signal into a first electrical signal and transmits the first electrical signal to the optical network terminal. A second electrical signal from the optical network terminal is transmitted to the optical module, which converts the second electrical signal into a second optical signal and transmits the second optical signal to the optical fiber.
[0082] Since multiple information processing devices can transmit information via electrical signals, at least one of these devices needs to be directly connected to the optical module, rather than all of them. Here, the information processing device directly connected to the optical module is also referred to as the host computer of the optical module. Furthermore, the optical signal input or output terminal of the optical module is called the optical port, and the electrical signal input or output terminal is called the electrical port.
[0083] Figure 1 This is a partial structural diagram of an optical communication system according to some embodiments. Figure 1 As shown, the optical communication system mainly includes a remote information processing device 1000, a local information processing device 2000, a host computer 100 for optical modules, an optical module 200, an optical fiber 101, and a network cable 103. Among them, the optical fiber 101 is an optical information transmission device, and the network cable 103 is an electrical information transmission device.
[0084] In some embodiments, one end of the optical fiber 101 extends toward the remote information processing device 1000, and the other end of the optical fiber 101 is connected to the optical module 200 through the optical port of the optical module 200. The optical signal can undergo total internal reflection in the optical fiber 101, and the propagation of the optical signal in the direction of total internal reflection can almost maintain the original optical power. The optical signal undergoes multiple total internal reflections in the optical fiber 101 to transmit the optical signal from the remote information processing device 1000 to the optical module 200, or to transmit the optical signal from the optical module 200 to the remote information processing device 1000, thereby realizing long-distance information transmission based on low power loss.
[0085] The optical communication system includes one or more optical fibers 101. In some embodiments, the optical fiber 101 is detachably connected to the optical module 200; in some embodiments, the optical fiber 101 is non-detachably connected to the optical module 200.
[0086] The host computer 100 is configured to provide data signals to the optical module 200, or receive data signals from the optical module 200, or monitor or control the working status of the optical module 200.
[0087] The host computer 100 includes a housing for accommodating the optical module 200, and an optical module interface 102 disposed on the housing. The optical module 200 is inserted into the housing through the optical module interface 102 to establish a unidirectional or bidirectional electrical signal connection between the host computer 100 and the optical module 200.
[0088] The host computer 100 also includes an external power interface that can connect to an electrical signal network. In some embodiments, the external power interface includes a Universal Serial Bus (USB) interface or a network cable interface 104. The network cable interface 104 is configured to connect a network cable 103 to establish a unidirectional or bidirectional electrical signal connection between the host computer 100 and the network cable 103.
[0089] One end of the network cable 103 is connected to the local information processing device 2000, and the other end is connected to the host computer 100, so as to establish an electrical signal connection between the local information processing device 2000 and the host computer 100 through the network cable 103. In some embodiments, a third electrical signal emitted by the local information processing device 2000 is transmitted to the host computer 100 through the network cable 103. The host computer 100 generates a second electrical signal based on the third electrical signal. The second electrical signal from the host computer 100 is transmitted to the optical module 200. The optical module 200 converts the second electrical signal into a second optical signal and transmits the second optical signal to the optical fiber 101. The second optical signal is transmitted in the optical fiber 101 to the remote information processing device 1000.
[0090] In some embodiments, a first optical signal from a remote information processing device 1000 is transmitted through an optical fiber 101, and the first optical signal from the optical fiber 101 is transmitted to an optical module 200. The optical module 200 converts the first optical signal into a first electrical signal, and transmits the first electrical signal to a host computer 100. The host computer 100 generates a fourth electrical signal based on the first electrical signal and transmits the fourth electrical signal to a local information processing device 2000.
[0091] In some embodiments, the optical module is a tool for converting optical signals to electrical signals. During the conversion process, the information does not change, but the encoding or decoding method of the information changes.
[0092] In addition to optical network terminals, the host computer 100 also includes optical line terminals (OLTs), optical network equipment (ONTs), or data center servers.
[0093] Figure 2This is a partial structural diagram of a host computer according to some embodiments. To clearly show the connection relationship between the optical module 200 and the host computer 100, Figure 2 Only the structure of the host computer 100 related to the optical module 200 is shown. For example... Figure 2 As shown, in some embodiments, the host computer 100 further includes a PCB circuit board 105 disposed in the receiving cavity, and a cage 106 disposed on the surface of the PCB circuit board 105; the optical module 200 is inserted into the cage 106 and fixed by the cage 106.
[0094] In some embodiments, a heat sink 107 is provided on the cage 106 to dissipate heat for the optical module; in some embodiments, the heat sink 107 has protruding structures such as fins to increase the heat dissipation area.
[0095] In some embodiments, an electrical connector is provided inside the cage 106, which is configured to connect to the electrical port of the optical module 200.
[0096] In some embodiments, the optical module 200 is inserted into the cage 106 of the host computer 100, and the cage 106 fixes the optical module 200. The heat generated by the optical module 200 is conducted to the cage 106 and then diffused through the heat sink 107.
[0097] In some embodiments, the optical module 200 is inserted into the cage 106 of the host computer 100, and the electrical port of the optical module 200 is connected to the electrical connector inside the cage 106, thereby establishing an electrical signal connection between the optical module 200 and the host computer 100.
[0098] In some embodiments, the optical port of the optical module 200 is connected to the optical fiber 101, thereby enabling the optical module 200 to establish an optical signal connection with the optical fiber 101.
[0099] Figure 3 This is a structural diagram of an optical module according to some embodiments. Figure 4 This is an exploded view of an optical module according to some embodiments. Figure 3 and Figure 4 As shown, in some embodiments, the optical module 200 includes a shell, which comprises an upper shell 201 and a lower shell 202. The upper shell 201 covers the lower shell 202, forming two openings 204 and 205, one of which is an electrical port and the other is an optical port. In some embodiments, the shell forms an opening that serves as both an electrical port and an optical port.
[0100] In some embodiments, the upper housing 201 and the lower housing 202 are made of metal materials, which facilitates electromagnetic shielding and heat dissipation.
[0101] The assembly method of combining the upper housing 201 and the lower housing 202 facilitates the installation of the circuit board 300, the light emitting component 400, the light receiving component 500, etc. into the housing. The upper housing 201 and the lower housing 202 can encapsulate and protect the above-mentioned devices.
[0102] The direction of the line connecting the two openings 204 and 205 can be consistent with or inconsistent with the length direction of the optical module 200. For example, opening 204 is located at the end of the optical module 200. Figure 3 The opening 205 is also located at the end of the optical module 200 (right end). Figure 3 (The left end). Alternatively, opening 204 is located at the end of optical module 200, while opening 205 is located on the side of optical module 200.
[0103] In some embodiments, the lower housing 202 includes a base plate 2021 and two lower side plates 2022 located on both sides of the base plate 2021 and perpendicular to the base plate 2021; the upper housing 201 includes a cover plate 2011, which covers the two lower side plates 2022 of the lower housing 202 to form the aforementioned housing.
[0104] In some embodiments, the lower housing 202 includes a base plate 2021 and two lower side plates 2022 located on both sides of the base plate 2021 and perpendicular to the base plate 2021; the upper housing 201 includes a cover plate 2011 and two upper side plates located on both sides of the cover plate 2011 and perpendicular to the cover plate 2011. The two upper side plates and the two lower side plates 2022 are combined to realize that the upper housing 201 covers the lower housing 202.
[0105] like Figure 3 and Figure 4As shown, in some embodiments, the optical module includes a circuit board 300 disposed within a housing. The circuit board 300 includes circuit traces, electronic components, and chips, etc. The electronic components and chips are connected according to the circuit design through the circuit traces to realize functions such as power supply, electrical signal transmission, and grounding. Electronic components may include, for example, capacitors, resistors, transistors, and metal-oxide-semiconductor field-effect transistors (MOSFETs). Chips may include microcontroller units (MCUs), laser driver chips, transimpedance amplifiers (TIAs), limiting amplifiers (LAs), clock and data recovery chips (CDRs), power management chips, and digital signal processing (DSP) chips.
[0106] In some embodiments, the circuit board includes a rigid circuit board, which, due to its relatively rigid material, can also serve a load-bearing function, such as being able to stably support the aforementioned electronic components and chips; the rigid circuit board can also be inserted into an electrical connector in the cage 106 of the host computer 100.
[0107] In some embodiments, the circuit board further includes a flexible circuit board, which can be used independently or in conjunction with a rigid circuit board.
[0108] In some embodiments, the circuit board further includes gold fingers 310 formed on its end surface, the gold fingers 310 being composed of a plurality of independent pins.
[0109] In some implementations, the gold fingers 310 are disposed on one side of the surface of the circuit board 300 (e.g., Figure 4 (as shown on the upper surface); In some implementations, the gold fingers 310 are disposed on the upper and lower surfaces of the circuit board 300 to provide a greater number of pins, thereby adapting to applications with high pin count requirements.
[0110] In some implementations, the gold fingers 310 of the circuit board extend from the electrical port and are inserted into the electrical connector of the host computer 100; the circuit board is inserted into the cage 106, and the gold fingers are connected to the electrical connector inside the cage 106. The gold fingers 310 are configured to establish an electrical connection with the host computer, enabling electrical connection functions such as power supply, grounding, two-wire synchronous serial (Inter-Integrated Circuit, I2C) signal transmission, and data signal transmission.
[0111] In some embodiments, the optical module 200 further includes an unlocking component 600 located outside its housing. The unlocking component 600 is configured to establish a fixed connection between the optical module 200 and the host computer, or to release the fixed connection between the optical module 200 and the host computer.
[0112] For example, the unlocking component 600 is located on the outside of the two lower side plates 2022 of the lower housing 202, and includes a locking component that matches the cage 106 of the host computer 100. When the optical module 200 is inserted into the cage 106, the locking component of the unlocking component 600 fixes the optical module 200 in the cage 106; when the unlocking component 600 is pulled, the locking component of the unlocking component 600 moves accordingly, thereby changing the connection relationship between the locking component and the host computer, so as to release the fixation between the optical module 200 and the host computer, thereby allowing the optical module 200 to be pulled out of the cage 106.
[0113] In some embodiments, the optical module includes a light emitting component 400, such as... Figure 3 and Figure 4 As shown. The light emitting component 400 is used to emit light signals.
[0114] In some embodiments, the optical module includes an optical receiving component 500, such as... Figure 3 and Figure 4 As shown. The optical receiving unit 500 is used to receive optical signals and convert them into electrical signals.
[0115] In some embodiments, at least one of the light emitting component 400 or the light receiving component 500 is located on the side of the circuit board 300 away from the gold fingers.
[0116] In some embodiments, the light emitting component 400 and the light receiving component 500 are physically separated from the circuit board 300, and then electrically connected to the circuit board 300 through corresponding flexible circuit boards or electrical connectors.
[0117] In some embodiments, at least one of the light emitting component or the light receiving component may be directly disposed on the circuit board 300. For example, at least one of the light emitting component or the light receiving component may be disposed on the surface of the circuit board 300 or the side of the circuit board 300.
[0118] In some embodiments, the surface of the circuit board 300 may be provided with an MCU 320, which can be connected to the gold finger 310 so that the MCU 320 and the host computer can be connected through the gold finger 310.
[0119] In some embodiments, a laser driver chip 330 and a transimpedance amplifier chip 340 may be disposed on the surface of the circuit board 300, and an MCU 320 may be connected to the laser driver chip 330 and the transimpedance amplifier chip 340.
[0120] Figure 5 This is a partial view of the internal structure of an optical module according to some embodiments. Figure 6 This is a partial diagram illustrating the connection between an optical module and a host computer according to some embodiments. Figure 5 and Figure 6 As shown, in some embodiments, the gold finger 310 may include a module selection pin 311. Communication management between the host computer and the optical module is implemented through the module selection pin 311.
[0121] In some embodiments, the gold finger 310 may include a first I2C interface 312. The first I2C interface 312 may include a first serial data line pin 3121 and a first serial clock line pin 3122.
[0122] The voltage level of the module select pin 311 affects whether the first I2C interface is enabled or disabled. When the voltage level of the module select pin 311 is high, the first I2C interface is disabled, and the optical module cannot respond to commands from the host computer. When the voltage level of the module select pin 311 is low, the first I2C interface is enabled, and the optical module can respond to commands from the host computer.
[0123] In some embodiments, the module selection pin 311 of the gold finger 310 can be connected to the host computer 100 so that the optical module 200 can receive the electrical signal transmitted by the host computer 100 through the module selection pin 311.
[0124] In some embodiments, the first I2C interface of the gold finger 310 can be connected to the host computer 100, enabling the optical module 200 to connect with the host computer 100 via I2C. When the first I2C interface is closed, the optical module 200 and the host computer 100 cannot communicate normally via I2C, causing the optical module to be unable to respond to commands from the host computer. When the first I2C interface is open, the optical module 200 and the host computer 100 can communicate normally via I2C, allowing the optical module to respond to commands from the host computer.
[0125] During the initialization of the optical module, a jitter signal is generated on the module selection pin, causing the pin's voltage level to toggle. This toggle level might be missed, leading to abnormal I2C communication between the optical module and the host computer. To solve this problem, the interrupt flag is cleared before the voltage level on the module selection pin toggles. This prevents the interrupt flag from being cleared after the voltage level toggle. The MCU then uses an interrupt function to control the first I2C interface to open based on the toggled low voltage level, ensuring normal I2C communication between the optical module and the host computer.
[0126] Figure 7 This is a principle of the internal structure of an optical module according to some embodiments. Figure 1 . Figure 8 This is a principle of the internal structure of an optical module according to some embodiments. Figure 2 .like Figure 7 and Figure 8 As shown, in some embodiments, an MCU 320 is disposed on the surface of the circuit board 300. The MCU 320 can be connected to the gold finger 310 so that the MCU 320 and the host computer can be connected via the gold finger 310.
[0127] In some embodiments, the MCU320 may include a monitoring pin 322. The monitoring pin 322 may be connected to a module select pin 311 so that the MCU320 can monitor the level of the module select pin 311, and thus detect changes in the level of the module select pin 311. Changes in the level of the module select pin 311 may include a change from low to high, or a change from high to low.
[0128] In some embodiments, the MCU 320 may include a first communication interface, which may be a second I2C interface 323. The second I2C interface 323 may be connected to the first I2C interface 312 of the gold finger 310 via I2C, so that the MCU 320 and the gold finger 310 can transmit electrical signals via I2C.
[0129] The second I2C interface 323 may include a second serial data line pin 3231 and a second serial clock line pin 3232. The second serial data line pin 3231 is connected to the first serial data line pin 3121 via a serial data line, and the second serial clock line pin 3232 is connected to the first serial clock line pin 3122 via a serial clock line. The serial data line and the serial clock line constitute I2C.
[0130] In some embodiments, the MCU 320 may include a second communication interface 324. The second communication interface 324 may be connected to the fourth communication interface 331 of the laser driver chip 330, so that the MCU 320 can communicate with the laser driver chip 330.
[0131] The second communication interface 324 may include a third serial data line pin 3241 and a third serial clock line pin 3242. The fourth communication interface 331 may include a fourth serial data line pin 3311 and a fourth serial clock line pin 3312. The third serial data line pin 3241 and the fourth serial data line pin 3311 are connected through a serial data line, and the third serial clock line pin 3242 and the fourth serial clock line pin 3312 are connected through a serial clock line. The serial data line and the serial clock line form an I2C connection, so that the MCU 320 and the laser driver chip 330 can communicate and connect through I2C.
[0132] In some embodiments, the MCU 320 may include a third communication interface 325. The third communication interface 325 may be connected to the fifth communication interface 341 of the transimpedance amplifier chip 340, so that the MCU 320 can communicate with the transimpedance amplifier chip 340.
[0133] The third communication interface 325 may include a fifth serial data line pin 3251 and a fifth serial clock line pin 3252. The fifth communication interface 341 may include a sixth serial data line pin 3411 and a sixth serial clock line pin 3412. The fifth serial data line pin 3251 and the sixth serial data line pin 3411 are connected through a serial data line, and the fifth serial clock line pin 3252 and the sixth serial clock line pin 3412 are connected through a serial clock line. The serial data line and the serial clock line form an I2C connection, so that the MCU 320 and the transimpedance amplifier chip 340 can communicate and connect through I2C.
[0134] In some embodiments, the MCU320 may include a register 321, which may store an interrupt flag, an interrupt function, and a monitoring level.
[0135] The interrupt flag indicates whether an interrupt function can be initiated. When the interrupt flag is at its first value, the MCU can initiate an interrupt function. When the interrupt flag is at its second value, the MCU cannot initiate an interrupt function.
[0136] The interrupt function is a program segment (i.e., the first program) in the MCU320 software. The interrupt function has a higher priority than other programs in the MCU320 software (i.e., the second program). Therefore, when the interrupt function is started, the second program of the MCU320 software stops; when the interrupt function exits, the second program of the MCU320 software continues to run.
[0137] The second program may include reading the interrupt flag. Therefore, when the MCU320 reads the interrupt flag as the first value, the MCU320 will pause the running second program and start the first program. After the first program exits, the MCU320 will restart the second program so that the MCU320 can reread the interrupt flag.
[0138] The monitoring level is the real-time level of the module select pin 311 monitored by the MCU320. When the level change of the module select pin 311 monitored by the MCU320 changes from low to high, the real-time level of the module select pin 311 monitored by the MCU320 is high; when the level change of the module select pin 311 monitored by the MCU320 changes from high to low, the real-time level of the module select pin 311 monitored by the MCU320 is low.
[0139] The MCU320 of the optical module supports "level change" triggered interrupt functions, meaning that either a rising edge (from low to high) or a falling edge (from high to low) can activate the interrupt function. Therefore, when the MCU320 detects a level change on the module select pin (from low to high or from high to low), it sets the interrupt flag to the first value. The MCU320 reading the first value of the interrupt flag indicates a level change on the module select pin, triggering the interrupt function.
[0140] The MCU320 monitors the voltage level of the module selection pin and sets the interrupt flag to the first value based on the voltage level change of the module selection pin. This is implemented using the MCU320's hardware.
[0141] Both the first and second programs are implemented using the MCU320 software. Therefore, how the MCU320 sets the interrupt flag to the first value is not necessarily related to the execution of the first and second programs. That is, how the MCU320 sets the interrupt flag to the first value can be done synchronously or separately from the execution of the first and second programs.
[0142] Since the MCU320 of the optical module supports interrupt functions triggered by "level changes" (including transitions from low to high and from high to low), it is necessary to determine whether the monitored level is low within the interrupt function. If the monitored level is high, the MCU320 can use the interrupt function to close the first I2C interface, preventing the host computer and the optical module from communicating normally via I2C. If the monitored level is low, the MCU320 can use the interrupt function to open the first I2C interface, allowing the host computer and the optical module to communicate normally via I2C.
[0143] In some embodiments, the MCU320 can be configured to: detect a level change in the module select pin 311, set the interrupt flag to a first value; read the interrupt flag as the first value, start the interrupt function; use the interrupt function to set the interrupt flag to a second value; if the monitored level is high, use the interrupt function to close the first I2C interface 312; if the monitored level is low, use the interrupt function to open the first I2C interface 312.
[0144] After the interrupt function is started, the interrupt flag is set to the second value, which clears the interrupt flag. This avoids repeatedly entering the interrupt function, reduces the amount of resources of the MCU320 occupied by the interrupt function, and thus ensures the performance of the optical module.
[0145] Before determining whether the monitored level is low, the interrupt function sets the interrupt flag to the second value. This avoids clearing the interrupt flag set when the level of the module selection pin changes from high to low. This allows the interrupt function to enable the first I2C interface, thus enabling the host computer and the optical module to communicate normally via I2C.
[0146] Before the optical module is initialized, the level of the module selection pin is low; when the optical module is initialized and started, the level of the module selection pin is high; after the optical module is initialized, the level of the module selection pin is low. Therefore, in some embodiments, the MCU320 can be configured to: detect that the level of the module selection pin 311 changes from low to high, set the interrupt flag to a first value; read the interrupt flag as the first value, start the interrupt function; use the interrupt function to set the interrupt flag to a second value; use the interrupt function to determine that the monitored level is high, and use the interrupt function to close the first I2C interface 312; detect that the level of the module selection pin changes from high to low, set the interrupt flag to a first value; after the previous interrupt function exits, read the interrupt flag as the first value, start the interrupt function; use the interrupt function to set the interrupt flag to a second value; use the interrupt function to determine that the monitored level is low, and use the interrupt function to open the first I2C interface 312.
[0147] In some embodiments, the MCU320 can be configured to use an interrupt function to determine whether the monitored level is less than a preset value. The interrupt function can determine whether the monitored level is low by checking if the monitored level is less than the preset value; when the monitored level is less than the preset value, the monitored level is low; when the monitored level is greater than the preset value, the monitored level is high.
[0148] Figure 9 This is a method flow for improving optical module communication according to some embodiments. Figure 1 . Figure 10 This is a method flow for improving optical module communication according to some embodiments. Figure 2 .like Figure 9 and Figure 10 As shown, in some embodiments, the method for improving optical module communication includes:
[0149] S100: Monitoring module select pin level.
[0150] The MCU real-time monitoring module selects a pin and writes the monitored level into the MCU's register.
[0151] If the level of the module selection pin changes, the interrupt flag is set to the first value; otherwise, the interrupt flag is not set to the first value.
[0152] The monitoring level is the real-time level of the module select pin 311 monitored by the MCU320. Level changes on the module select pin include transitions from low to high and from high to low. When the level change of the module select pin 311 monitored by the MCU320 is from low to high, the real-time level of the module select pin 311 monitored by the MCU320 is high; when the level change of the module select pin 311 monitored by the MCU320 is from high to low, the real-time level of the module select pin 311 monitored by the MCU320 is low.
[0153] S200: Detects a level change in the module select pin and sets the interrupt flag to the first value.
[0154] The interrupt flag indicates whether an interrupt function can be initiated. When the interrupt flag is at its first value, the MCU can initiate the interrupt function. When the interrupt flag is at its second value, the MCU cannot initiate the interrupt function. The MCU320 of the optical module supports "level change" triggering of the interrupt function, meaning that either a rising edge (from low to high) or a falling edge (from high to low) can initiate the interrupt function. Therefore, when the MCU detects a level change on the module selection pin, it writes the first value to the location of the interrupt flag in the register.
[0155] Since the level changes of the module select pin include both low to high and high to low, detecting a level change of the module select pin and setting the interrupt flag to the first value includes:
[0156] S210: Detecting a change in the module select pin level from low to high, set the interrupt flag to the first value.
[0157] S220: Detecting a change in the module select pin level from high to low, set the interrupt flag to the first value.
[0158] S300: Read interrupt function flags.
[0159] After the previous interrupt function exits, the MCU's second program starts, meaning the MCU can read the interrupt function flag. During the optical module initialization, the interrupt function has not yet been started, so the MCU can directly read the interrupt function flag. During optical module initialization, the interrupt function has already been started, and the MCU reads the interrupt function flag again after the previous interrupt function exits.
[0160] S400: The interrupt function flag is read as the first value, and the interrupt function is started.
[0161] If the MCU reads the interrupt flag as the first value, the second program stops and the first program starts, i.e., the interrupt function is started. If the MCU reads the interrupt flag as the second value, the second program continues, but the first program is not started, i.e., the interrupt function is not started.
[0162] S500: Use the interrupt function to set the interrupt flag to the second value.
[0163] After the interrupt function is started, it sets the interrupt flag to the second value, which clears the interrupt flag. Clearing the interrupt flag avoids repeated entry into the interrupt function, reduces the excessive use of MCU resources by the interrupt function, and thus ensures the performance of the optical module.
[0164] S600: Uses an interrupt function to determine whether the monitored level is low.
[0165] Since the MCU320 of the optical module supports interrupt functions triggered by "level changes", which include changes from low level to high level and changes from high level to low level, it is necessary to determine whether the monitored level is low in the interrupt function.
[0166] The interrupt function can determine whether the monitored level is low by checking if the monitored level is less than a preset value. If the monitored level is less than the preset value, the monitored level is low. If the monitored level is greater than the preset value, the monitored level is high.
[0167] Before determining whether the monitored level is low, the interrupt function sets the interrupt flag to the second value. This avoids clearing the interrupt flag set when the level of the module selection pin changes from high to low. This allows the interrupt function to enable the first I2C interface, thus enabling the host computer and the optical module to communicate normally via I2C.
[0168] S700: If the monitored level is high, the first I2C interface is shut down using the interrupt function.
[0169] If the monitored level is not low (i.e., high), the interrupt function closes the first I2C interface, preventing the optical module 200 from communicating normally with the host computer 100 via I2C, thus making the optical module unable to respond to the host computer's commands.
[0170] S800: If the monitored level is low, the first I2C interface is enabled using the interrupt function.
[0171] If the monitored level is low, the interrupt function enables the first I2C interface, allowing the optical module 200 and the host computer 100 to communicate normally via I2C, thus enabling the optical module to respond to the host computer's commands.
[0172] Before the optical module is initialized, the level of the module selection pin is low; when the optical module is initialized and started, the level of the module selection pin is high; after the optical module is initialized, the level of the module selection pin is low. Therefore, the optical module communication can be improved by using S100-S210-S300-S400-S500-S600-S700-S220-S300-S400-S500-S600-S800.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure.
Claims
1. An optical module characterized by comprising: include: The circuit board has the following structure on one end: Module selection pin; First I2C interface; An MCU, located on the circuit board, is connected to the module selection pin to monitor the level of the module selection pin; the MCU is also connected to the first I2C interface to control the first I2C interface to be enabled or disabled; the MCU includes: The register stores the interrupt flag, interrupt function, and monitoring level; the monitoring level is the real-time level of the module selection pin monitored by the MCU. The MCU is configured as follows: Upon detecting a change in the level of the module selection pin, the interrupt flag is set to a first value; If the interrupt flag is read as the first value, the interrupt function is started. The interrupt flag is set to the second value using the interrupt function. If the monitored level is high, the first I2C interface is shut down using the interrupt function. If the monitored level is low, the first I2C interface is enabled using the interrupt function.
2. The optical module according to claim 1, characterized by The level changes of the module selection pin include from low level to high level and from high level to low level; The MCU is configured as follows: If the level of the module selection pin changes from low to high, the interrupt flag is set to the first value. If the interrupt flag is read as the first value, the interrupt function is started. The interrupt flag is set to the second value using the interrupt function. The interrupt function is used to determine that the monitored level is high, and the interrupt function is used to shut down the first I2C interface; If the level of the module selection pin changes from high to low, the interrupt flag is set to the first value. After the previous interrupt function exits, if the interrupt flag is read as the first value, the interrupt function is started. The interrupt flag is set to the second value using the interrupt function. The interrupt function is used to determine that the monitored level is low, and the first I2C interface is enabled using the interrupt function.
3. The optical module according to claim 1, characterized by The MCU includes a second I2C interface, which is connected to the first I2C interface via I2C.
4. The optical module according to claim 1, characterized by The MCU is configured as follows: The interrupt function is used to determine whether the monitored level is less than a preset value.
5. The optical module according to claim 3, characterized by The first I2C interface includes: First serial data line pin; First serial clock line pin; The second I2C interface includes: The second serial data line pin is connected to the first serial data line pin via a serial data line. The second serial clock line pin is connected to the first serial clock line pin via a serial clock line; the serial data line and the serial clock line together form the I2C.
6. A method of improving optical module communications, the method comprising: The method includes: The monitoring module selects the level of the pin; Upon detecting a change in the level of the module selection pin, the interrupt flag is set to the first value; Read the interrupt flag bit; If the interrupt flag is read as the first value, the interrupt function is started; The interrupt flag is set to the second value using the interrupt function. If the monitored level is high, the first I2C interface is shut down using the interrupt function. If the monitored level is low, the first I2C interface is enabled using the interrupt function.
7. The method of claim 6, wherein, The method includes: The monitoring module selects the level of the pin; If the level of the module selection pin changes from low to high, the interrupt flag is set to the first value. Read the interrupt flag bit; If the interrupt flag is read as the first value, the interrupt function is started; The interrupt flag is set to the second value using the interrupt function. The interrupt function is used to determine that the monitored level is high, and the interrupt function is used to shut down the first I2C interface; If the level of the module selection pin changes from high to low, the interrupt flag is set to the first value. After the previous interrupt function exits, if the interrupt flag is read as the first value, the interrupt function is started. The interrupt flag is set to the second value using the interrupt function. The interrupt function is used to determine that the monitored level is low, and the first I2C interface is enabled using the interrupt function.
8. The method according to claim 6, characterized in that, The interrupt function is used to determine whether the monitored level is low, including: The interrupt function is used to determine whether the monitored level is less than a preset value; If the monitoring level is less than a preset value, the monitoring level is low. If the monitoring level is less than a preset value, the monitoring level is high.