CN114764607A - Counting method, counting device and optical module - Google Patents

Counting method, counting device and optical module Download PDF

Info

Publication number
CN114764607A
CN114764607A CN202110031264.3A CN202110031264A CN114764607A CN 114764607 A CN114764607 A CN 114764607A CN 202110031264 A CN202110031264 A CN 202110031264A CN 114764607 A CN114764607 A CN 114764607A
Authority
CN
China
Prior art keywords
count value
optical module
optical
mcu
interrupt signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110031264.3A
Other languages
Chinese (zh)
Inventor
王凤来
�田�浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN202110031264.3A priority Critical patent/CN114764607A/en
Publication of CN114764607A publication Critical patent/CN114764607A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M1/00Design features of general application
    • G06M1/27Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum
    • G06M1/272Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum using photoelectric means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/07Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems
    • H04B10/075Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Optical Communication System (AREA)

Abstract

The application discloses a counting method, a counting device and an optical module, wherein the counting method comprises the following steps: the MCU counts time, and reports interruption after reaching preset time; secondly, the MCU acquires an interrupt signal; then, the MCU generates a count value according to the interrupt signal count and sends the count value; finally, the nonvolatile memory stores the count value. According to the steps, the MCU realizes the cycle work and generates a count value according to the interrupt signal count. And calculating the actual power-on time of the optical module according to the count value. In the application, the nonvolatile memory can ensure that the data stored in the nonvolatile memory cannot be lost after the optical module is powered off. Therefore, even if the optical module is powered on again after power failure, the steps are repeated to continue counting, and the actual power-on time of the optical module is calculated according to the count value, so that the optical module has the function of recording the accumulated power-on running time.

Description

