CN101377824A - Chip and microcontroller data processing method - Google Patents
Chip and microcontroller data processing method Download PDFInfo
- Publication number
- CN101377824A CN101377824A CNA2007100300523A CN200710030052A CN101377824A CN 101377824 A CN101377824 A CN 101377824A CN A2007100300523 A CNA2007100300523 A CN A2007100300523A CN 200710030052 A CN200710030052 A CN 200710030052A CN 101377824 A CN101377824 A CN 101377824A
- Authority
- CN
- China
- Prior art keywords
- microcontroller
- circuit
- signal
- data
- power supply
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 230000003071 parasitic effect Effects 0.000 claims description 30
- 239000003990 capacitor Substances 0.000 claims description 24
- 238000000034 method Methods 0.000 claims description 20
- 244000045947 parasite Species 0.000 abstract 1
- 230000005540 biological transmission Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 238000007639 printing Methods 0.000 description 4
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000010355 oscillation Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000010923 batch production Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000007648 laser printing Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
Images
Landscapes
- Power Sources (AREA)
Abstract
The invention provides a chip and a microcontroller data processing method. The chip comprises a handshaking circuit; a parasite power supply circuit acquiring electrical energy and signals from the handshaking circuit, a demodulator circuit and a clock circuit; a modulation circuit for modulating the signals sent by the handshaking circuit; and a microcontroller acquiring signals from the demodulator circuit. The microcontroller data processing method comprises the following steps: step 1. restituted signals are received, and whether to read data is determined; if the data are to be read, the next step is executed, or else, the step 4 is started; step 2: data are read, and check codes and frame formats are generated; step 3. modulation signals are sent, the step 1 is repeated; step 4. whether to write data are determined; if the data are to be written, the next step is executed, or else the step 1 is repeated; step 5. data are written in a memory, and modulation signals are sent, and the step 1 is repeated. The working frequency of the microcontroller for executing the step 2 is higher than the working frequencies of the microcontroller for executing the other steps.
Description
Technical Field
The present invention relates to a chip, and more particularly, to a chip for communicating with the outside in a radio frequency signal manner and a data processing method of a microcontroller of the chip.
Background
The carbon powder box is a common laser printing consumable material and is widely applied to laser printers. Most of the existing toner cartridges are provided with a chip, and the chip usually stores information such as the toner cartridge model, the applicable laser printer model, the residual amount of carbon powder in the toner cartridge and the like. After the toner cartridge is mounted on the laser printer, the laser printer reads the information from the chip to determine whether the toner cartridge is suitable for the laser printer.
The chip of the existing partial toner cartridge is communicated with the laser printer in a wireless mode, and a circuit module connection block diagram of the chip is shown in fig. 1. The chip 10 comprises an integrated circuit 1 storing information related to the toner cartridge, a signal exchange circuit 2, a demodulation circuit 3, a modulation circuit 4 and a parasitic power supply circuit 5. After the toner cartridge is installed on the laser printer, the signal exchange circuit 2 receives the radio frequency signal sent by the laser printer and transmits the radio frequency signal to the demodulation circuit 3 and the parasitic power circuit 5. The parasitic power supply circuit 5 rectifies and filters the radio frequency signal to obtain direct current, and supplies the direct current to the integrated circuit 1 so as to enable the integrated circuit 1 to work. The demodulation circuit 3 demodulates the radio frequency signal to obtain a demodulation signal, and transmits the demodulation signal to the integrated circuit 1, the integrated circuit 1 performs data reading or data writing operation according to the demodulation signal, and transmits an operation result to the modulation circuit 4 in the form of a modulation signal, the modulation circuit 4 modulates a carrier signal generated by resonance of the signal exchange circuit 2, and finally the signal exchange circuit 2 transmits the modulated carrier signal to the laser printer to complete one-time communication.
However, most of the existing integrated circuits use logic circuits for operation, so that the compatibility of the chip is poor, one chip can only be used on one specific type of toner cartridge, and toner cartridge manufacturers need to prepare various chips for different types of toner cartridges, which brings troubles to production.
Moreover, as the printing speed of the laser printer is continuously increased, the operation speed of the chip also needs to be correspondingly increased, that is, the chip needs to operate at a higher operating frequency, so that more electric energy needs to be consumed. Most of the existing chips only use a parasitic power supply circuit for power supply, but the parasitic power supply circuit has limited power supply capacity and cannot meet the requirement of high-speed operation of the chip.
Disclosure of Invention
The invention mainly aims to provide a chip with good compatibility;
another objective of the present invention is to provide a chip with strong power supply capability;
it is still another object of the present invention to provide a microcontroller data processing method that consumes less power;
it is still another object of the present invention to provide a microcontroller data processing method with high power utilization.
In order to achieve the above main object, the chip provided by the present invention comprises a signal exchange circuit for exchanging signals with the outside; a parasitic power circuit for obtaining electric energy from the signal exchange circuit; a demodulation circuit for demodulating a demodulation signal from the signal supplied from the signal switching circuit; a modulation circuit for modulating the signal transmitted from the signal switching circuit; the chip also comprises a microcontroller for acquiring a demodulation signal from the demodulation circuit, wherein the microcontroller processes the demodulation signal and then sends the modulation signal to the modulation circuit; a clock circuit that obtains a clock signal from the handshake circuit and provides it to the microcontroller.
According to the scheme, the chip uses the microcontroller to store the data related to the toner cartridge, and as the microcontroller is a programmable device, a manufacturer can program the microcontroller to modify the stored data, the data storage format and the like, so that the chip has better compatibility.
In order to achieve another object, the present invention provides a chip including a handshake circuit for performing handshake with the outside; a parasitic power circuit for obtaining electric energy from the signal exchange circuit; a demodulation circuit for demodulating a demodulation signal from the signal supplied from the signal switching circuit; a modulation circuit for modulating the signal transmitted from the signal switching circuit; the chip also comprises a microcontroller for acquiring a demodulation signal from the demodulation circuit, wherein the microcontroller processes the demodulation signal and then sends the modulation signal to the modulation circuit; the clock circuit acquires a clock signal from the signal exchange circuit and provides the clock signal to the microcontroller; an auxiliary power supply circuit for providing electrical power to the parasitic power supply circuit, the auxiliary power supply circuit including an auxiliary power supply.
According to the scheme, the chip comprises the parasitic power supply circuit and the auxiliary power supply circuit, when the electric energy provided by the parasitic power supply circuit cannot meet the working requirement of the chip, the auxiliary power supply circuit can supply power to the parasitic power supply circuit so as to support the high-speed operation of the chip and enhance the power supply capacity of the chip.
In order to achieve the above-mentioned another object, the present invention provides a data processing method for a microcontroller, the microcontroller being formed on a chip provided by the main object of the present invention, the microcontroller including a memory, the method including the steps of:
the method comprises the following steps: the microcontroller receives the demodulation signal sent from the demodulation circuit and judges whether the data stored in the memory needs to be read or not, if so, the next step is executed, otherwise, the step four is executed;
step two: the microcontroller reads corresponding data and generates a check code and a frame format;
step three: the microcontroller sends a modulation signal of a subcarrier of the frame data to the modulation circuit and returns to the first step;
step four: the microcontroller judges whether data need to be written into the memory, if so, the next step is executed, otherwise, the step I is returned;
step five: the microcontroller writes the data to be written into the memory;
step six: the microcontroller sends a modulation signal of the written subcarrier to the modulation circuit and returns to the first step;
and the microcontroller works at the reference clock frequency when executing the second step and works at the working frequency lower than the reference clock frequency when executing other steps.
According to the scheme, the microcontroller works at different working frequencies when performing different operations on data, and particularly, the working frequency is lower when writing data into the memory and receiving demodulation signals, so that the electric energy consumed by the microcontroller is greatly reduced, the microcontroller consumes less electric energy in one working period, and the microcontroller can be ensured to work normally under the condition that the electric energy supply is not sufficient.
In order to achieve the above-mentioned further object, the present invention provides a data processing method for a microcontroller, the microcontroller being formed on a chip provided by another object of the present invention, the microcontroller including a memory, the method including the steps of:
the method comprises the following steps: the microcontroller receives the demodulation signal sent from the demodulation circuit and judges whether the data stored in the memory needs to be read or not, if so, the next step is executed, otherwise, the step four is executed;
step two: the microcontroller reads corresponding data and generates a check code and a frame format;
step three: the microcontroller sends a modulation signal of a subcarrier of the frame data to the modulation circuit and returns to the first step;
step four: the microcontroller judges whether data need to be written into the memory, if so, the next step is executed, otherwise, the step I is returned;
step five: the microcontroller writes the data to be written into the memory;
step six: the microcontroller sends a modulation signal of the written subcarrier to the modulation circuit and returns to the first step;
and the microcontroller sends a control command for turning off the auxiliary power supply before executing the step one and sends a control command for turning on the auxiliary power supply before executing the step two or the step five.
It can be seen from the above scheme that the microcontroller turns off the auxiliary power supply circuit when it consumes less power when receiving the demodulated signal, and turns on the auxiliary power supply circuit when it needs to consume more power when writing data into the memory or reading more data, so that the microcontroller can fully utilize the power supplied by the auxiliary power supply circuit to maintain operation.
Drawings
FIG. 1 is a schematic block diagram of the connection of circuit modules of a conventional chip;
FIG. 2 is an electrical schematic of a first embodiment of the chip of the present invention;
FIG. 3 is a flow chart of a first embodiment of a microcontroller data processing method of the present invention;
FIG. 4 is an electrical schematic of a second embodiment of the chip of the present invention;
FIG. 5 is a flow chart of a second embodiment of a microcontroller data processing method of the present invention;
FIG. 6 is an electrical schematic of a third embodiment of a chip of the present invention;
FIG. 7 is a flow chart of a third embodiment of a microcontroller data processing method according to the present invention.
The invention is further explained with reference to the drawings and the embodiments.
Detailed Description
Referring to fig. 2, fig. 2 is an electrical schematic of a first embodiment of the chip of the present invention. In this embodiment, the inductor L and the capacitor C1 are connected in parallel to form a signal switching circuit, which can receive a radio frequency signal emitted by the laser printer, and obtain energy from the radio frequency signal to form resonance, so as to generate a carrier signal with a certain oscillation frequency, and the carrier signal is modulated and then sent to the laser printer by the signal switching circuit, so as to complete one-time communication.
The diodes D1, D2, D3 and D4 in the present embodiment, the resistor R1 and the capacitor C2 form a parasitic power supply circuit. As can be seen from the figure, the diodes D1, D2, D3, D4 form a bridge circuit, and the rf signal transmitted from the handshake circuit can be rectified by the bridge circuit, isolated by the resistor R1 and filtered by the capacitor C2 to obtain a stable dc power VCC for supplying power to the microcontroller 11.
Meanwhile, diodes D2 and D4, resistors R2, R3 and R4, capacitors C3 and C4 and a triode Q1 form a demodulation circuit. The rf signal received by the signal switching circuit is amplitude-detected by diodes D2 and D4, a capacitor C3 and a resistor R2, and then coupled to the base of a transistor Q1 through the capacitor C4, so as to obtain a detected signal, the detected signal is shaped and amplified by a transistor Q1 to form a demodulated signal, the demodulated signal is transmitted to a port IO1 of the microcontroller 11, and the microcontroller 11 performs corresponding operations according to the demodulated signal. In the demodulation circuit, resistors R3 and R4 are bias resistors of a triode Q1, wherein two ends of a resistor R3 are respectively connected to a power supply VCC and a base of the triode Q1, and two ends of a resistor R4 are respectively connected to the power supply VCC and a collector of the triode Q1.
The modulation circuit of the embodiment is composed of diodes D6 and D7, resistors R7, R8 and R9, and a triode Q2. When the chip needs to return a signal to the laser printer, the microcontroller 11 sends a modulation signal to the resistor R8 through the port IO2, the modulation signal is a binary signal, and the level of the base electrode of the triode Q2 can be controlled through the resistor R8, so that the on-off of the triode Q2 is controlled. When the transistor Q2 is turned on, a part of the current flowing through the inductor L can flow to the ground through the diode D6, the diode D7, the transistor Q2 and the resistor R7, so that the current flowing through the inductor L is increased, and the amplitude of the signal generated by the resonance of the signal exchange circuit is reduced; when the transistor Q2 is turned off, the current flowing through the inductor L is small and the amplitude of the signal generated by resonance is large. In this way, the microcontroller 11 controls the amplitude of the resonant signal of the handshake circuit by switching the transistor Q2 on and off, thereby forming the emission signal to be sent to the laser printer. In the modulation circuit, two ends of the resistor R9 are respectively connected to the base of the transistor Q2 and the ground, so that the transistor Q2 is in an off state when no signal is output from the port IO2 of the microcontroller 11, and no influence is caused on an emission signal.
In this embodiment, the diode D5 and the resistors R5 and R6 form a clock circuit. The rf signal is divided by the diode D5 and the resistors R5 and R6 to form an oscillating clock signal, the clock signal enters the port CLK of the microcontroller 11 and can be used as the clock signal of the microcontroller 11, and the frequency of the clock signal is consistent with the oscillation frequency of the carrier signal in the rf signal and is the reference clock frequency f 0.
In the present embodiment, the port GND of the microcontroller 11 is a ground port.
When the chip receives the radio frequency signal sent by the laser printer, the signal exchange circuit transmits the radio frequency signal to the parasitic power circuit to form a power supply VCC for the microcontroller 11 to use, the clock circuit generates a clock signal, and the demodulation circuit demodulates the demodulation signal, so that the microcontroller 11 operates according to the demodulation signal. After the microcontroller 11 is operated, the data to be transmitted is transmitted to the modulation circuit in a binary form through the port IO2, and the transmission signal is transmitted to the laser printer through the signal exchange circuit.
The microcontroller 11 includes a memory, which stores data related to the toner cartridge, such as information about the toner cartridge signal, the adapted laser printer signal, the remaining amount of toner in the toner cartridge, and the like. Because the microcontroller is a programmable device, a carbon powder box manufacturer can program the microcontroller 11, and the program is easy to modify, so that the chip has better compatibility and is more suitable for small-batch production of the chip.
With the increase of printing speed, the communication speed between the laser printer and the chip is also continuously increased, and meanwhile, the operation speed of the microcontroller is also required to be continuously increased. However, the microcontroller operates at a high frequency for a long time, and consumes much electric energy, and once the supply of electric energy cannot meet the requirement, the microcontroller may stop operating, which eventually results in that the laser printer cannot receive correct data and a printing error occurs. Thus, the microcontroller may be operated at a lower frequency when performing certain operations to avoid such occurrences.
Referring to fig. 3, it is a flow chart of the first embodiment of the data processing method of the microcontroller according to the present invention. Before describing the flow chart of the present embodiment, four frequencies are described: a reference clock frequency f0, a first clock frequency f1, a second clock frequency f2, and a third clock frequency f 3. The reference clock frequency f0 is the oscillation frequency of the carrier signal in the radio frequency signal, which is the highest one of the four frequencies. The first clock frequency f1, the second clock frequency f2 and the third clock frequency f3 are obtained by dividing the reference clock frequency f0, that is, by setting an internal division factor by the microcontroller to lower the operating frequency, and the three frequencies are arranged in the order of high to low: a first clock frequency f1, a second clock frequency f2, and a third clock frequency f 3.
After the toner cartridge is installed on the laser printer, the laser printer sends a radio frequency signal to the chip, and the microcontroller starts to work after acquiring the power VCC and the clock signal. First, the microcontroller sets a frequency division factor so that the operating frequency is the second clock frequency f2 (step S101), receives the demodulated signal from the demodulation circuit (step S102), and determines whether the demodulated signal has been received (step S103), and if not, continues the reception, and if the reception has been completed, executes step S104. Since the microcontroller does not need to operate at a high operating frequency to complete the operation when receiving the demodulated signal, the second clock frequency f2 is selected to reduce the operating frequency of the microcontroller, which reduces the power consumption of the microcontroller.
After the microcontroller receives the data, it determines whether the data in the memory needs to be read according to the received information (step S104), if the data does not need to be read, step S110 is executed, and if the data needs to be read, a frequency division factor is set, and the operating frequency is set to the reference clock frequency f0 (step S105). After the microcontroller reads the relevant data, it generates the check code and frame format quickly (step S106). In this step, the microcontroller generates the check code through the table, so that the working time of the microcontroller can be saved, and the frame format can be generated quickly. Since the laser printer needs to obtain the return data in a very short time after sending the information of the read data to the microcontroller, otherwise, the return data from the microcontroller cannot be received and the printing work cannot be affected, the microcontroller needs to complete the operations of reading the data, generating the check code and the frame format in a very short time, and at this time, the microcontroller needs to operate at a higher operating frequency, so that the operating frequency of the microcontroller needs to be set to the highest reference clock frequency f0 in this step.
After the microcontroller generates the frame format, it again sets the frequency division factor to set the operating frequency to the first clock frequency f1 (step S107). Then, a modulation signal of the sub-carrier of the frame data, which is a signal expressed by binary data and required to be transmitted to the laser printer, is transmitted to the modulation circuit (step S108). The microcontroller then determines whether the modulated signal has been transmitted (step S109), continues the transmission if not, and returns to step S101 to wait for a new demodulated signal to be received if the transmission has been completed. Since the microcontroller does not need to operate at the highest operating frequency for the modulated signal, the operating frequency may be set to a first operating frequency f1 that is slightly lower.
If the microcontroller judges that the data of the memory does not need to be read after receiving the demodulation signal, the microcontroller further judges whether the data needs to be written into the memory or not (step S110), if the data does not need to be written, the step S101 is returned, if the data needs to be written into the memory, the frequency division factor is set, and the working frequency is set to be the lowest third clock frequency f3 (step S111). Since writing data to the memory is a power-consuming operation and lasts longer, the operating frequency of the microcontroller may be set to the lowest third clock frequency f 3. Next, the microcontroller writes the data to be written into the memory (step S112), and determines whether the data has been written (step S113), and if not, continues to write the data, and if all the data has been written into the memory, sets the frequency division factor again, sets the operating frequency to the first clock frequency f1 (step S114), and sends the modulation signal of the subcarrier with the write completed to the modulation circuit (step S115), and simultaneously returns to step S101 to wait for receiving the next demodulation signal.
It can be seen from this embodiment that the microcontroller operates at different operating frequencies when performing different processing on data, for example, operates at the second clock frequency f2 when receiving a demodulation signal, operates at the first clock frequency when sending a modulation signal, and operates at the reference clock frequency f0 and the third clock frequency f3 when reading data from the memory and writing data into the memory, respectively, so that not only can the microcontroller be ensured to normally complete various operations, but also less power is consumed, and the occurrence of a situation that the microcontroller stops operating due to insufficient power supply is effectively avoided.
In order to avoid that the microcontroller will not stop working due to insufficient power supply, other methods may be used besides setting the working frequency to a plurality of different frequencies, such as providing an auxiliary power circuit on the chip to supply power to the parasitic power circuit.
Referring to fig. 4, an electrical schematic of a second embodiment of the chip of the present invention is shown. Compared with the electrical schematic diagram of the first embodiment of the chip, the electrical schematic diagram of this embodiment is added with an auxiliary power circuit composed of a transistor Q3, a resistor R10 and a battery BAT, wherein the battery BAT is the auxiliary power of this embodiment, a collector of the transistor Q3 is connected to a power source VCC, an emitter is connected to a positive electrode of the battery BAT, and a base is connected to a port IO3 of the microcontroller 11 through the resistor R10.
In this embodiment, the inductor L and the capacitor C1 still form a signal switching circuit, the diodes D1, D2, D3, D4, the resistor R1 and the capacitor C2 form a parasitic power supply circuit, the diodes D2, D4, the resistors R2, R3, R4, the capacitors C3, C4 and the transistor Q1 form a demodulation circuit, the diodes D6, D7, the resistors R7, R8, R9 and the transistor Q2 form a modulation circuit, and the diode D5, the resistors R5 and R6 form a clock circuit, and the working principle of the signal switching circuit, the parasitic power supply circuit, the demodulation circuit, the modulation circuit and the clock circuit is the same as that of the first embodiment of the chip, and is not described herein again.
In this embodiment, if the microcontroller needs to write data into the memory, and consumes more power, the port IO3 changes from a high-impedance state to an output low level, the low level signal controls the base of the transistor Q3 through the resistor R10, so that the transistor Q3 is turned on, the battery BAT supplies power to the parasitic power circuit through the transistor Q3, the power VDD provided by the battery is added to the power VCC, and the power supply of the parasitic power circuit is increased to maintain the normal operation of the microcontroller 11. When the microcontroller 11 consumes less power, the port IO3 changes to a high impedance state, the transistor Q3 turns off, and the battery BAT stops supplying power to the parasitic power supply circuit.
It should be noted that the port IO3 of the microcontroller 11 of the present embodiment does not have a protection diode to the power supply VCC, so as to prevent the power supply VDD provided by the battery from passing through the PN junction of the transistor Q3, the resistor R10, and the protection diode to the power supply VCC, which may cause the leakage of the battery BAT. If a microcontroller with a protection diode is selected, a tri-state gate is added between the port IO3 and the resistor R10, and the port IO3 is used as a control terminal of the tri-state gate.
After the auxiliary power supply circuit is added in the chip, and the microcontroller 11 can control whether the battery BAT is needed to supply power to the parasitic power supply circuit, so that the power supply of the microcontroller 11 can be ensured, and the work can not be stopped due to the fact that the power supply is not up.
The working flow chart of the microcontroller of the second embodiment of the chip is shown in fig. 5, which is also the flow chart of the second embodiment of the data processing method of the microcontroller according to the invention. After the microcontroller starts to operate, first, a command for turning off the auxiliary power supply is issued (step S201), that is, the microcontroller changes the port IO3 (shown in fig. 4) from a low level state to a high impedance state, and starts to receive the demodulated signal (step S202), and at the same time, it is determined whether the demodulated signal is completely received (step S203), if the demodulated signal is not completely received, the reception is continued, and if the reception is completely received, the step S204 is executed. Because the microcontroller consumes less electric energy when receiving the demodulation signal, can close auxiliary power supply, only need to use parasitic power supply circuit power supply can.
After the parasitic power circuit receives the demodulated signal, it determines whether the data in the memory needs to be read (step S204), if the data in the memory does not need to be read, step S209 is executed, and if the data in the memory needs to be read, a command to turn on the auxiliary power supply is issued (step S205), that is, the port IO3 (shown in fig. 4) is changed from the high impedance state to the low level signal. Then the microcontroller reads the relevant data, generates a check code and a frame format (step S206), sends a modulation signal of a subcarrier of the frame data to the modulation circuit (step S207), determines whether the transmission of the modulation signal is completed (step S208), continues the transmission if the transmission is not completed, and returns to step S201 to wait for receiving a next demodulation signal if the transmission is completed.
If the microcontroller determines that the data of the memory does not need to be read after receiving the demodulation signal, it determines whether the data needs to be written into the memory (step S209), if the data does not need to be written, it returns to step S201, if the data needs to be written, it sends a command to turn on the auxiliary power supply (step S210), and writes the data that needs to be written into the memory (step S211), and determines whether the data is written completely (step S212), if the data is not written completely, it continues to write, if the data is written completely, it sends a subcarrier modulation signal that the writing is completed (step S213), and returns to step S201.
The microcontroller needs to consume more electric energy when reading data in the memory, generating a check code and a frame format, writing data into the memory and sending a modulation signal, so that an auxiliary power supply needs to be started to supply power to a parasitic power supply circuit so as to ensure the normal work of the microcontroller. Therefore, the microcontroller starts the auxiliary power supply to supply power when more electric energy needs to be consumed, and turns off the auxiliary power supply when less electric energy is consumed, so that the auxiliary power supply is fully utilized to ensure the self-operation, and the stability of the chip is improved.
Of course, it is better if the microcontroller is powered by the auxiliary power supply and also by a frequency division method as in the first embodiment of the data processing method of the microcontroller. In this case, it is sufficient that the operating frequency is set to the second clock frequency f2 when the demodulation signal is received, that is, when step S201 is executed, the operating frequency is set to the reference clock frequency f0 when the memory data is read, that is, when step S205 is executed, the operating frequency is set to the first clock frequency f1 when the modulation signal is transmitted, that is, before step S207 and step S213 are executed, and the operating frequency is set to the third clock frequency f3 when the data is written into the memory, that is, when step S210 is executed. Therefore, the microcontroller consumes less electric energy and has double guarantee of the auxiliary power supply, and the condition that the microcontroller stops working due to insufficient electric energy supply can be effectively avoided.
While the second embodiment of the chip uses a battery as an auxiliary power source, other devices may be used as an auxiliary power source in the practice of the present invention. Fig. 6 is an electrical schematic diagram of a third embodiment of the chip of the present invention. Compared with the second embodiment of the chip, the auxiliary power supply is changed into the capacitor Cb, accordingly, the auxiliary power supply circuit is composed of the triodes Q4 and Q5, the resistors R11, R12, R13 and the capacitor Cb, and other circuits including the signal exchange circuit, the power supply parasitic circuit, the demodulation circuit, the modulation circuit and the clock circuit are the same as the second embodiment of the chip, and the working principle is the same, and is not described herein again. Similarly, the microcontroller 11 is also not an option in which a protection diode is provided between the port IO3 and the power supply VCC.
In this embodiment, the positive electrode of the capacitor Cb is connected to the emitter of the transistor Q4, the base of the transistor Q4 is connected to the port IO3 of the microcontroller 11 through the resistor R11, and the collector is connected to the power source VCC. As in the second embodiment of the chip, the microcontroller 11 may control the on/off of the transistor Q4 by changing the state of the port IO3, so as to control the on/off of the capacitor Cb.
Since the capacitor Cb needs to be charged before it can be used after being mounted on the chip, the resistors R12 and R13 and the transistor Q5 of the present embodiment form a charging circuit. The collector of the triode Q5 is connected to the anode of the capacitor Cb, the base is connected to the port IO4 of the microcontroller 11 through the resistor R12, and the emitter is connected to the power supply VCC through the resistor R13. When the capacitor Cb needs to be charged, the port IO4 of the microcontroller 11 outputs a low level signal, the transistor Q5 is turned on, and the power VCC can charge the capacitor Cb; when the capacitor Cb is charged, the output low level of the port IO4 of the microcontroller 11 changes to the high impedance state, the transistor Q5 is turned off, and the current cannot flow from the power source VCC to the capacitor Cb. The capacitor Cb in this embodiment is a super capacitor, and the stored electric energy is equivalent to a battery, so that the use requirement of the toner cartridge in one service life cycle can be met after one-time charging.
This embodiment uses the capacitor Cb as an auxiliary power source and only needs to be charged once at the time of production, which functions as a battery. The embodiment also uses the auxiliary power supply to supply power to the parasitic power supply circuit, and can also meet the requirement of the microcontroller on power consumption.
The flowchart of the third embodiment of the chip is shown in fig. 7, which is also a flowchart of the third embodiment of the data processing method of the microcontroller according to the present invention. When the microcontroller starts to operate, the method first issues a command to turn off the auxiliary power supply (step S301), receives the demodulated signal (step S302), determines whether the demodulated signal is completely received (step S303), determines whether the data in the memory needs to be read after the demodulated signal is completely received (step S304), if the data does not need to be read, executes step S306, and if the data needs to be read, performs an operation of reading the data (step S305), which includes issuing a command to turn on the auxiliary power supply, reading related data, generating a check code and a frame format, and transmitting a modulated signal of a subcarrier of frame data to the modulation circuit, and the like, and returns to step S301. If the microcontroller does not need to read the data of the memory, whether the data needs to be written into the memory is judged (step S306), if the data needs to be written, the data writing operation is carried out (step S307), and the steps comprise sending a command for turning on the auxiliary power supply, writing the data needing to be written into the memory, and sending a modulation signal of the written subcarrier to the modulation circuit after the data is written. These operations are the same as those of the second embodiment of the data processing method of the microcontroller, and are not described again here.
When the microcontroller determines that data is not required to be written into the memory, it further determines whether a command to charge the auxiliary power supply is received (step S308), if the command is not received, step S312 is executed, and if the command to charge the auxiliary power supply is received, a control command to start charging the auxiliary power supply is issued (step S309), that is, the microcontroller changes the port IO4 (shown in fig. 6) from a high impedance state to an output low level signal, and waits for a charging time t (step S310). The charging time t is preset, and the manufacturer sets the charging time in advance according to the capacity of the capacitor, the charging current and the like, and writes the time t into the program when the program is written. Then, the microcontroller sends a modulation signal of the subcarrier for which charging is started to the modulation circuit (step S311), and returns to step S301.
If the microcontroller determines that the auxiliary power supply does not need to be charged, it determines whether a command to stop charging the auxiliary power supply is received (step S312), if the command is not received, the process returns to step S301, if the command is needed to stop charging the auxiliary power supply, a control command to stop charging the auxiliary power supply is issued (step S313), that is, the microcontroller changes the port IO4 (shown in fig. 6) from the low-level output signal to the high-impedance state, and then transmits a modulation signal of the subcarrier to stop charging (step S314), and the process returns to step S301.
Compared with the second embodiment of the data processing method of the microcontroller, the embodiment adds the processing of charging the auxiliary power supply and stopping charging the auxiliary power supply, and can more effectively manage the auxiliary power supply so as to meet the requirement of the microcontroller on power consumption.
Of course, the microcontroller of this embodiment can also manage the auxiliary power supply and operate at different operating frequencies for different operations, so that the microcontroller can reduce the consumption of electric energy while ensuring the electric energy, and can more effectively avoid the situation that the operation is stopped due to insufficient power supply.
The above-described embodiments are only a few of the embodiments according to the inventive concept, and there are many more ways in which the invention can be practiced. For example, the demodulation circuit, the modulation circuit, the clock circuit, etc. of the present invention are all conventional circuit modules, and besides the components and their connection methods of the above embodiments, other conventional components and connection methods can also achieve the functions of demodulation, modulation, etc., and these changes are obvious. For another example, the first embodiment of the data processing method of the microcontroller according to the present invention sets four different operating frequencies, and more operating frequencies may be set in the actual process of the present invention, or only two or three operating frequencies may be set, and the microcontroller changes the operating frequencies according to the actual operating conditions, and the purpose of reducing the electric energy consumption of the microcontroller may also be achieved, and these changes should be obvious.
Finally, it should be emphasized that the present invention is not limited to the above embodiments, for example, the change of selected components in the chip embodiment, the change of connection relationship of each component, the change of auxiliary power supply, etc., and for example, the change of the number of operating frequencies set in the microcontroller data processing embodiment, the change of each frequency value, etc., and such obvious equivalent changes should also be included in the protection scope of the claims of the present invention.
Claims (8)
1. A chip comprising
A signal exchange circuit for exchanging signals with the outside;
a parasitic power circuit for obtaining electric energy from the signal exchange circuit;
a demodulation circuit for demodulating a demodulation signal from the signal supplied from the handshake circuit;
a modulation circuit for modulating the signal transmitted from the signal switching circuit;
the method is characterized in that:
the microcontroller acquires a demodulation signal from the demodulation circuit, processes the demodulation signal and sends the modulation signal to the modulation circuit;
and a clock circuit for acquiring a clock signal from the handshake circuit and providing the clock signal to the microcontroller.
2. A data processing method of a microcontroller, said microcontroller being formed on a chip as claimed in claim 1, the microcontroller comprising a memory, the method comprising the steps of:
the microcontroller receives a demodulation signal sent from a demodulation circuit and judges whether data stored in a memory need to be read or not, if so, the next step is executed, otherwise, the step four is executed;
reading corresponding data and generating a check code and a frame format by the microcontroller;
step three, the microcontroller sends a modulation signal of a subcarrier of the frame data to the modulation circuit and returns to the step one;
the microcontroller judges whether to need to write into the data to the memorizer, if yes, carry out the next step, otherwise, return to step one;
writing the data to be written into a memory by the microcontroller;
step six, the microcontroller sends the modulation signal of the written subcarrier to the modulation circuit and returns to the step one;
and the microcontroller works at the reference clock frequency when executing the second step and works at the working frequency lower than the reference clock frequency when executing other steps.
3. The microcontroller data processing method of claim 2, wherein:
when the microcontroller works in the step three, the working frequency is the first clock frequency;
the working frequency of the microcontroller is the second clock frequency when the microcontroller works in the first step;
when the microcontroller works in the fifth step, the working frequency is the third clock frequency;
wherein,
the first clock frequency is higher than the second clock frequency, and the second clock frequency is higher than the third clock frequency.
4. The microcontroller data processing method of claim 3 wherein:
the first clock frequency, the second clock frequency and the third clock frequency are obtained by dividing the frequency of the reference clock frequency.
5. A chip comprising
A signal exchange circuit for exchanging signals with the outside;
a parasitic power circuit for obtaining electric energy from the signal exchange circuit;
a demodulation circuit for demodulating a demodulation signal from the signal supplied from the handshake circuit;
a modulation circuit for modulating the signal transmitted from the signal switching circuit;
the method is characterized in that:
the microcontroller acquires a demodulation signal from the demodulation circuit, processes the demodulation signal and sends the modulation signal to the modulation circuit;
the clock circuit acquires a clock signal from the signal exchange circuit and provides the clock signal to the microcontroller;
and an auxiliary power supply circuit for supplying power to the parasitic power supply circuit, the auxiliary power supply circuit including an auxiliary power supply.
6. The chip of claim 5, wherein:
the auxiliary power supply is a battery which supplies power to the parasitic power supply circuit through a triode.
7. The chip of claim 5, wherein:
the auxiliary power supply is a capacitor which supplies power to the parasitic power supply circuit through a triode.
8. A data processing method of a microcontroller, said microcontroller being formed on a chip as claimed in claim 5, the microcontroller comprising a memory, the method comprising the steps of:
the microcontroller receives a demodulation signal sent from a demodulation circuit and judges whether data stored in a memory need to be read or not, if so, the next step is executed, otherwise, the step four is executed;
reading corresponding data and generating a check code and a frame format by the microcontroller;
step three, the microcontroller sends a modulation signal of a subcarrier of the frame data to the modulation circuit and returns to the step one;
the microcontroller judges whether to need to write into the data to the memorizer, if yes, carry out the next step, otherwise, return to step one;
writing the data to be written into a memory by the microcontroller;
step six, the microcontroller sends the modulation signal of the written subcarrier to the modulation circuit and returns to the step one;
and the microcontroller sends a control command for turning off the auxiliary power supply before executing the step one and sends a control command for turning on the auxiliary power supply before executing the step two or the step five.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100300523A CN101377824B (en) | 2007-08-29 | 2007-08-29 | Chip and microcontroller data processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100300523A CN101377824B (en) | 2007-08-29 | 2007-08-29 | Chip and microcontroller data processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101377824A true CN101377824A (en) | 2009-03-04 |
CN101377824B CN101377824B (en) | 2011-12-28 |
Family
ID=40421358
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007100300523A Expired - Fee Related CN101377824B (en) | 2007-08-29 | 2007-08-29 | Chip and microcontroller data processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101377824B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009127156A1 (en) * | 2008-04-17 | 2009-10-22 | 珠海天威技术开发有限公司 | Chip and consumable container |
CN102173206A (en) * | 2011-01-06 | 2011-09-07 | 珠海天威技术开发有限公司 | Consumable chip and consumable container |
WO2014201949A1 (en) * | 2013-06-20 | 2014-12-24 | 珠海天威技术开发有限公司 | Consumable chip and operating method thereof, and consumable container |
CN105182918A (en) * | 2015-06-10 | 2015-12-23 | 国网四川省电力公司宜宾供电公司 | Household electrical appliance intelligent control system capable of carrying out data transmission by using electric power carrier communication |
CN113760376A (en) * | 2021-09-06 | 2021-12-07 | 合肥松豪电子科技有限公司 | Method for simultaneous operation and operation of TP chip CPU on Eflash |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5737687A (en) * | 1995-03-01 | 1998-04-07 | Qualcomm Incorporated | Self-attenuating RF transceiver system using antenna and modem interfaces and cable link |
CN2888501Y (en) * | 2006-04-28 | 2007-04-11 | 珠海天威技术开发有限公司 | Processing box chip |
-
2007
- 2007-08-29 CN CN2007100300523A patent/CN101377824B/en not_active Expired - Fee Related
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009127156A1 (en) * | 2008-04-17 | 2009-10-22 | 珠海天威技术开发有限公司 | Chip and consumable container |
CN102173206A (en) * | 2011-01-06 | 2011-09-07 | 珠海天威技术开发有限公司 | Consumable chip and consumable container |
WO2012092872A1 (en) * | 2011-01-06 | 2012-07-12 | 珠海天威技术开发有限公司 | Consumable chip and consumable container |
CN102173206B (en) * | 2011-01-06 | 2013-04-10 | 珠海天威技术开发有限公司 | Consumable chip and consumable container |
US8938176B2 (en) | 2011-01-06 | 2015-01-20 | Print-Rite Technology Development Co., Ltd. Of Zhuhai | Printing consumables chips and containers |
WO2014201949A1 (en) * | 2013-06-20 | 2014-12-24 | 珠海天威技术开发有限公司 | Consumable chip and operating method thereof, and consumable container |
CN105182918A (en) * | 2015-06-10 | 2015-12-23 | 国网四川省电力公司宜宾供电公司 | Household electrical appliance intelligent control system capable of carrying out data transmission by using electric power carrier communication |
CN113760376A (en) * | 2021-09-06 | 2021-12-07 | 合肥松豪电子科技有限公司 | Method for simultaneous operation and operation of TP chip CPU on Eflash |
CN113760376B (en) * | 2021-09-06 | 2024-05-28 | 合肥松豪电子科技有限公司 | Method for simultaneously running and operating TP chip CPU (Central processing Unit) on Eflash |
Also Published As
Publication number | Publication date |
---|---|
CN101377824B (en) | 2011-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101377824B (en) | Chip and microcontroller data processing method | |
US7665664B2 (en) | Inductive coupling reader comprising means for extracting a power supply voltage | |
CN100350427C (en) | Integrated circuit label model, electronic apparatus, communication system and communication control method | |
CN100419634C (en) | Peripheral device and its control method its main body device and its control method and its program | |
JP2549192B2 (en) | Non-contact IC card and method of using the same | |
US8085130B2 (en) | Radio frequency identification tag | |
CN202331539U (en) | High-frequency passive RFID (Radio Frequency Identification) analog front end circuit | |
CN103714370B (en) | Lithium-battery-powered half-duplex RFID chip and system thereof | |
CN114567672A (en) | Communication conversion device, method and storage medium | |
CN102142100A (en) | High-frequency passive RFID (Radio Frequency Identification) analog front end circuit | |
CN108267943A (en) | Consumable chip and consumable container | |
CN101778174A (en) | Method, system and external card for achieving function extension of mobile terminal | |
CN102886987B (en) | General-purpose chip and data communications method thereof | |
EP1620956B1 (en) | Circuit for contactless device having active and passive send modes | |
CN103077410A (en) | Fixed type wireless radio frequency reader-writer | |
CN102257713B (en) | Power interface circuit of contact ic card reader | |
CN201037900Y (en) | Imaging box chip | |
CN105320912A (en) | An active card power source management device and method | |
CN201145830Y (en) | Processing box chip | |
CN213695279U (en) | Bluetooth ear tag capable of detecting internal temperature | |
CN212540581U (en) | Low-power-consumption card reading detection circuit | |
CN104217238A (en) | Electronic tag and power supply system thereof | |
CN201029038Y (en) | Carbon powder box radio frequency recognizing chip | |
CN102509558B (en) | Storage chip and charging method thereof | |
CN215222186U (en) | Self-starting communication module and communication device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20111228 Termination date: 20190829 |