The utility model content
In order to solve the problems of the technologies described above, the purpose of this utility model is to provide the touch screen control circuit in a kind of embroidery machine system.
The utility model is to realize like this, touch screen control circuit in a kind of embroidery machine system, described touch screen control circuit comprises: the touch control circuit that is connected with the touch-screen of embroidery machine, the communication interface circuit that is connected with the master control board of embroidery machine, the single-chip microcomputer with AD translation function and to above-mentioned three power circuits that circuit is powered;
The single-chip microcomputer of the described AD of having translation function gathers pin by its AD and is connected with described touch control circuit, and the single-chip microcomputer of the described AD of having translation function also is connected with described communication interface circuit.
Further, described single-chip microcomputer with AD translation function adopts the TC12C5A08AD-LQFP44 chip.
Further, described communication interface circuit comprises the transceiver U4 of RS422/RS485 interface, and described transceiver U4 is the MAX491 chip.
In the utility model, by adopting the single-chip microcomputer of STC12C5A08AD, carry 10 AD as the touch-screen acquisition port with single-chip microcomputer, the 5V power supply mode, every road has the picking rate of 300KBPS, inner by after the touch recognition algorithm, this scheme is also supported the common key-press input simultaneously, by single-chip microcomputer, touch information or the key information that collects is sent to master control system by standard RS485 interface.Whole scheme have the response fast, highly sensitive, cost is low, the characteristics of highly versatile.
Embodiment
In order to make the purpose of this utility model, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the utility model is further elaborated.Should be appreciated that specific embodiment described herein only in order to explaining the utility model, and be not used in restriction the utility model.
Touch screen control circuit in Fig. 1 shows that the utility model provides embroidery machine system.This touch screen control circuit comprises: the touch control circuit that is connected with the touch-screen of embroidery machine, the communication interface circuit that is connected with the master control board of embroidery machine, the single-chip microcomputer with AD translation function and to above-mentioned three power circuits that circuit is powered; The single-chip microcomputer of the described AD of having translation function gathers pin by its AD and is connected with described touch control circuit, and the single-chip microcomputer of the described AD of having translation function also is connected with described communication interface circuit.
Consult Fig. 2, power circuit comprises+12V and+input of 5V power supply, should+12V and+5V (VDD) input connects respectively a TVS(TRANSIENT VOLTAGE SUPPRESSOR, transient voltage twin zener dioder) pipe DP1, DP2.By time variant voltage twin zener dioder DP1, DP2, can prevent that power supply is anti-inserted, simultaneously, circuit is played a protective role.Use voltage transitions chip U1 (for example: adopt LM1117MPX-3.3) realization+5V (VDD) to be converted into 3.3V(VSS).As embodiment of the present utility model, add filter capacitor C1, C2 and alminium electrolytic condenser C25 on the circuit of voltage transitions chip U1 front and back end, can the filter out power high frequency interference and obtain stable 3.3V output by adding filter capacitor.
Consult Fig. 3, this communication interface circuit adopts the transceiver U4 (for example, can adopt the MAX491 chip) of RS422/RS485 interface.When adopting MAX491 as transceiver U4, the full duplex serial communication between the master control board of realization and embroidery machine.This MAX491 chip can be used for carrying out on the multi-point bus transmission line bidirectional data communication, can guarantee the antijamming capability of communicating by letter by adopting this serial ports difference chip (MAX491 chip) in the situation that order wire is long.The RO of this MAX491 chip end and have between the single-chip microcomputer of AD translation function and be added with a diode D2 (4148 diode) makes the single-chip microcomputer with AD translation function not be subjected to the impact of MAX491 chip when the line writing program.
Consult Fig. 4, this single-chip microcomputer with AD translation function adopts TC12C5A08AD-LQFP44, and the frequency of the crystal oscillator that adopts is 11.0592M.This single-chip microcomputer with AD translation function is mainly completed the communication with the embroidery machine master control board, and key scan is processed, the acceptance of radio frequency, and the control liquid crystal screen backlight lamp is lighted and screen protection is processed.
Consult Fig. 5, the single-chip microcomputer with AD translation function adopts interrupt mode, just produces interrupt request when touch signal is arranged.When touch-screen was not in touch condition, the single-chip microcomputer with AD translation function made Q4, Q6, Q7 cut-off, Q5 conducting (the Single-chip Controlling mouth X_AIN with AD translation function is " 1 "); In case touch action occurs, touch-screen produces a look-at-me (INT0) via D1, single-chip microcomputer with AD translation function makes the Q4 conducting immediately, form current return on Y-direction, start the A/D conversion-TSXP passage of the single-chip microcomputer with AD translation function, can be read the coordinate figure of Y-axis by X+; The single-chip microcomputer that has equally the AD translation function cuts out Q6, Q7, opens Q4, Q5, and the A/D conversion-TSYP passage that starts the single-chip microcomputer with AD translation function can be read the coordinate figure of X-axis by Y+.
Between this touch control circuit and AD interface, access RC filtering, protect A/D.Like this, first by filtering, the resistance that seals in simultaneously can effectively protect A/D not to be damaged to pulse signal before entering A/D converter.
The utility model is by adopting the single-chip microcomputer of STC12C5A08AD, carry 10 AD as the touch-screen acquisition port with single-chip microcomputer, the 5V power supply mode, every road has the picking rate of 300KBPS, inner by after the touch recognition algorithm, this scheme is also supported the common key-press input simultaneously, by single-chip microcomputer, touch information or the key information that collects is sent to master control system by standard RS485 interface.Whole scheme have the response fast, highly sensitive, cost is low, the characteristics of highly versatile.
The above is only preferred embodiment of the present utility model; not in order to limit the utility model; all any modifications of doing within spirit of the present utility model and principle, be equal to and replace and improvement etc., within all should being included in protection domain of the present utility model.