Counting method, counting device and optical module
Technical Field
The present application relates to the field of optical fiber communication technologies, and in particular, to a counting method, a counting apparatus, and an optical module.
Background
In an optical fiber communication system, an optical transceiver module, referred to as an optical module for short, is a standard module in the field of optical communication. The optical module is a connection module which plays a role in photoelectric conversion. The circuit board of the traditional optical module is only provided with the MCU, so that the traditional optical module cannot realize the counting function.
Disclosure of Invention
The application provides a counting method, a counting device and an optical module, which enable the optical module to realize a counting function.
A counting method, comprising:
timing, and reporting interruption after reaching preset time;
acquiring an interrupt signal;
and generating a count value according to the interrupt signal count, and transmitting the count value, wherein the count value is stored in the nonvolatile memory.
A counting device, comprising:
the reporting module is used for timing and reporting interruption after the preset time is reached;
the acquisition module is used for acquiring an interrupt signal;
and the generating module is used for generating a count value according to the interrupt signal count and sending the count value, wherein the count value is stored in the nonvolatile memory.
A light module, comprising:
a circuit board;
the light emission sub-module is electrically connected with the circuit board and used for emitting light signals;
the light receiving secondary module is electrically connected with the circuit board and used for receiving light signals;
the circuit board is provided with an MCU and a nonvolatile memory;
the MCU is used for generating a count value according to timing;
and the nonvolatile memory is connected with the MCU through an I2C bus and is used for storing the count value.
Has the advantages that: the application provides a counting method, firstly, a MCU counts time, and reports interruption after reaching preset time; secondly, the MCU acquires an interrupt signal; then, the MCU generates a count value according to the interrupt signal count, and sends the count value; finally, the nonvolatile memory stores the count value. According to the steps, the MCU realizes the cycle work and generates a count value according to the interrupt signal count. And calculating the actual power-on time of the optical module according to the count value. In the application, the nonvolatile memory can ensure that the data stored in the nonvolatile memory cannot be lost after the optical module is powered off. Therefore, even if the optical module is powered on again after power failure, the steps are repeated to continue counting, and the actual power-on time of the optical module is calculated according to the count value, so that the optical module has the function of recording the accumulated power-on running time.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a connection relationship of an optical communication terminal;
fig. 2 is a schematic diagram of an optical network terminal structure;
fig. 3 is a schematic structural diagram of an optical module according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an exploded structure of an optical module according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a counting method according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of another counting method according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
In the following, some embodiments of the present application will be described in detail with reference to the drawings, and features in the following examples and examples may be combined with each other without conflict.
One of the core links of optical fiber communication is the interconversion of optical and electrical signals. The optical fiber communication uses optical signals carrying information to transmit in information transmission equipment such as optical fibers/optical waveguides, and the information transmission with low cost and low loss can be realized by using the passive transmission characteristic of light in the optical fibers/optical waveguides; meanwhile, the information processing device such as a computer uses an electric signal, and in order to establish information connection between the information transmission device such as an optical fiber or an optical waveguide and the information processing device such as a computer, it is necessary to perform interconversion between the electric signal and the optical signal.
The optical module realizes the function of interconversion of optical signals and electrical signals in the technical field of optical fiber communication, and the interconversion of the optical signals and the electrical signals is the core function of the optical module. The optical module is electrically connected with an external upper computer through a golden finger on an internal circuit board of the optical module, and the main electrical connection comprises power supply, I2C signals, data signals, grounding and the like; the optical module realizes optical connection with external optical fibers through an optical interface, and the external optical fibers have various connection modes, so that various optical fiber connector types are derived; the method is characterized in that the electric connection is realized by using a golden finger at an electric interface, which becomes the mainstream connection mode of the optical module industry, and on the basis, the definition of pins on the golden finger forms various industry protocols/specifications; the optical connection mode realized by adopting the optical interface and the optical fiber connector becomes the mainstream connection mode of the optical module industry, on the basis, the optical fiber connector also forms various industry standards, such as an LC interface, an SC interface, an MPO interface and the like, the optical interface of the optical module also has adaptive structural design aiming at the optical fiber connector, and the optical fiber adapter assembly arranged at the optical interface has various types.
Fig. 1 is a schematic diagram of connection relationship of an optical communication terminal. As shown in fig. 1, the connection of the optical communication terminal mainly includes the interconnection among the optical network terminal 100, the optical module 200, the optical fiber 101 and the network cable 103;
one end of the optical fiber 101 is connected with a far-end server, one end of the network cable 103 is connected with local information processing equipment, and the connection between the local information processing equipment and the far-end server is completed by the connection between the optical fiber 101 and the network cable 103; and the connection between the optical fiber 101 and the network cable 103 is made by the optical network terminal 100 having the optical module 200.
An optical interface of the optical module 200 is externally accessed to the optical fiber 101, and establishes bidirectional optical signal connection with the optical fiber 101; the electrical interface of the optical module 200 is externally connected to the optical network terminal 100, and establishes a bidirectional electrical signal connection with the optical network terminal 100; bidirectional interconversion of optical signals and electric signals is realized inside the optical module, so that information connection is established between the optical fiber and the optical network terminal; specifically, the optical signal from the optical fiber 101 is converted into an electrical signal by the optical module and then input to the optical network terminal 100, and the electrical signal from the optical network terminal 100 is converted into an optical signal by the optical module and input to the optical fiber 101.
The optical network terminal is provided with an optical module interface 102, which is used for accessing an optical module 200 and establishing bidirectional electric signal connection with the optical module 200; the optical network terminal has a network cable interface 104, which is used for accessing the network cable 103 and establishing a bidirectional electrical signal connection (generally, an electrical signal of an ethernet protocol, which is different from an electrical signal used by an optical module) with the network cable 103; the optical module 200 is connected to the network cable 103 through the optical network terminal 100, specifically, the optical network terminal transmits a signal from the optical module to the network cable and transmits the signal from the network cable to the optical module, and the optical network terminal serves as an upper computer of the optical module to monitor the operation of the optical module. The optical network terminal is an upper computer of the optical module, provides data signals for the optical module and receives the data signals from the optical module, and a bidirectional signal transmission channel is established between the remote server and the local information processing equipment through the optical fiber, the optical module, the optical network terminal and a network cable.
Common local information processing apparatuses include routers, home switches, electronic computers, and the like; common optical network terminals include an optical network unit ONU, an optical line terminal OLT, a data center server, a data center switch, and the like.
Fig. 2 is a schematic diagram of an optical network terminal structure. As shown in fig. 2, the optical network terminal 100 has a circuit board 105, and a cage 106 is disposed on a surface of the circuit board 105; an electrical connector is arranged in the cage 106 and used for accessing an electrical interface (such as a gold finger) of the optical module; the cage 106 is provided with a heat sink 107, and the heat sink 107 has a projection such as a fin that increases a heat radiation area.
The optical module 200 is inserted into an optical network terminal, the electrical interface of the optical module is inserted into the electrical connector inside the cage 106, and the optical interface of the optical module is connected to the optical fiber 101.
The cage 106 is positioned on the circuit board, and the electrical connector on the circuit board is wrapped in the cage, so that the electrical connector is arranged in the cage; the optical module is inserted into the cage, held by the cage, and the heat generated by the optical module is conducted to the cage 106 and then diffused by the heat sink 107 on the cage.
Fig. 3 is a schematic diagram of an optical module structure provided in the embodiment of the present application, and fig. 4 is an exploded schematic diagram of the optical module provided in the embodiment of the present application. As shown in fig. 3 and 4, an optical module 200 provided in the embodiment of the present application includes an upper housing 201, a lower housing 202, an unlocking member 203, a circuit board 300, a tosa 400, and a rosa 500.
The upper shell 201 is covered on the lower shell 202 to form a wrapping cavity with two openings; the outer contour of the wrapping cavity is generally a square body, and specifically, the lower shell comprises a main plate and two side plates which are positioned at two sides of the main plate and are perpendicular to the main plate; the upper shell comprises a cover plate, and the cover plate covers two side plates of the upper shell to form a wrapping cavity; the upper shell can also comprise two side walls which are positioned at two sides of the cover plate and are perpendicular to the cover plate, and the two side walls are combined with the two side plates to cover the lower shell.
The two openings may be two openings (204, 205) located at the same end of the optical module, or two openings located at different ends of the optical module; one opening is an electric port 204, and a gold finger of the circuit board extends out of the electric port 204 and is inserted into an upper computer such as an optical network terminal; the other opening is an optical port 205 for external optical fiber access to connect the tosa 400 and the rosa 500 inside the optical module; the optoelectronic devices such as the circuit board 300, the tosa 400 and the rosa 500 are located in the package cavity.
The assembly mode of combining the upper shell and the lower shell is adopted, so that the circuit board 300, the transmitter sub-module 400, the receiver sub-module 500 and other devices can be conveniently installed in the shells, and the outermost packaging protection shell of the optical module is formed by the upper shell and the lower shell; the upper shell and the lower shell are made of metal materials generally, so that electromagnetic shielding and heat dissipation are facilitated; generally, the housing of the optical module is not made into an integrated component, so that when devices such as a circuit board and the like are assembled, the positioning component, the heat dissipation component and the electromagnetic shielding component cannot be installed, and the production automation is not facilitated.
The unlocking component 203 is located on the outer wall of the wrapping cavity/lower shell 202, and is used for realizing the fixed connection between the optical module and the upper computer or releasing the fixed connection between the optical module and the upper computer.
The unlocking component 203 is provided with a clamping component matched with the upper computer cage; the end of the unlocking component can be pulled to enable the unlocking component to move relatively on the surface of the outer wall; the optical module is inserted into a cage of the upper computer, and the optical module is fixed in the cage of the upper computer by a clamping component of the unlocking component; by pulling the unlocking component, the clamping component of the unlocking component moves along with the unlocking component, so that the connection relation between the clamping component and the upper computer is changed, the clamping relation between the optical module and the upper computer is released, and the optical module can be drawn out of the cage of the upper computer.
The circuit board 300 is provided with circuit traces, electronic components (such as capacitors, resistors, triodes, and MOS transistors), chips (such as the MCU301, the laser driver chip, the amplitude limiting amplifier chip, the clock data recovery CDR, the power management chip, and the data processing chip DSP), and a nonvolatile memory 302.
The circuit board connects the electrical appliances in the optical module together according to the circuit design through circuit wiring to realize the functions of power supply, electrical signal transmission, grounding and the like.
The circuit board is generally a hard circuit board, and the hard circuit board can also realize a bearing effect due to the relatively hard material of the hard circuit board, for example, the hard circuit board can stably bear a chip; when the optical transceiver is positioned on the circuit board, the rigid circuit board can also provide stable bearing; the hard circuit board can also be inserted into an electric connector in the upper computer cage, and specifically, a metal pin/golden finger is formed on the surface of the tail end of one side of the hard circuit board and is used for being connected with the electric connector; these are not easily implemented with flexible circuit boards.
A flexible circuit board is also used in a part of the optical module to supplement a rigid circuit board; the flexible circuit board is generally used in combination with a rigid circuit board, for example, the rigid circuit board may be connected to the optical transceiver device by using the flexible circuit board.
And the tosa 400 is electrically connected to the circuit board 300 and is used for transmitting optical signals.
The optical receive sub-module 500 has one end connected to an external optical fiber and the other end electrically connected to the circuit board 300 through a pin and a flexible board, and is configured to receive an optical signal transmitted from the external optical fiber.
And the MCU301 is connected with the golden finger of the optical module and used for generating a count value according to timing. Specifically, the MCU301 counts time, and reports an interrupt when the counted time reaches a preset time. The MCU301 acquires an interrupt signal. The MCU301 generates a count value according to the interrupt signal count.
Since an internal clock is provided within the MCU 301. MCU301 clocking refers to internal clock clocking. And triggering interruption when the timing time of the internal clock reaches the preset time, and reporting the interruption.
Since the MCU301 acquires data stored in the nonvolatile memory 302 every software cycle and maps the data to the user readable and writable area of the MCU 301. Because the MCU301 is connected with the golden finger, not only can the power be supplied to the MCU301, but also the data in the user readable and writable area of the MCU301 can be conveniently read by a client through the golden finger. The customer knows the actual power-on time of the light module by reading this data. Wherein the data includes a count value stored by the non-volatile memory 302.
A non-volatile memory 302 for storing a count value. Specifically, when the MCU of the optical module directly stores the count value, the count value stored in the MCU is changed after the optical module is powered off, and the actual power-on time of the optical module is reduced, so that the count of the optical module is inaccurate. Since the nonvolatile memory 302 has a storage function, even after the optical module is powered off, the count value stored in the nonvolatile memory is not lost. Therefore, the customer can know the actual power-on time of the optical module by reading the count value stored in the MCU301, and the recorded actual power-on time of the optical module is not reduced due to power failure of the optical module.
The nonvolatile memory 302 and the MCU301 are connected via an I2C bus. Specifically, the MCU includes a first pin and a second pin, and the nonvolatile memory 302 includes a third pin and a fourth pin. Because the first pin is a serial data line pin, the second pin is a serial clock line pin, the third pin is a serial data line pin, and the fourth pin is a serial clock line pin, the first pin and the third pin are connected through a serial data line, and the second pin and the fourth pin are connected through a serial clock line.
The optical module can realize a counting function, and a counting method of the optical module is described below. The internal clock can be reset only after the timing time reaches a preset time without limiting the timing time, and can also be reset only after the timing time reaches a preset time, and the optical module has the following two counting methods.
Example 1
Fig. 5 is a flowchart illustrating a counting method according to an embodiment of the present application. Referring to fig. 5, in the embodiment of the present application, the specific process of the counting method is as follows:
s100: and timing, and reporting interruption after reaching the preset time.
And after the optical module is electrified and operated, triggering interruption after the timing time of the internal clock of the MCU reaches the preset time. Namely, an internal clock is used for timing, and the interruption is reported when the timing time reaches the preset time.
The preset time can be 1h, 1.5h or 2h and the like. The preset time can be selected according to the specific situation of the optical module. This is not limiting.
For example, after the optical module is powered on and runs, the internal clock counts, and an interrupt is triggered after the counted time reaches 1 h. And when the timing time of the internal clock reaches 1h, the internal clock automatically reports an interrupt signal to the MCU.
The MCU judges whether the internal clock generates interruption or not through the pulse signal. When the preset MCU acquires a low-level pulse signal, the internal clock generates interruption; and when the MCU is preset to acquire a high-level pulse signal, the internal clock does not generate interruption. And the internal clock generates interruption after running for a preset time, and the pulse signal acquired by the MCU is at a low level.
S200: an interrupt signal is acquired.
The MCU acquires an interrupt signal, wherein the interrupt signal is obtained by reporting after the internal clock timing time of the MCU reaches the preset time.
S300: and generating a count value according to the interrupt signal count, and transmitting the count value, wherein the count value is stored in the nonvolatile memory.
The MCU generates a count value from the interrupt signal count and sends the count value to the non-volatile memory via the I2C bus. The nonvolatile memory stores the count value. The optical module can calculate the actual power-on time of the optical module by utilizing the count value.
The storage area of the non-volatile memory may be subdivided into a plurality of sub-storage areas, each sub-storage area being placeable therein as a plurality of count values according to a protocol. The specific storage mode can be set to store all the count values in the first sub-storage area, store the count values in the second sub-storage area when the first sub-storage area has no storage area, and so on, store all the count values.
And all the count values in the same sub-storage area are obtained by adding the distance between the position of the count value and the position of the first count value to the first count value in the same sub-storage area, wherein the distance can only be an integer. The count value of the same position in different sub-storage areas is the same.
If, in the first sub-storage area, the first count value is 1, the second count value is 1+1, the third count value is 1+2, and so on, the last count value is 1+ the distance between the position where the last count value is located and the position where the first count value is located. In the first sub-storage area, the first count value is 1, the second count value is 1+1, the third count value is 1+2, and so on, the last count value is 1+ the distance between the position where the last count value is located and the position where the first count value is located. In the same manner, in the last sub-storage region, the first count value is 1, the second count value is 1+1, the third count value is 1+2, and in the same manner, the last count value is 1+ the distance between the position where the last count value is located and the position where the first count value is located.
Examples are as follows: when the number of the sub-storage areas is 255, the count values in the first sub-storage area are 1, 2, 3, 4, …, and 255 in this order. The count values in the second sub-storage area are 1, 2, 3, 4, …, 255 in this order. And by analogy, the count values in the last sub-storage area are 1, 2, 3, 4, … and 255 in sequence.
And calculating the actual power-on time of the optical module by using the count value stored in the nonvolatile memory. Specifically, the storage area of the nonvolatile memory is divided into a plurality of sub-storage areas, wherein a count value in the first sub-storage area is equal to the actual power-on time of the optical module, a count value in the second sub-storage area plus the maximum count value in the first sub-storage area is equal to the actual power-on time of the optical module, and a count value in the third sub-storage area plus the maximum count value in the second sub-storage area and the maximum count value in the first sub-storage area is equal to the actual power-on time of the optical module. And by analogy, the sum of the count value of the last sub-storage and the maximum count value in all the previous sub-storage areas is equal to the actual power-on time of the optical module.
In order to facilitate a client to obtain the power-on time of the optical module in time, the count value stored in the nonvolatile memory can be mapped to the readable and writable area of the MCU. And each software cycle of a client reads data in the user readable and writable area of the MCU through a golden finger to obtain the actual power-on time of the optical module, so that the situation that the power-on time of the optical module is reduced after the power failure of the optical module is avoided, and the counting accuracy of the optical module is improved.
Example 2
Fig. 6 is a schematic flowchart of another counting method according to an embodiment of the present disclosure. Referring to fig. 6, in the embodiment of the present application, the specific process of the counting method is as follows:
s100: and timing, and reporting interruption after reaching preset time.
And timing by an internal clock of the MCU, and reporting and interrupting when the timing time reaches the preset time.
S200: an interrupt signal is acquired.
The MCU acquires an interrupt signal, wherein the interrupt signal is obtained by reporting after the internal clock timing time of the MCU reaches the preset time.
S300: and generating a count value according to the interrupt signal count, and transmitting the count value, wherein the count value is stored in the nonvolatile memory.
The MCU generates a count value according to the interrupt signal count and sends the count value to the nonvolatile memory through the I2C bus. The nonvolatile memory stores the count value.
S400: clearing the interrupt signal and clearing the timing time of the internal clock.
Because the MCU counts before, there is interrupt signal in the MCU, the internal clock also counts at least one preset time. At this time, the MCU is required to clear the interrupt signal and the timing time of the internal clock. And when the MCU clears the interrupt signal and clears the timing time of the internal clock, repeating S100-S300, so that S100-S200-S300-S400 form a cycle period of the counting method. The specific process is as follows: firstly, an internal clock is used for timing, and interruption is reported after a preset time is reached. Secondly, the MCU acquires an interrupt signal. Then, the MCU generates a count value according to the interrupt signal count, and transmits the count value. And finally, clearing the interrupt signal by the MCU, and clearing the timing time of the internal clock.
For example, after the optical module is powered on for 1 hour, the count value stored in the nonvolatile memory is 1. The MCU clears the interrupt signal and clears the timing time of the internal clock at the same time. And triggering the interrupt again after the internal clock counts for 1h and reporting the interrupt. The MCU continues to read the interrupt signal. The MCU generates a count value from the interrupt signal count and sends the count value to the non-volatile memory via the I2C bus. At this time, the count value is 2. And in the same way, gradually increasing the count value and storing the count value in the nonvolatile memory.
In this embodiment, the rest is completely the same as embodiment 1 except that an MCU clear interrupt signal is added and the timing time of the internal clock is cleared, and will not be described herein again.
In addition to the optical module and the counting method, the present application also provides a counting device. The counting device comprises a reporting module, an acquisition module and a generation module. In particular, the method comprises the following steps of,
and the reporting module is used for timing and reporting the interruption after the preset time is reached.
And the acquisition module is used for acquiring the interrupt signal.
And the generating module is used for generating a count value according to the current interrupt signal count and sending the count value, wherein the count value is stored in the nonvolatile memory.
The application provides a counting method, firstly, a MCU counts time, and reports interruption after reaching preset time; secondly, the MCU acquires an interrupt signal; then, the MCU generates a count value according to the current interrupt signal count, and sends the count value; finally, the nonvolatile memory stores the count value. According to the steps, the MCU realizes the cycle work and generates a count value according to the interrupt signal count. And calculating the actual power-on time of the optical module according to the count value. In the application, the nonvolatile memory can ensure that the data stored in the nonvolatile memory cannot be lost after the optical module is powered off. Therefore, even if the optical module is powered on again after power failure, the steps are repeated to continue counting, and the actual power-on time of the optical module is calculated according to the count value, so that the optical module has the function of recording the accumulated power-on running time.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (7)

