Background technology
Along with the extensive use of embedded micro printer and the development of portable set instrument, the volume of device body constantly dwindles, and the user improves constantly the requirement of the print speed of printer, minitype thermal printer becomes a kind of reliable solution, and the thermal printer print speed is fast, noise is low, writing is clear, head is small and light satisfies these requirements.
Thermal printer in the prior art automobile fault diagnostic apparatus, after generally receiving the serial data that the host computer of automobile fault diagnostic apparatus sends by 51 single-chip microcomputers, with data and external ROM(Read-Only Memory, read-only memory) the character library contrast in, find corresponding character, calculate the character data that each row is printed, by RAM(random access memory, random access memory) moves in the shift register of thermal print head, control the thermal print head heating then, the drive motors paper feed is finally finished printing.This printer mainly contains following shortcoming, because ROM and RAM are external memory, reaction speed is slow, causes printer operating speed slower.
Summary of the invention
Main purpose of the present invention provides a kind of thermal printer for automobile fault diagnostic apparatus and automobile fault diagnostic apparatus, is intended to improve the print speed of thermal printer.
The present invention proposes a kind of thermal printer for automobile fault diagnostic apparatus, comprises main control chip and thermal print head, is provided with flash memory and random access memory in the described main control chip, wherein:
Described main control chip is used for when the data of the host computer transmission that receives automobile fault diagnostic apparatus, the data that receive is moved on the thermal print head by random access memory print.
Preferably, also comprise lacking the paper detection module, be used for obtaining by photo resistance the light-sensing signal of printing head, and described light-sensing signal is sent to main control chip; Main control chip is used for obtaining described level state, if the level state of described pin is low level then to be controlled printing head and stop to print, then controls printing head and continues operate as normal if the level state of described pin is high level.
Preferably, also comprise the overtemperature protection module, for detection of the temperature of printing head, then send low level signal to described main control chip if temperature is too high; Described main control chip also is used for controlling printing head when receiving the low level signal of overtemperature protection module transmission stops to print.
Preferably, also comprise motor drive module, described driver module adopts two-phase four to clap paper feed and the chart drive speed of step motor control printing head.
Preferably, also comprise heating module, described main control chip also is used for sending heating signal to heating module when the character data that delegation is printed moves into register on the thermal print head by random access memory; Described heating module is used for after receiving heating signal, the heating printing head.
Preferably, described main control chip is connected by serial line interface with host computer.
The present invention also proposes a kind of automobile fault diagnostic apparatus, comprises thermal printer, and described thermal printer is above-described thermal printer.
The thermal printer and the automobile fault diagnostic apparatus that are used for automobile fault diagnostic apparatus that the present invention proposes, control printer by integrated main control chip, be integrated with flash memory and random access memory on the main control chip, when this control chip receives the data that the host computer of automobile fault diagnostic apparatus sends, data are directly moved in the printing head by random access memory print, can rapidly the data that receive be printed, improve the printing speed of printer.Flash memory and random access memory are integrated in the main control chip, and the integration height is difficult for breaking down.
The specific embodiment
Be described further with regard to technical scheme of the present invention below in conjunction with drawings and the specific embodiments.Should be appreciated that specific embodiment described herein only in order to explaining the present invention, and be not used in restriction the present invention.
With reference to Fig. 1, Fig. 1 is the structural representation of the present invention for the preferred embodiment of the thermal printer of automobile fault diagnostic apparatus.
The thermal printer that is used for automobile fault diagnostic apparatus that present embodiment proposes comprises main control chip 10 and thermal print head (not shown), is provided with flash memory 11 and random access memory 12 in the main control chip, wherein:
Main control chip 10 is used for when the data of the host computer transmission that receives automobile fault diagnostic apparatus, the data that receive is moved on the thermal print head (not shown)s by random access memory 12 print.Main control chip also can replace flash memory by integrated internal memory in the present embodiment.
The thermal printer that is used for automobile fault diagnostic apparatus that present embodiment proposes, flash memory 11 and random access memory 12 are integrated in the main control chip 10, when this control chip receives the data that the host computer of automobile fault diagnostic apparatus sends, data are directly printed in the immigration printing head by random access memory 12, can rapidly the data that receive be printed, improve the printing speed of printer.Flash memory 11 and random access memory 12 are integrated in the main control chip 10, and the integration height is difficult for breaking down.
Further, the data of host computer transmission are the data of Unicode UNICODE coded format.UNICODE be in every kind of language each character setting unified and unique binary coding, stride language, the cross-platform requirement of carrying out text-converted, processing to satisfy, make thermal printer support multi country language and characters to print, enlarged the range of application of thermal printer.
Further, also comprise lacking paper detection module 20, be used for obtaining by photo resistance the light-sensing signal of printing head, and described light-sensing signal is sent to main control chip 10; Main control chip 10 is used for obtaining the level state of the pin that described main control chip 10 is connected with described scarce paper detection module 20, if the level state of described pin is low level then to be controlled printing head and stop to print, then control printing head and continue operate as normal if the level state of described pin is high level.
The inner photoelectric relay of using of thermal printing head is as sensor, detect printhead whether paper is arranged, when thermal printing head does not have paper, the light beam that light emitting diode in the sensor sends can't reflex on the photosensitive triode that lacks in the paper detection module 20 via printing paper, phototriode can't conducting, then lacking paper detection module 20 internal circuits can't conducting, the pin that main control chip 10 is connected with scarce paper detection module 20 is low level state, then stop the work of printing head this moment, the pin that is connected with scarce paper detection module 20 when main control chip 10 is high level state, then the printing head operate as normal.
Further, also comprise overtemperature protection module 30, for detection of the temperature of printing head, then send low level signal to main control chip 10 if temperature is too high; Main control chip 10 also is used for controlling printing head when receiving the low level signal of overtemperature protection module 30 transmissions to be stopped to print.Thermal print head is generally 1ms heat time heating time, after heating surpasses 1s continuously, is easy to burn thermal head, so need protect printing head by overtemperature protection module 30.Send low level signals to main control chip 10 when temperature is too high, main control chip 10 control printing head and is stopped to print when receiving low level signal, prevents that printing head is overheated and causes damage.
Further, also comprise motor drive module 40, this motor drive module 40 adopts two-phase four to clap paper feed and the chart drive speed of step motor control printing head.
Stepper motor is that first stepper motor spare is controlled in the open loop that electric impulse signal changes angular displacement or displacement of the lines into.Under the situation of non-overload, frequency and the umber of pulse of pulse signal only depended in rotating speed of motor, the position that stops, and be not subjected to the influence of load variations, when step actuator receives a pulse signal, it just drives stepper motor and rotates a fixing angle by the direction of setting, be called " step angle ", its rotation is to move step by step with fixing angle.Can come the pilot angle displacement by the control impuls number, thereby reach the purpose of accurate location, can control paper feed; Can control speed and the acceleration that motor rotates by the control impuls frequency simultaneously, thereby reach the purpose of control chart drive speed.
Further, also comprise heating module 50, during register that main control chip 10 also is used for moving on the thermal print heads by random access memory 12 in the character data that delegation is printed, send heating signals to heating module 50; Heating module 50 is used for after receiving heating signal, the heating printing head.
Further, main control chip 10 is connected by serial line interface with host computer.Low by the serial interface communication cost, its suitable short-range communication.
The present invention also proposes a kind of automobile fault diagnostic apparatus, comprises thermal printer, and this printer is the described printer of above embodiment.
The above only is the preferred embodiments of the present invention; be not so limit claim of the present invention; every equivalent structure transformation that utilizes specification of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.