Embodiment
For further setting forth the technological means that the present invention takes and the effect obtaining, below in conjunction with accompanying drawing and preferred embodiment, to technical scheme of the present invention, know and complete description.
Referring to Fig. 2, is the structural representation of touch apparatus of the present invention.
Touch apparatus of the present invention, comprises a plurality of communication interfaces, and each communication interface has corresponding touch area parameter; When described touch apparatus detects touch operation, according to the described touch area parameter judgement communication interface corresponding with this touch operation, and send the touch data corresponding with this touch operation by the communication interface of judging.
Touch apparatus can support a plurality of external interfaces to connect simultaneously, according to user's needs, can freely increase or reduce different interfaces, as can be supported 2 USB, 1 Com mouth, 1 I2C mouth in Fig. 2 simultaneously.In user's application, only need to send the parameter of response, the equipment support that can control which interface connection touches.
As one of them embodiment, communication interface comprises USB interface, Com interface and/or I2C interface.
The type of communication interface and quantity can be set according to actual conditions, have increased the dirigibility in use procedure of the present invention, are easy to promote.
Referring to Fig. 3, is a kind of schematic diagram of touch apparatus operational scheme of the present invention.
After touch apparatus powers on, reading out data from Flash or EEprom first, the corresponding reference position of each communication interface of initialization and resolution parameter, give each communication interface by these parameter configuration.Thereby be that follow-up touch recognition is ready.Whether touch screen program operation, can detect in real time touch and produce, and after touch operation generation having been detected, sends touch data to processor, the identification range of the position judgment that processor produces according to touch operation in which communication interface.Detect parameter corresponding to each communication interface, and according to the corresponding parameter of each communication interface, converted coordinate system, sends corresponding touch data to the external unit with the corresponding connection of this communication interface by corresponding communication interface.
Parameter corresponding to each communication interface can change, and by applications (as calibration software), sent order is set accordingly, and parameters corresponding to communication interface is set.When arranging, each communication interface, for example the data transmission of USB, COM and I2C data-interface is interrupted.Communication interface parameter after setting completed, is saved in the parameter after upgrading in the storeies such as Flash or EEprom.
Touch apparatus, when powering on, distributes corresponding internal memory to each communication interface, for reading the corresponding touch area of each communication interface parameter.Described touch area parameter comprises the reference position, width of touch area, highly, and the zone bit etc. that whether sends data when external unit sends touch data.
As one of them embodiment, described touch area parameter comprises reference position, width and the height of the touch area corresponding with described communication interface.
Touch apparatus just can accurately find the touch area corresponding with communication interface like this, has improved the accuracy in touch recognition process.
As one of them embodiment, in the Flash in described touch apparatus or EEprom storer, store described touch area parameter.
Touch apparatus, after powering on, reads corresponding data from Flash or EEprom storer.If read for the first time, use initialization data, otherwise use the data in storer.When equipment Inspection is after touch, according to the parameter of distinct interface, converted coordinate system, sends corresponding touch data.Wherein, described touch data includes but not limited to the coordinate of touch point.
As one of them embodiment, described touch apparatus receives the configuration-direct from configurator, and according to described configuration-direct, described touch area parameter is configured.
Above-mentioned way is equivalent to for touch apparatus is equipped with a set of configurator, by this configurator, can carry out various settings to touch apparatus, thereby expand function of the present invention, can adapt to plurality of application scenes.
As one of them embodiment, described configuration-direct comprises change directive, and described touch apparatus is changed described touch area parameter according to described change directive.
When the application platform of certain interface connection changes, need to change the touch area parameter that this interface is corresponding, now can in application platform, move an application program, send order and inform touch apparatus.
For example, this application platform has just been used the touch area of touch apparatus right half part, need to send corresponding order and inform touch apparatus: the touch area that this communication interface is corresponding, its X coordinate range is Max_X_Coord/2~Max_X_Coord, Y coordinate range is 0~Max_Y_Coord.Can consult Fig. 4, for change the work schematic diagram of touch area parameter in touch apparatus of the present invention.
In Fig. 4, have 4 parameters, wherein Left Position represent communication interface the leftward position of corresponding touch area, Top Position represents the apical position of the corresponding touch area of communication interface, Area Width represents the width of the corresponding touch area of communication interface, and Area Height represents the height of the corresponding touch area of communication interface.By setting corresponding numerical value in value region, just can change touch area parameter corresponding to this communication interface.The X coordinate range of supposing whole touch area is 0~200, Y coordinate range is 0~160, if the touch area of a communication interface of plan is set to left-half, its X coordinate range can be made as to 0~100, Y coordinate range is made as 0~160, if plan is made as the first half by touch area, its X coordinate range can be made as to 0~200, Y coordinate range is made as 81~160, by that analogy.
By the way of numerical value and then definite corresponding touch area is set, can guarantee Stability and veracity.Touch area corresponding to each communication interface can not produce and obscure, and is beneficial to user and uses.
MCU in touch apparatus can support a plurality of external interfaces, such as USB, serial ports and I2C etc., the demand of application platform as required in touch-screen, at hardware components, can freely reduce the quantity of external interface, also in the time of can dispatching from the factory, in hardware, carry a plurality of interfaces, by PC application program, effective interface quantity is set.For example in equipment, support 1 USB, 1 serial ports and 1 I2C mouth.Can consult Fig. 5, for a kind of touch apparatus of the present invention is supported the connection diagram of many interfaces.
As one of them embodiment, described configuration-direct comprises switch order, and described touch apparatus opens or closes described communication interface according to described switch order.
Defining variable in the program of touch panel device, comprise interface quantity in current device, touch area parameter that each interface is corresponding, the for example reference position of touch area, width, highly, and the zone bit etc. that whether sends data when external unit sends touch data, follow-uply just can, according to different hardware and environment for use, configure the parameter of these variablees.
For example, in touch apparatus, support 1 USB and 1 Com interface, 2 displays of yaw in a complete machine, each display respectively connects a computing machine, in display surrounding, installs touch-screen.Can consult Fig. 6, for carry out the schematic diagram of an embodiment of many main frames connection by touch apparatus of the present invention.
As one of them embodiment, described touch apparatus receives the calibration command from calibration procedure, and according to described calibration command, described touch area parameter is calibrated.
Only need in each computing machine, move a calibration procedure, after calibration, equipment just can get corresponding touch area, and follow-up needs to send corresponding touch data, and described touch data includes but not limited to the coordinate of touch point.When touching in touch area 1, equipment sends corresponding touch data to computing machine 1 by USB mouth, and can not send to computing machine 2, when touching in touch area 2, equipment sends corresponding touch data to computing machine 2 by com port, and can not send to computing machine 1.Thereby realize the function that a touch apparatus is controlled two main frames simultaneously.
Can consult Fig. 7, the work schematic diagram when touch apparatus of the present invention is calibrated.
Calibration procedure can, for an external application, connect touch apparatus by external unit and calibrate.After user opens calibration procedure, the selected communication interface that needs calibration, obtains this communication interface parameters of corresponding touch area at present.User can only calibrate some parameter according to actual conditions, also can calibrate whole parameters.Calibration operation can adopt the mode that numerical value is set, the mode that also can adopt calibration point to click.It is worthy of note, what Fig. 7 showed is only a kind of embodiment of in touch apparatus of the present invention, touch area corresponding to communication interface being calibrated.Those skilled in the art, can rationally promote according to the calibrating mode of art technology general knowledge and various routines, in the situation that not departing from the present invention's design, all should belong to the present invention's scope required for protection.
For example, when using calibration procedure, as worked as in computing machine 1, in display 1, can show calibration procedure, surrounding in viewing area shows each calibration point successively, user clicks calibration point successively, after completing, just can will and highly send to touch apparatus by the reference position of current region, width by calibration procedure.
Again for example, a touch-screen operates TV menu and computer simultaneously.The touch-screen of a USB and 1 serial ports, is installed in TV or display, and TV can receive pcs signal by VGA interface, the USB mouth of touch-screen can connect on computers like this, and serial ports can be connected in TV motherboard, like this, computer and TV can recognize touch operation.Can consult Fig. 8, for carry out the schematic diagram of another embodiment of many main frames connection by touch apparatus of the present invention.
Compare with general technology, touch apparatus of the present invention can support a plurality of external interfaces (being also communication interface) to connect a plurality of external units simultaneously, and can increase according to actual needs or reduce different external interfaces, user only needs to send command adapted thereto in application, can control the equipment that the corresponding interface connects and realize touch function.By the present invention, a touch apparatus can be realized and touching simultaneously in a plurality of external units, thereby improve between distinct device, touches the convenience switching, and has simplified operation simultaneously, reduces the cost switching.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.