Digital signal demodulation method, consumable chip and consumable container
Technical Field
The invention relates to the technical field of electronic imaging, in particular to a digital signal demodulation method, a consumable chip for realizing the method and a consumable container.
Background
The electronic imaging equipment is taken as common office equipment, great convenience is provided for modern office, the common electronic imaging equipment comprises a printer, a copying machine and the like, the existing printer is divided into an ink-jet printer and a laser printer, and the ink-jet printer uses an ink box containing ink as a consumable container to jet the ink to paper so as to form characters or patterns to be printed on the paper; the laser printer uses a toner cartridge containing carbon powder as a consumable container to form characters or patterns to be printed on a medium.
Referring to fig. 1, the conventional toner cartridge has a housing 11, the housing 11 encloses a cavity for accommodating toner, a chip mounting location 12 is disposed on an outer wall of the housing, and a chip 13 is mounted on the chip mounting location 12. The chip 13 of the toner cartridge, like the chip of the ink cartridge, has a substrate on which electrical contacts 14 are provided as a communication unit for data exchange with the laser printer. An electronic module electrically connected to the electrical contacts 14 is provided on the other side of the substrate, and the electronic module is also provided with a control unit, a nonvolatile memory, a volatile memory, a power supply unit, and the like.
Typically, a toner cartridge uses two electrical contacts 14 disposed on the chip 13. Since the laser printer needs to supply power to the electronic module and transmit data, one of the electrical contacts 14 is a ground contact, and the other electrical contact 14 needs to receive power and transmit data, that is, the power and the data are transmitted on the same signal line.
Referring to fig. 2, after analog-to-digital conversion of the analog signal received by the electrical contact 14, a signal obtained is shown in fig. 2 (a), the signal is modulated by using a carrier, and the electronic module rectifies the digital signal on the one hand to obtain a rectified signal shown in fig. 2 (b), and the rectified signal is used for supplying power to various devices of the electronic module, such as a memory and the like. On the other hand, the electronic module demodulates the digital signal to obtain a demodulated signal as shown in fig. 2 (c), and demodulates the digital signal by comparing the digital signal with a preset level, and if the level of the digital signal is higher than the preset level, the digital signal is confirmed to be at a high level, and if the level of the digital signal is lower than the preset level, the digital signal is confirmed to be at a low level. The mode is usually adjusted by using a triode or an operational amplifier, and has the advantages of low absolute value requirement on the level, adaptability to various voltage amplitudes, complex circuit and poor waveform quality after demodulation.
The existing chip directly converts the signal level by using an analog-to-digital conversion module carried by the embedded processor, which has the advantage of simple circuit structure, but because the data after analog-to-digital conversion needs to be compared with a fixed level so as to obtain the demodulated signal. However, since the communication between the laser printer and the consumable chip is susceptible to influence, the signal level after analog-to-digital conversion is unstable, and high-low variation may occur.
As shown in fig. 3, in the case where the level amplitude of the digital signal is high as a whole in the case shown in fig. 3 (a), but the communication signal is affected, the level amplitude of the digital signal may change low as a whole, as shown in fig. 3 (b), however, in a period of time in which the level amplitude of the digital signal changes, as shown in fig. 3 (c), in the former period of time, the voltage amplitude is low even if it is a high-level signal, and in the latter period of time, the voltage amplitude is high even if it is a low-level signal. If a fixed level signal is used as a result of comparison at the time of demodulation, it is liable that the demodulation result of the digital signal is recognized as all low levels in a period in which the level signal is low, and the demodulation result of the digital signal is recognized as all high levels in a period in which the level signal is high, which is not in accordance with the actual situation.
Disclosure of Invention
In order to solve the above-described problems, a first object of the present invention is to provide a digital signal demodulation method capable of accurately demodulating a digital signal.
The second purpose of the invention is to provide a consumable chip for implementing the digital signal demodulation method.
The third purpose of the invention is to provide a consumable container using the consumable chip.
To achieve the first object of the present invention, a digital signal demodulation method according to the present invention includes: acquiring a current digital signal, acquiring a digital signal recorded in a previous time period, and comparing the level value of the current digital signal with the level value of a corresponding comparison digital signal in the previous time period; if the level value of the current digital signal is greater than the level value of the comparison digital signal, further judging whether the difference value between the level value of the current digital signal and the level value of the comparison digital signal is greater than a first threshold value, if so, determining that the current digital signal is a high-level signal, otherwise, taking the level signal of the comparison digital signal as the level signal of the current digital signal; if the level value of the current digital signal is smaller than the level value of the comparison digital signal, further judging whether the difference value between the level value of the comparison digital signal and the level value of the current digital signal is larger than a second threshold value, if so, determining that the current digital signal is a low-level signal, otherwise, taking the level signal of the comparison digital signal as the level signal of the current digital signal.
According to the scheme, when the digital signal is demodulated, a fixed level is not set, but the level of the current digital signal is compared with the level of the corresponding digital signal in the previous time period, so that whether the current digital signal is a high-level signal or a low-level signal is judged. Thus, even if the overall amplitude of the digital signal changes, the identification of the high level and the low level of the digital signal is not influenced, and the accuracy of demodulating the array signal can be improved.
Preferably, the previous time period is one digital signal cycle, or the previous time period is a plurality of digital signal cycles, and the comparison digital signal is a digital signal with a serial number corresponding to the previous time period.
Therefore, the time period of the last time period is very short, and can be one digital signal period or several digital signal periods, so that the situation that demodulation is inaccurate due to the fact that the time period of the last time period is too long can be avoided.
The further scheme is that if the level value of the current digital signal is equal to the level value of the comparison digital signal, the level signal of the comparison digital signal is used as the level signal of the current digital signal.
Therefore, if the level value of the current digital signal is equal to the level value of the comparison digital signal, the level of the digital signal is kept stable for a period of time, and the level signal of the comparison digital signal is directly used as the level signal of the current digital signal, so that the calculation amount of demodulation can be saved.
Further, the first threshold is equal to the second threshold.
Optionally, the first threshold is half of a preset level amplitude; and/or the second threshold is half the magnitude of the preset level.
Therefore, the first threshold and the second threshold are set to be half of the preset level amplitude, namely half of the amplitudes of the high-level signal and the low-level signal under the normal condition, so that the high level and the low level of the digital signal can be accurately identified.
In order to achieve the second object, the consumable chip provided by the invention comprises a substrate, wherein an electronic module is arranged on the substrate, and the electronic module comprises an analog-to-digital conversion module for converting an analog signal into a digital signal; the electronic module further comprises a data latch and a comparison module, wherein the data latch is used for recording the digital signal recorded in the previous time period, and the comparison module is used for comparing the level value of the current digital signal with the level value of the corresponding comparison digital signal in the previous time period; if the level value of the current digital signal is greater than the level value of the comparison digital signal, further judging whether the difference value between the level value of the current digital signal and the level value of the comparison digital signal is greater than a first threshold value, if so, determining that the current digital signal is a high-level signal, otherwise, taking the level signal of the comparison digital signal as the level signal of the current digital signal; if the level value of the current digital signal is smaller than the level value of the comparison digital signal, further judging whether the difference value between the level value of the comparison digital signal and the level value of the current digital signal is larger than a second threshold value, if so, determining that the current digital signal is a low-level signal, otherwise, taking the level signal of the comparison digital signal as the level signal of the current digital signal.
In order to achieve the third objective, the consumable container provided by the invention comprises a box body, wherein the consumable chip is arranged on the side wall of the box body.
Drawings
Fig. 1 is an exploded view of a conventional toner cartridge.
Fig. 2 is a waveform diagram of digital signal demodulation.
Fig. 3 is a waveform diagram of a digital signal.
Fig. 4 is a first portion of a flow chart of a digital signal demodulation method embodiment of the present invention.
Fig. 5 is a second portion of a flow chart of an embodiment of a digital signal demodulation method of the present invention.
FIG. 6 is a block diagram of a digital signal demodulation circuit in an embodiment of a consumable chip of the present invention.
The invention is further described with reference to the following figures and examples.
Detailed Description
The electronic image forming apparatus of the present invention is a laser printer to which the toner cartridge as a consumable container can be mounted. Specifically, laser printer sets up the organism, is formed with the cartridge installation cavity in the organism, and one or more cartridge detachable install in the cartridge installation cavity, and each cartridge has a box body, and the box body encloses into a powder storehouse that holds the carbon dust, is equipped with the powder outlet in one side in powder storehouse, and the carbon dust accessible goes out the powder storehouse of powder outlet outflow. Detachably installs the consumptive material chip on a lateral wall of box body, and the consumptive material chip includes a base plate, and a surface of base plate is provided with two electrical contact, is provided with the contact pilotage with the electrical contact in the laser printer, and another of base plate is provided with electronic module on the surface, and electronic module includes processing unit and memory, and the storage has, information such as carbon dust colour, carbon dust surplus in the memory.
Because the consumable chip only sets up two electrical contact, consequently, laser printer need transmit power signal and digital signal through same root line, one of them electrical contact of consumable chip need both transmit power signal promptly, transmit data signal again, another electrical contact ground connection. The signals transmitted by the laser printer to the electrical contacts of the consumable chip are analog signals, and therefore, the consumable chip needs to convert the analog signals into digital signals and rectify the digital signals to obtain rectified signals. Generally, the voltage amplitude of the rectified signal is 3V, which can be used as a power supply to meet the working requirements of electronic devices in the consumable chip.
In addition, the electronic module also needs to demodulate the digital signal to obtain the data sent by the laser printer. Referring to fig. 4 and fig. 5, when demodulating the data signal, step S1 is first executed to obtain a current digital signal, for example, a digital signal at the current time. Preferably, the current digital signal is a signal of one digital signal period, and specifically, the electronic module samples the digital signal according to a frequency of data sent by the laser printer, for example, the sampling frequency is 50K, and the digital signal obtained by each sampling is only one bit of digital signal.
Then, step S2 is executed to acquire the digital signal in the previous time period and acquire the corresponding comparison digital signal in the previous time period. In this embodiment, the previous time period is a time period corresponding to one digital signal cycle, that is, the digital signal in the previous time period is only one-bit digital signal, that is, only one sampling value is a value of the comparison digital signal.
In practical application, the last time period can also be a plurality of digital signal periods, if the digital signal is adopted once in one digital signal period, a plurality of sampling values exist in the last time period, and at the moment, the comparison digital signal is the digital signal with the corresponding sequence number in the last time period. For example, the electronic module compares the digital signals according to a preset time period, and if the current digital signal corresponds to a serial number of 5 in the current time period, the digital signal with the serial number of 5 in the previous time period is obtained, and the digital signal is the comparison digital signal.
For this purpose, a data latch is provided in the electronic module for storing the digital signal acquired in the previous time period. Preferably, the data latch may store the digital signals acquired in the past two time periods, delete the digital signals stored in the oldest time period after one time period is over, and start to store the digital signals acquired in the new time period. Two data latch areas are arranged in the data latch and store digital signals obtained in two time periods in a ping-pong mode.
Then, for the level values of the current digital signal and the comparison digital signal, there may be three cases of the comparison result, which are: the level value of the current digital signal is greater than the level value of the comparison digital signal, the level value of the current digital signal is less than the level value of the comparison digital signal, and the level value of the current digital signal is equal to the level value of the comparison digital signal.
In step S3, it is determined whether the level value of the current digital signal is greater than the level value of the comparison digital signal, if yes, step S4 is performed to further determine whether the difference between the level value of the current digital signal and the level value of the comparison digital signal is greater than the first threshold. In this embodiment, the first threshold is a preset value, preferably a half of a preset level amplitude, where the preset level amplitude is a difference between amplitudes of a theoretical high level signal and a theoretical low level signal. Since the voltage amplitudes of the high level signal and the low level signal are fixed when the laser printer transmits the digital signal, in this embodiment, half of the voltage amplitudes of the high level signal and the low level signal is used as the first threshold.
If the determination result in the step S4 is yes, step S6 is executed to determine that the current digital signal is a high level signal, if the determination result in the step S4 is no, step S5 is executed to use the level signal of the comparison digital signal as the level signal of the current digital signal, for example, if the level of the comparison digital signal is a low level signal, it is determined that the current digital signal is also a low level signal, and if the level of the comparison digital signal is a high level signal, it is determined that the current digital signal is also a high level signal.
In order to facilitate the calculation of the initial digital signal, the level of the initial digital signal may be set to a low level signal, i.e., if the current digital signal is the first digital signal, the level of the digital signal is directly set to a low level signal. Of course, the voltage amplitude of the first digital signal may also be compared with a preset value, and if the voltage amplitude is greater than the preset value, the level of the first digital signal is set to be a high level, and if the voltage amplitude is less than the preset value, the level of the first digital signal is set to be a low level.
If the determination result in step S3 is no, step S7 is executed to determine whether the level value of the current digital signal is less than the level value of the comparison digital signal, and if so, step S8 is executed to further determine whether the difference between the level value of the comparison digital signal and the level value of the current digital signal is greater than a second threshold. In this embodiment, the second threshold is a preset value, preferably, a half of a preset level amplitude, where the preset level amplitude is a difference between amplitudes of a theoretical high level signal and a theoretical low level signal. Thus, the first threshold and the second threshold are equal. Of course, the first threshold value may not be equal to the second threshold value.
If the determination result in the step S8 is yes, step S9 is executed to determine that the current digital signal is a low level signal, if the determination result in the step S8 is no, step S10 is executed to use the level signal of the comparison digital signal as the level signal of the current digital signal, for example, if the level of the comparison digital signal is a low level signal, it is determined that the current digital signal is also a low level signal, and if the level of the comparison digital signal is a high level signal, it is determined that the current digital signal is also a high level signal.
If the judgment result of the step S7 is no, indicating that the level value of the current digital signal is equal to the level value of the comparison digital signal, then a step S10 is executed to regard the level signal of the comparison digital signal as the level signal of the current digital signal.
In order to implement the method, the electronic module is provided with corresponding hardware circuits, and referring to fig. 6, the electronic module is provided with an analog-to-digital conversion module 31, a data latch 32, a comparison module 33, and a first flip-flop 34 and a second flip-flop 35. The analog-to-digital conversion module 31 is configured to convert an analog signal into a digital signal, the converted digital signal is transmitted to the comparison module 33 and the data latch 32, the data latch 32 can store the digital signal obtained in the previous time period, and the comparison module 33 is configured to compare the current digital signal with the corresponding comparison digital signal obtained in the previous time period. Preferably, a plurality of comparators are disposed in the comparing module 33, for example, the comparators compare the current digital signal with the comparison digital signal, and compare the difference between the level value of the current digital signal and the level value of the comparison digital signal with the first threshold and the second threshold, so as to determine the level value of the current digital signal. If it is determined that the current digital signal is a high level signal, the first flip-flop 34 is driven to output a high level signal, and if it is determined that the current digital signal is a low level signal, the second flip-flop 35 is driven to output a low level signal.
It can be seen that, in this embodiment, the current digital signal is compared with the comparison digital signal obtained in the previous time period, so as to determine that the current digital signal is a high level signal or a low level signal, and therefore, the comparison with a fixed level signal is not performed, and under the condition that the level of the digital signal is overall higher or lower, the level condition of the current digital signal can still be effectively and accurately identified, and the demodulation result is more accurate. In addition, the circuit arranged in the consumable chip is simpler, and the production cost of the consumable chip cannot be greatly increased.
Finally, it should be emphasized that the present invention is not limited to the above-mentioned embodiments, such as the change of the specific values of the first threshold, the second threshold, or the change of the internal structure of the comparison module, and these changes should also be included in the protection scope of the present claims.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and the above description is only for the embodiment adopted for the understanding of the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present application shall be subject to the scope defined by the claims.