1. A counting method, comprising:
timing, and reporting interruption after reaching preset time;
acquiring an interrupt signal;
and generating a count value according to the interrupt signal count, and transmitting the count value, wherein the count value is stored in a nonvolatile memory.
2. The counting method of claim 1, wherein after sending the count value, further comprising:
and clearing the interrupt signal and clearing the timing time of the internal clock.
3. The counting method of claim 1, wherein the count value is mapped in a readable and writable area.
4. Counting method according to claim 1, characterised in that said preset time is 1 h.
5. A counting device, comprising:
the reporting module is used for timing and reporting interruption after the preset time is reached;
the acquisition module is used for acquiring an interrupt signal;
and the generating module is used for generating a count value according to the interrupt signal count and sending the count value, wherein the count value is stored in the nonvolatile memory.
6. A light module, comprising:
a circuit board;
the light emission submodule is electrically connected with the circuit board and is used for emitting light signals;
the light receiving secondary module is electrically connected with the circuit board and used for receiving light signals;
the circuit board is provided with an MCU and a nonvolatile memory;
the MCU is used for generating a count value according to timing;
the nonvolatile memory is connected with the MCU through an I2C bus and used for storing the count value.
7. The optical module according to claim 6, wherein the MCU includes a first pin and a second pin, the non-volatile memory includes a third pin and a fourth pin, the first pin is connected to the third pin, and the second pin is connected to the fourth pin.
CN202110031264.3A 2021-01-11 2021-01-11 Counting method, counting device and optical module Pending CN114764607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110031264.3A CN114764607A (en) 2021-01-11 2021-01-11 Counting method, counting device and optical module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110031264.3A CN114764607A (en) 2021-01-11 2021-01-11 Counting method, counting device and optical module

