Thermal printing control circuit and chip
By designing a data processing module and a handshake signal mechanism in the thermal printing control circuit, the parallel work of data processing and transmission is realized, and the problems of poor flexibility in printing mode selection and high timing requirements in the prior art are solved, thereby improving printing efficiency and flexibility.
Patent Information
- Application Number
- CN202421726498.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2034-07-19
AI Technical Summary
当前热敏打印控制电路的打印模式选择灵活性不高,且各模块之间的时序要求较高,导致打印效率不高。
A thermal printing control circuit is designed, including a data processing module, a storage module, a data input module and a data output module. Through the handshake signal, data processing and data transmission can be realized in parallel, and work efficiency is improved.
By processing and transmitting image data in parallel, the working efficiency of the printing process is improved, the power consumption of each module of the printer is reduced, and the flexibility of printing mode selection is improved.
Smart Images

Figure CN222762407U_ABST
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to a thermal printing control circuit and chip. Background Art
[0002] Thermal printers print through the printing circuit on the thermal print head. The thermistor in the printing circuit heats up and leaves color on the printing paper. Thermal printers need to control the working mode and data transmission timing of the thermal print head to complete the printing of the target image. However, the current thermal printing control circuit has low flexibility in selecting the printing mode and has high requirements for the timing between modules.
[0003] Therefore, a thermal printing control circuit is needed to improve the efficiency and effectiveness of printing. Utility Model Content
[0004] The present application provides a thermal printing control circuit and chip to improve the efficiency and effectiveness of printing.
[0005] In a first aspect, the present application provides a thermal printing control circuit, the circuit comprising:
[0006] Data processing module, storage module, data input module, data output module;
[0007] Wherein, the data processing module is connected to the storage module, and the storage module is connected to the data output module and the data input module;
[0008] The data processing module includes a first status register, and the data output module includes a second status register;
[0009] And, the data processing module is used to process the first image data to obtain second image data in a preset format;
[0010] The storage module is used to store the first image data and the second image data;
[0011] The data output module is used to read and output the second image data from the storage module;
[0012] The first status register and the second status register are used to generate and send a handshake signal, and the handshake signal is used to control the data processing module to process the first image data to obtain the second image data in a preset form, and control the data output module to read and output the second image data from the storage module. As an optional implementation, the handshake signal includes a first signal, a second signal, a third signal and a fourth signal, and the working clock signal includes a first clock signal and a second clock signal;
[0013] The working clock of the data processing module is a first clock signal, and the working clock of the data output module is a second clock signal;
[0014] The specific manner in which the first status register and the second status register generate and send a handshake signal according to the working clock signal of the corresponding module includes:
[0015] After the data processing module has processed the first image data of the current batch, when the first clock signal runs to a rising edge and / or a falling edge, the first state register sends the first signal to the data output module, and the second state register sends the second signal to the data processing module when the second clock signal runs to a rising edge and / or a falling edge according to the first signal sent by the first state register;
[0016] The data output module reads and outputs the second image data from the storage module according to the first signal, and the data processing module starts processing the next batch of first image data according to the second signal;
[0017] After the data output module outputs all of the second image data of the current batch to the external printing module, when the second clock signal runs to the rising edge and / or the falling edge, the second status register sends the third signal to the data processing module, and the first status register sends the fourth signal to the data output module based on the third signal, until the data processing module completes processing of the next batch of first image data, and the first status register sends the first signal to the data output module again. Through the handshake signal, data processing and data transmission can be implemented in parallel, thereby improving work efficiency.
[0018] As an optional implementation, the handshake signals may all be sent at the rising edge of the working clock.
[0019] As an optional implementation, the storage module includes a first storage module and a second storage module;
[0020] Wherein, the first storage module is connected to the data processing module and the data input module, and the second storage module is connected to the data processing module and the data output module;
[0021] Furthermore, the first storage module is used to store the first image data, and the second storage module is used to store the second image data.
[0022] As an optional implementation manner, the first storage module and the second storage module respectively include multiple sub-storage blocks.
[0023] As an optional implementation, the data processing module includes a storage control submodule;
[0024] Wherein, the storage control submodule is connected to the first storage module and the second storage module;
[0025] In addition, the storage control submodule is used to control each of the multiple sub-storage blocks to interact with data with at most one other module at the same time, and control the clock frequency of the sub-storage block according to the module that interacts data with the sub-storage block. When the operating frequency of the module accessing the sub-storage block is low, the sub-storage block can be controlled to reduce the clock frequency accordingly to reduce power consumption.
[0026] As an optional implementation, the data output module is connected to an external printing module;
[0027] The data output module is used for reading the second image data from the storage module and outputting the data to the printing module, and the printing module is used for printing the second image data.
[0028] As an optional implementation, the printing module includes a latch register and a third state register, and the printing module is used to synchronously execute printing of the second image data and data transmission with the data output module;
[0029] And, the specific manner in which the printing module synchronously executes printing of the second image data and data transmission with the data output module includes:
[0030] The printing module stores the second image data transmitted by the data output module in the latch register, and during the printing process, reads the second image data from the latch register and prints;
[0031] When the latch register is empty, the third status register sends a fifth signal to the data output module, and the data output module transmits data to the printing module according to the fifth signal. Through the handshake between the data output module and the printing module, parallel work of data transmission and data printing is achieved to further improve work efficiency.
[0032] As an optional implementation, the latch register includes multiple sub-registers, and the data output module and the printing module cannot access one sub-register at the same time.
[0033] The latch register is idle, which specifically includes: one or more sub-registers do not latch the second image data.
[0034] As an optional implementation, the data processing module includes a mode selection submodule;
[0035] The mode selection submodule is connected to the storage module, and is used to determine a data processing mode, and process the first image data according to the data processing mode to obtain second image data corresponding to the data processing mode.
[0036] As an optional implementation, the mode selection submodule includes at least one mode circuit, the mode circuit includes a logic circuit, the mode circuit matches the data processing mode, and is used to process the first image data according to the data processing mode to obtain second image data corresponding to the data processing mode;
[0037] Furthermore, the printing module is used to determine the corresponding printing circuit according to the data processing mode, and print the second image data by controlling the heating conditions of each of the thermistors.
[0038] As an optional implementation, the circuit further includes a configuration module;
[0039] Among them, the configuration module is connected to the mode selection submodule, and the configuration module is used to generate a configuration signal according to an input instruction, and the configuration signal is used to indicate the data processing mode and drive the mode selection submodule to determine the corresponding mode circuit according to the data processing mode.
[0040] As an optional implementation, the data processing mode includes:
[0041] One or more combinations of basic mode, group processing mode and pixel processing mode;
[0042] Among them, the basic mode includes directly using the first image data as the second image data, the group processing mode includes determining multiple groups of the second image data based on the first image data, and the pixel processing mode includes determining the color of each pixel in the second image data or the heating degree of the corresponding thermistor based on the first image data.
[0043] As an optional implementation, the group processing mode includes a first group mode or a second group mode, and the pixel point processing mode includes a grayscale mode or a thermal history mode;
[0044] Wherein, the first grouping mode includes segmenting the thermistors corresponding to the pixels according to the first image data, and determining a plurality of groups of second image data in the first direction according to the segmentation;
[0045] The second grouping mode includes grouping according to pixel distribution of each row of the first image data, and determining a plurality of groups of second image data in a second direction according to the grouping;
[0046] The grayscale mode includes converting the first image data into second image data in grayscale form, and controlling each of the thermistors to determine a heating condition according to a distribution of pixels in the second image data in grayscale form, wherein the grayscale is used to indicate the brightness of the color of the corresponding pixel;
[0047] The thermal history mode includes determining the current heating condition of each thermistor based on the historical heating condition of each thermistor and / or the pixel distribution of the second image data. The processing circuit of the first image data can be selected through the configuration module to achieve flexible selection of the printing mode.
[0048] In a second aspect, the present application provides a thermal printing control chip, wherein the chip comprises the thermal printing circuit as described in the first aspect.
[0049] The thermal printing control circuit and chip provided in the present application complete the processing of the input first image data through the logic circuit in the data processing module and obtain the second image data to be printed. The data processing module is also used to process the next batch of first image data when the data output module transmits the second image data, thereby improving work efficiency. Furthermore, the printing module can receive the next batch of second image data while printing the current second image data, thereby further improving work efficiency. At the same time, the storage module is divided to avoid multiple modules accessing a sub-storage block at the same time, thereby facilitating the frequency adjustment of the sub-storage block and reducing unnecessary power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0051] Figure 1 It is a structural schematic diagram of a thermal printing control circuit disclosed in an embodiment of the present application;
[0052] Figure 2 It is a structural schematic diagram of another thermal printing control circuit disclosed in an embodiment of the present application;
[0053] Figure 3 It is a structural schematic diagram of another thermal printing control circuit disclosed in an embodiment of the present application;
[0054] Figure 4 It is a schematic diagram of the effect of a thermal printing control circuit disclosed in an embodiment of the present application;
[0055] Figure 5It is a schematic diagram of another effect of a thermal printing control circuit disclosed in an embodiment of the present application;
[0056] Figure 6 It is a schematic diagram of the effect of another thermal printing control circuit disclosed in the embodiment of the present application;
[0057] Figure 7 It is a structural schematic diagram of another thermal printing control circuit disclosed in an embodiment of the present application;
[0058] Figure 8 It is a schematic diagram of the effect of another thermal printing control circuit disclosed in the embodiment of the present application;
[0059] Fig. 9 It is a schematic diagram of the effect of another thermal printing control circuit disclosed in the embodiment of the present application;
[0060] Fig.10 It is a flow chart of a thermal printing method disclosed in an embodiment of the present application;
[0061] Fig.11 It is a schematic diagram of the structure of a microprocessor chip disclosed in an embodiment of the present application.
[0062] Reference numerals:
[0063] 101-data processing module; 102-storage module; 103-data input module; 104-data output module; 105-printing module; 106-mode selection submodule; 107-transmission control submodule; 108-configuration module; 109-first storage module; 110-second storage module; 111-storage control submodule; 121-first status register; 122-second status register; 123-third status register; 124-latch register.
[0064] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0065] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0066] Thermal printers print through the printing circuit on the thermal print head. The thermistor in the printing circuit heats up and leaves color on the printing paper. Thermal printers need to control the working mode and data transmission timing of the thermal print head to complete the printing of the target image. However, the current thermal printing control circuit has low flexibility in printing mode selection and has high requirements for the timing between modules, making it impossible to achieve parallel printing, resulting in low printing efficiency.
[0067] Therefore, a thermal printing control circuit is needed to improve the flexibility of printing mode selection and improve printing efficiency. For example, as a feasible implementation, a thermal printing control circuit can be implemented through an MCU+FPGA or MCU+CPLD solution to control a thermal print head, but FPGA or CPLD can only implement one printing mode at the same time. Therefore, the current thermal printing control circuit has the problems of poor flexibility in mode selection, high printing timing requirements, and poor printing efficiency and effectiveness.
[0068] The technical concept of the present application is to complete the processing of the input first image data through the logic circuit in the data processing module 101, and obtain the second image data to be printed, realize the storage and call of image data through the storage module 102, complete the data interaction between the image data and the external structure through the data input module 103 and the data output module 104, the data processing module 101 is connected to the data output module 104, and the data output module 104 is connected to the printing module 105. Through the handshake between the data processing module 101, the data output module 104 and the printing module 105, the parallel work of data processing, transmission and printing can be realized, thereby improving the work efficiency. Therefore, through the division of modules, the flexibility of the timing allocation of each module in the printing process can be improved, and the parallel processing of multiple groups of printing data in different processing flows can be realized, thereby improving the work efficiency of the printing process and reducing the power consumption of each module of the printer.
[0069] See also Figure 1 , Figure 1 is a schematic diagram of a thermal printing control circuit disclosed in an embodiment of the present application. Figure 1 As shown, the present application provides a thermal printing control circuit, the circuit comprising:
[0070] Data processing module 101, storage module 102, data input module 103, data output module 104;
[0071] The data processing module 101 is connected to the storage module 102, and the storage module 102 is connected to the data output module 104 and the data input module 103;
[0072] And, the data processing module 101 is used to process the first image data to obtain second image data in a preset format;
[0073] The storage module 102 is used to store the first image data and the second image data;
[0074] The data input module 103 is used to read the first image data and transmit the first image data to the storage module 102 , and the data output module 104 is used to read the second image data from the storage module 102 .
[0075] in, Figure 1 Some feasible implementations of each module are also shown, for example, the storage module 102 includes a static memory, the data output module 104 includes a serial peripheral device interface bus module, and the data input module 103 includes an advanced high-performance bus module. The data processing module 101 can be implemented in the form of a logic circuit or a separate microcontroller to implement the corresponding control instructions. It should be noted that the main improvement of the present application lies in the connection relationship and data interaction mode of each functional module, rather than the structure or implementation mode of the functional module itself, so the implementation mode of the logic circuit or microcontroller can refer to the relevant implementation details in the prior art.
[0076] The logic circuit in the data processing module 101 completes the processing of the input first image data and obtains the second image data to be printed. The storage module 102 realizes the storage and call of the image data. The data input module 103 and the data output module 104 complete the data interaction between the image data and the external structure.
[0077] See also Figure 2 , Figure 2 is a schematic diagram of another thermal printing control circuit disclosed in an embodiment of the present application. Figure 2 As shown, as an optional implementation, the data processing module 101 and the data output module 104 are connected to the external printing module 105;
[0078] The data output module 104 is used for reading the second image data from the storage module 102 and outputting the second image data to the printing module 105 , and the printing module 105 is used for printing the second image data.
[0079] The data processing module 101 and the data output module 104 can be connected and exchange data with the external printing module 105, thereby realizing the printing function. Figure 3 , Figure 3 is a schematic diagram of another thermal printing control circuit disclosed in an embodiment of the present application. Figure 3 As shown, as an optional implementation, the data processing module 101 includes a first status register 121, the data output module 104 includes a second status register 122, and the printing module 105 includes a third status register 123 and a latch register 124;
[0080] As an optional implementation, the handshake signal includes a first signal, a second signal, a third signal and a fourth signal;
[0081] The first state register 121 is used to output the first signal and the fourth signal;
[0082] The second state register 122 is used to output the second signal and the third signal;
[0083] The first status register 121 and the second status register 122 are used to control the handshake between the data processing module 101 and the data output module 104 to achieve parallel operation of data processing and data transmission.
[0084] The printing module 105 is connected to the data output module 104, receives data from the data output module 104, includes a latch register 124, and a third state register 123, the printing module 105 stores the second image data received from the data output module 104 in the latch register 124, and reads the processed second image data from the latch register 124 and prints it during the printing process of the printing module 105;
[0085] See also Figure 4 , Figure 4 is a schematic diagram of the effect of a thermal printing control circuit disclosed in an embodiment of the present application, such as Figure 4 As shown, this embodiment implements handshake interaction between the data processing module 101 and the data output module 104 through the first status register 121 and the second status register 122 to perform corresponding image data processing and transmission processes, thereby realizing parallel processing of multiple groups of printing data in different processing processes and improving the work efficiency of the printing process.
[0086] The specific manner in which the first status register 121 and the second status register 122 generate and send a handshake signal according to the working clock signal of the corresponding module includes:
[0087] The working clock of the data processing module is the first clock;
[0088] The working clock of the data output module is the second clock;
[0089] After the data processing module 101 has processed the first image data of the current batch, the first state register 121 sends a first signal to the data output module 104 when the first clock runs to a rising edge and / or a falling edge, and the second state register 122 sends a second signal to the data processing module 101 when the second clock runs to a rising edge and / or a falling edge according to the first signal sent by the first state register 121;
[0090] The data output module 104 sends the second image data processed in the storage module 102 to the external printing module 105 according to the first signal, and the data processing module 101 starts processing the first image data of the next batch according to the second signal;
[0091] After the data output module 104 outputs all the second image data of the current batch to the external printing module 105, when the second clock signal runs to the rising edge and / or the falling edge, the second state register 122 sends a third signal to the data processing module 101, and the first state register 121 sends a fourth signal to the data output module 104 when the first clock runs to the rising edge and / or the falling edge according to the third signal, until the data processing module processes the first image data of the next batch, and the first state register sends the first signal to the data output module again when the first clock runs to the rising edge and / or the falling edge;
[0092] The signal states of the first state register 121 and the second state register 122 may change at the rising edge and / or falling edge of the working clock signal of the corresponding module, and the changes in the signal states may also all change at the rising edge of the working clock signal of the corresponding module.
[0093] The first signal to the fourth signal are sent through the first status register 121 and the second status register 122 to realize the handshake interaction between the data processing module 101 and the data output module 104 to perform the corresponding image data processing and transmission process. As a result, the flexibility of the timing allocation of each module in the printing process can be improved, and the parallel processing of multiple groups of printing data in different processing processes can be realized, thereby improving the work efficiency of the printing process.
[0094] In this scenario, the timing requirements of the thermal printing control circuit can be reduced, and all timing trigger conditions can be triggered by the rising edge of the clock or the falling edge of the clock, with simple logic judgment and high fault tolerance.
[0095] See also Figure 5 , Figure 5 is a schematic diagram of another effect of a thermal printing control circuit disclosed in an embodiment of the present application, such as Figure 5 As shown, the parallel working process between the data processing module 101 data processing and the data output module 104 data output.
[0096] The data processing module 101 reads and processes a line of first image data, and stores the processed second image data in the storage module 102;
[0097] The data output module 104 reads the processed second image data in the storage module 102 and transmits it to the external printing module 105. Meanwhile, the data processing module 101 reads and processes the first image data of the next line and stores the processed second image data of the next line in the storage module 102.
[0098] The external printing module 105 receives the processed second image data of the current row transmitted by the data output module 104 and prints it, while the data transmission module continues to transmit the processed second image data of the next row;
[0099] Repeat the above process until the last line of image data is printed.
[0100] This allows for parallel control of two processes, namely, the next line of data is being transmitted while the current line is being printed, and the next line of data is being processed while the current line is being printed and the next line of data is being transmitted.
[0101] See also Figure 6 , Figure 6 It is a schematic diagram of the effect of another thermal printing control circuit disclosed in the embodiment of the present application, which is used to illustrate the parallel working process between data printing of the external printing module 105 and data output of the data output module 104.
[0102] When the latch register 124 is idle, the third status register 123 sends a fifth signal to the data output module 104 , and the data output module 104 can transmit data to the printing module 105 according to the fifth signal.
[0103] The latch register includes a plurality of sub-registers, and the data output module and the printing module cannot access a sub-register at the same time.
[0104] The latch register is idle, which specifically includes: one or more sub-registers do not latch the second image data.
[0105] In the printing stage after the printing module 105 completes latching of data, the data output module 104 can synchronously transmit the processed image data, thereby achieving parallel processing of data transmission and data printing, and improving work efficiency.
[0106] See also Figure 7 , Figure 7 is a schematic diagram of the structure of another thermal printing control circuit disclosed in the embodiment of the present application, such as Figure 7 As shown, as an optional implementation, the storage module 102 includes a first storage module 109 and a second storage module 110, and the data processing module 101 includes a storage control submodule 111;
[0107] The first storage module 109 is connected to the data processing module 101 and the data input module 103 and is used to store the first image data;
[0108] The second storage module 110 is connected to the data processing module 101 and the data output module 104, and is used to store the second image data;
[0109] The first storage module 109 and the second storage module 110 respectively include a plurality of sub-storage blocks, for example, the first storage module 109 includes sub-storage blocks 0 and 1, and the second storage module includes sub-storage blocks 2 and 3. It should be noted that the figure is only an example, and in practical applications, the number of sub-storage blocks should not be limited, and the division form of the sub-storage blocks should not be specifically limited;
[0110] The storage control submodule 111 is connected to the storage module 102. The storage control submodule 111 controls the sub-storage block to interact with only one module at a time, and controls the clock frequency of the sub-storage block according to the module that interacts with the sub-storage block. For example, the data input module 103 transmits the first image data to the sub-storage block 0 of the first storage module 109, and the data processing module cannot access the data in the sub-storage block 0. Moreover, since the operating frequencies of the data input module 103 and the data output module 104 are lower than those of the data processing module 101, when the data processing module 101 accesses the sub-storage block, the clock frequency of the sub-storage block is increased to increase the data interaction rate. When the data input module 103 or the data output module 104 accesses the sub-storage block, the clock frequency of the sub-storage block is reduced to reduce the power consumption of the sub-storage block.
[0111] Because the second storage module 110 includes multiple sub-storage blocks, the data processing module will read and process a line of first image data, and then store the processed second image data in one of the sub-storage blocks of the second storage module 110. At the same time, the data output module 104 can read the second image data in other sub-storage blocks, further improving work efficiency.
[0112] See also Figure 8 , Figure 8 is a schematic diagram of the structure of another thermal printing control circuit disclosed in the embodiment of the present application, such as Figure 8As shown, as an optional implementation, the data processing module 101 includes a mode selection submodule 106, which is connected to the configuration module 108 and the storage module 102 respectively. The mode selection submodule 106 determines the data processing mode according to the configuration signal of the configuration module 108, and selects to execute the internal logic circuit according to the data processing mode, and then reads and processes the first image data from the storage module 102, obtains the second image data corresponding to the data processing mode and stores it in the storage module 102. Among them, the mode selection submodule 106 is connected to the storage module 102, and the mode selection submodule 106 is used to determine the data processing mode, and according to the data processing mode, processes the first image data to obtain the second image data corresponding to the data processing mode.
[0113] The interaction between the user and the control circuit is realized through the configuration module 108. The user inputs the corresponding instructions through the configuration module 108, and the configuration module 108 generates a configuration signal according to the input instructions. The configuration signal is used to indicate the data processing mode. Through the mode selection submodule 106, it can be used to determine the current data processing mode, and process the first image data into the second image data of the corresponding form and structure according to the determined data processing mode. Thereby, the flexibility of the printing mode selection is improved, and the efficiency of image data processing and transmission is further improved, thereby improving the effectiveness and efficiency of printing.
[0114] As an optional implementation, the data processing mode includes:
[0115] One or more combinations of basic mode, group processing mode and pixel processing mode;
[0116] Among them, the basic mode includes directly using the first image data as the second image data, the group processing mode includes determining multiple groups of second image data based on the first image data, and the pixel processing mode includes determining the color of each pixel in the second image data or the heating degree of the corresponding thermistor based on the first image data.
[0117] Through the division of basic mode, group processing mode and pixel processing mode, the method of processing the first image data and the method of dividing the second image data into blocks can be determined, which improves the flexibility of printing mode selection, further improves the efficiency of image data processing and transmission, and thus improves the effectiveness and efficiency of printing.
[0118] As an optional implementation, the group processing mode includes the first group mode or the second group mode, and the pixel point processing mode includes the grayscale mode or the thermal history mode;
[0119] The first grouping mode includes segmenting the thermistors corresponding to the pixels according to the first image data, and determining a plurality of groups of second image data in the first direction according to the segmentation;
[0120] The second grouping mode includes grouping according to pixel distribution of each row of the first image data, and determining a plurality of groups of second image data in the second direction according to the grouping;
[0121] The grayscale mode includes converting the first image data into second image data in grayscale form, and controlling each thermistor to determine the heating condition according to the distribution of pixels in the second image data in grayscale form, and the grayscale is used to indicate the brightness of the color of the corresponding pixel;
[0122] The thermal history mode includes determining the current heating condition of each thermistor based on the historical heating condition of each thermistor and / or the pixel distribution of the second image data.
[0123] By further dividing the group processing mode into a first grouping mode or a second grouping mode, and further dividing the pixel processing mode into a grayscale mode or a thermal history mode, the printing order and specific color of each pixel in the second image data can be determined, thereby improving the flexibility of the printing mode, further improving the efficiency of image data processing and transmission, and thereby improving the effectiveness and efficiency of printing.
[0124] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of another thermal printing control circuit disclosed in the embodiment of the present application. The data interaction relationship between the configuration module 108, the storage module 102 and the mode selection submodule 106 is as follows: Fig. 9 shown.
[0125] The mode selection submodule 106 may be implemented in the form of a demultiplexer, receiving a configuration signal from the configuration module 108 , selecting a corresponding data processing mode according to the configuration signal, and then determining a corresponding mode circuit to process the first image data from the storage module 102 .
[0126] This example implements the interaction between the user and the control circuit through the configuration module 108. The user inputs corresponding instructions through the configuration module 108, and the configuration module 108 generates a configuration signal according to the input instructions. The configuration signal is used to indicate the data processing mode, thereby improving the flexibility of the printing mode selection.
[0127] The present application also provides a thermal printing control method, the method comprising:
[0128] The data input module 103 is driven to read the first image data and write the first image data into the storage module 102;
[0129] The data processing module 101 is used to process the first image data, obtain the second image data and write the second image data into the storage module 102;
[0130] The data output module 104 is driven to read the second image data in the storage module 102 and output the second image data;
[0131] Drive the first state register 121 and the second state register 122 to generate and send a handshake signal, which is used to control the data processing module 101 to process the first image data, obtain the second image data and write it into the storage module 102, and control the data output module 104 to read the second image data in the storage module 102 and output the second image data;
[0132] As an optional implementation, the handshake signal includes a first signal, a second signal, a third signal and a fourth signal;
[0133] See also Fig.10 , Fig.10 Schematic diagram of a thermal printing method disclosed in the embodiment of the present application. Fig.10 As shown, the handshake signal is used to control the data processing module to process the first image data, and the data output module reads and outputs the second image data from the storage module, including the steps of:
[0134] S101: The data processing module completes processing of the first image data of the current batch, and the first status register sends a first signal to the data output module;
[0135] S102: the data output module reads and outputs the second image data from the storage module according to the first signal, and the second state register sends a second signal to the data processing module according to the first signal;
[0136] S103: The data processing module starts processing the next batch of first image data according to the second signal;
[0137] S104: After the data output module completes the transmission of the second image data of the current batch, the second status register sends a third signal to the data processing module;
[0138] S105: The first status register sends a fourth signal to the data output module according to the third signal;
[0139] Repeat the above steps S101-S105.
[0140] As an optional implementation, the storage control submodule 111 controls the sub-storage blocks in the first storage module 109 and the second storage module 110 respectively, specifically in the following manners:
[0141] The sub-storage block 0 and the sub-storage block 1 of the first storage module 109 store the first image data respectively, and the sub-storage block 0 or the sub-storage block 1 cannot be accessed by the data processing module 101 and the data input module 103 at the same time. For example, when the data input module 103 inputs the first image data into the sub-storage block 0, the data processing module 101 cannot read the first image data from the sub-storage block 0;
[0142] The sub-storage block 2 and the sub-storage block 3 of the second storage module 110 store the second image data respectively, and the sub-storage block 2 and the sub-storage block 3 cannot be accessed by the data processing module 101 and the data output module 104 at the same time. For example, when the data processing module 101 writes the second image data into the sub-storage block 2, the data output module 104 cannot read and output the second image data from the sub-storage block 2.
[0143] Furthermore, the storage control submodule 111 controls the operating frequencies of the sub-storage blocks in the first storage module 109 and the second storage module 110, respectively. For example, when the data processing module 101 reads the first image data in the sub-storage block 0, since the operating clock frequency of the data processing module 101 is generally higher, the operating frequency of the sub-storage block 0 is increased to increase the data reading rate; when the data input module 103 writes the second image data into the sub-storage block 0, since the operating frequency of the data input module 103 is generally lower, the operating frequency of the sub-storage block 0 is reduced to reduce power consumption.
[0144] As an optional implementation, the parallel working process between the printing module 105 and the data output module 104 includes: the printing module 105 stores the second image data transmitted by the data output module 104 in the latch register 124, and during the printing process, reads the second image data from the latch register and prints it;
[0145] When the latch register 124 is idle, the third status register 123 sends a fifth signal to the data output module 104, and the data output module 104 transmits data to the printing module 105 according to the fifth signal; when the latch register 124 is not idle, the third status register 123 sends a sixth signal to the data output module 104, the data output module 404 stops the printing module 105 from outputting the second image data according to the sixth signal, and the printing module 105 prints the second image data in the latch register 124.
[0146] As an optional implementation, the configuration module 108 sends a configuration signal to the data processing module 101 based on the configuration information selected by the user, determines the data processing mode of the mode selection submodule 106 in the data processing module 101, and based on the data processing mode of the mode selection submodule 106, the data processing module 101 processes the first image data and obtains corresponding second image data.
[0147] The user can select the data processing mode by configuring the data processing module 101, thereby improving the flexibility of the printing mode selection.
[0148] Specifically, in a landing scenario, the method can be combined with the circuit structures of some of the aforementioned implementations to implement the method.
[0149] See also Fig.11 , Fig.11 Schematic diagram of the structure of a microprocessor chip disclosed in the embodiment of the present application. Fig.10 As shown, the microprocessor chip includes a thermal printing control circuit as in any embodiment.
[0150] The circuit or method provided in any embodiment of the present application can be implemented by a microprocessor chip, and the microprocessor chip can be, for example, an MCU, DSP, MPU, micro CPU, etc., which can process digital signals, analog signals, or perform signal control functions, instruction processing and calculation functions, and a micro central control chip, a system-on-chip chip, etc.
[0151] Those skilled in the art will readily come up with other embodiments of the present application after considering the specification and practicing the technical solutions disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0152] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A thermal printing control circuit, characterized in that: The circuit comprises: Data processing module, storage module and data output module; Wherein, the data processing module is connected to the storage module, and the storage module is connected to the data output module and the data input module; The data processing module includes a first status register, and the data output module includes a second status register; And, the data processing module is used to process the first image data to obtain second image data in a preset format; The storage module is used to store the first image data and the second image data; The data output module is used to read and output the second image data from the storage module; The first status register and the second status register are used to generate and send a handshake signal, and the handshake signal is used to control the data processing module to process the first image data, and the data output module reads and outputs the second image data from the storage module.
2. The circuit according to claim 1, characterized in that The handshake signal includes a first signal, a second signal, a third signal and a fourth signal; The specific manner in which the first status register and the second status register generate and send a handshake signal according to the working clock signal of the corresponding module includes: When the data processing module completes processing of the first image data of the current batch, the first status register sends the first signal to the data output module, and the second status register sends the second signal to the data processing module according to the first signal sent by the first status register; The data output module reads and outputs the second image data from the storage module according to the first signal, and the data processing module starts processing the next batch of first image data according to the second signal; After the data output module outputs all of the second image data of the current batch to the external printing module, the second status register sends the third signal to the data processing module, and the first status register sends the fourth signal to the data output module based on the third signal.
3. The circuit according to claim 1, characterized in that The storage module includes a first storage module and a second storage module; Wherein, the first storage module is connected to the data processing module and the data input module, and the second storage module is connected to the data processing module and the data output module; And, the first storage module is used to store the first image data, and the second storage module is used to store the second image data; The first storage module and the second storage module include a plurality of sub-storage blocks respectively.
4. The circuit according to claim 3, characterized in that The data processing module also includes a storage control submodule; Wherein, the storage control submodule is connected to the first storage module and the second storage module; Furthermore, the storage control submodule is used to control each of the submodules to interact with at most one other module at the same time, and to control the clock frequency of the substorage block according to the module interacting with the substorage block.
5. The circuit according to claim 1, characterized in that The data output module is connected to an external printing module; The data output module is used for reading the second image data from the storage module and outputting the data to the printing module, and the printing module is used for printing the second image data.
6. The circuit according to claim 5, characterized in that The printing module includes a latch register and a third status register, and the printing module is used to print according to the second image data; And, the specific manner in which the printing module synchronously executes printing of the second image data and data transmission with the data output module includes: When the latch register is idle, the third status register sends a fifth signal to the data output module, the data output module outputs the second image data to the printing module according to the fifth signal, the latch register latches the second image data, and the printing module prints the second image data in the latch register; When the latch register is not idle, the third status register sends a sixth signal to the data output module, and the data output module stops outputting the second image data to the printing module according to the sixth signal, and the printing module prints the second image data in the latch register.
7. The circuit according to claim 6, characterized in that The latch register includes a plurality of sub-registers, and the data output module and the printing module cannot access a sub-register at the same time; The latch register is idle, which specifically includes: one or more sub-registers do not latch the second image data.
8. The circuit according to claim 1, characterized in that The data processing module includes a mode selection submodule; The mode selection submodule is connected to the storage module, and is used to determine a data processing mode, and process the first image data according to the data processing mode to obtain second image data corresponding to the data processing mode.
9. The circuit according to claim 8, characterized in that The circuit also includes a configuration module; Among them, the configuration module is connected to the mode selection submodule, and the configuration module is used to generate a configuration signal according to an input instruction, and the configuration signal is used to indicate the data processing mode and drive the mode selection submodule to determine the corresponding mode circuit according to the data processing mode.
10. A thermal printing control chip, characterized in that: The chip comprises the thermal printing circuit as described in any one of claims 1-9.