Publications (1)

Publication Number Publication Date
CN114764607A true CN114764607A (en) 2022-07-19

Family

ID=82363798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110031264.3A Pending CN114764607A (en) 2021-01-11 2021-01-11 Counting method, counting device and optical module

Country Status (1)

Country Link
CN (1) CN114764607A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104275939A (en) * 2014-10-10 2015-01-14 珠海天威技术开发有限公司 Consumable chip, data write-in method of consumable chip and consumable container
US20150381733A1 (en) * 2013-03-21 2015-12-31 Panasonic Corporation Communication device, communication system and communication method
CN206149241U (en) * 2016-11-08 2017-05-03 华大半导体有限公司 Pulse count device
CN108563557A (en) * 2018-02-08 2018-09-21 北京东土科技股份有限公司 A kind of Channel Synchronous method and device of multichannel computer
CN111431604A (en) * 2020-03-27 2020-07-17 青岛海信宽带多媒体技术有限公司 Method for reporting L OS signal and optical module

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150381733A1 (en) * 2013-03-21 2015-12-31 Panasonic Corporation Communication device, communication system and communication method
CN104275939A (en) * 2014-10-10 2015-01-14 珠海天威技术开发有限公司 Consumable chip, data write-in method of consumable chip and consumable container
CN206149241U (en) * 2016-11-08 2017-05-03 华大半导体有限公司 Pulse count device
CN108563557A (en) * 2018-02-08 2018-09-21 北京东土科技股份有限公司 A kind of Channel Synchronous method and device of multichannel computer
CN111431604A (en) * 2020-03-27 2020-07-17 青岛海信宽带多媒体技术有限公司 Method for reporting L OS signal and optical module

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
苏涛等: "《实时信号处理系统设计》", 31 May 2006, 西安:西安电子科技大学出版社, pages: 154 - 157 *

Similar Documents

Publication Publication Date Title
CN111474644A (en) Optical module
CN111431604B (en) Method for reporting LOS signal and optical module
CN111555811A (en) Optical module
CN212647081U (en) Optical module
CN213659029U (en) Optical module
CN214380910U (en) Optical module
CN111555810A (en) Optical module and data transmission method
CN111193547A (en) Optical module
CN213302608U (en) Optical module
CN114488423A (en) Optical module
CN218350566U (en) Optical module
CN114764607A (en) Counting method, counting device and optical module
CN217693343U (en) Optical module
CN213122369U (en) Optical module
CN113472449B (en) Optical module and signal polarity definition method
CN215641964U (en) Optical module
CN214278494U (en) Optical module
CN212647094U (en) Optical module
CN111965768B (en) Optical module
CN114624826A (en) Optical module
CN113687480A (en) Optical module
CN113922870A (en) Optical module
CN115085804A (en) Optical module and received optical power calculation method
CN218868237U (en) Optical module
CN113630186B (en) Optical module and communication method

Legal Events

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