Along with the social improvement of the degree of automation, human-computer interaction capabilities needed major change toward a more convenient to use and more intuitive.
Laser treatment of the main applications of laser physics of the human body, the body's reaction to achieve the purpose of treating disease. Laser therapy apparatus as a precision instrument need precise control and dustproof, anti-static, moisture, etc. Laser therapy apparatus input devices with touch screen control, which is based on the above requirements from the user-friendly operation and interface intuitive perspective. Touch screen application allows for data display and data entry combination simplifies the entire device.Principle 1 touch screen
Touchscreen attached to the monitor's surface, in conjunction with the monitor.
Simulation of electrical signals generated by touch, converted to a digital signal the microprocessor calculates the coordinates of the touch points, resulting in the operator's intention and implementation. Touch screen in its technical principle can be divided into five categories: vector pressure sensor type, resistive, capacitive, infrared-and surface acoustic wave, resistive touch screen in the practical application of the more used. Resistive touch screen consists of 4 layers of transparent thin Constitution, the following is the composition of glass or acrylic, top of the base is a layer of outer surface hardening treatment to smooth layer of plastic screen protector, attached to the upper and lower layer on the inner surface of two layers of conductive layer for metal (OTI, indium oxide), this two-tier consists of the small transparent insulation isolated points. When the finger touch screen, two conductive layer in contact with the touch point.Touch-screen two metal conductive layers are used to measure the X axis and Y axis coordinates.
For the X-coordinate measurement of conductive layer from the left end leads to two electrodes, recorded as X + and X-. For the y coordinate measurement of conductive layer from the upper and lower ends leads to two electrodes, recorded as Y-Y + and. This is the four-wire resistive touch screen of the leader. When a pair of electrodes applied voltage, the electric conductive layer will form a uniform continuous voltage distribution. If in the x direction of the electrode to impose a certain voltage, while the Y direction of the electrode is not combined with voltage, the voltage at X parallel, contacts in the field of voltage values can Y + (or Y-) electrode reflected by measuring Y + electrode voltage to ground, we can know the size of the contacts and the X-coordinate value. Similarly, when Y electrode voltage, but on the plus X electrodes on top without voltage is measured X + electrode voltage, you can learn that the y-coordinate of the contacts. Measuring principle as shown in Figure 1.Figure 1 4-wire touch screen measuring principle
Five-wire touch screen with 4 lines.
The main difference is that five-wire touch screen one of conductive layer of four are cited as four electrodes, a conductive layer only as a measure of conductor output x and Y to the measurement of voltage, the turn when in x and Y exert upward.2 touch screen controller works
There are many touch screen controller, the main function is under the control of the microprocessor to touch-screen two directions when voltage, and the corresponding voltage signal to own A/D converter with SPI port, microprocessor provides synchronous clock of the digital signal into the microprocessor.
The basic structure of the controller ADS7846 is shown in Figure 2.Figure 2 basic architecture ADS7846
Figure 1 touch point P Department measurement result is calculated as follows:
ADS7846 internal can register setting A/D converter of the resolution is set to 8-bit or 12-bit, in the present system of A/D converters, 12-bit resolution.
Then p dot binary output code to:Of which:-added ADS7846 internal A/D converter on the reference voltage.
Touch screen controllers running through the serial data input DIN input control command control.
Control-command basic format:Start sending commands specified bit7, high level valid.
A2: A0 is used to select data input channel, select the X-coordinate measurement 101, 001 select the Y-coordinate measurement. MODE to internal ADC resolution is defined as 8 bits (MODE = 1) or 12 bits (MODE = 0). SER/DFR for single/double-side reference voltage selection. PD1: PD0 according to power saving mode needs to select settings. These command control bit set will be part of the program code.3 system hardware design
Laser therapy apparatus input system consists of three parts: touch screen, touch screen controller and micro-controller.
Microcontrollers Microchip PIC16F876 new chip company. Internal bus using Harvard double bus structure. In the same internal frequency, accelerates the data transmission speed to avoid a bottleneck. This chip thin RISC are easy to use, accelerate development speed. Internal program memory containing 8KB (paging operations), 256 bytes EEPROM, 368 bytes RAM and 8-channel ADC, 1 generic serial interface (SCI), 1 x I2C interface, 1 x serial peripheral interface (SPI), 3 timer and watchdog circuit (WathcDog) and many other important resources. Peripheral interfaces functional reuse makes the whole micro-controller is simple and powerful.According to ADS7846 and micro-controller for data exchange interface features, choose PIC16F876 SPI port.
SPI port consists of three signals: SDO (serial data output)The SDI (serial data input), SCK (serial synchronous clock). Hardware connection relationship is shown in Figure 3.Figure 3 diagram of the input system hardware interface
This article focuses on the laser treatment instrument input system design, and other hardware design only gives the meaning of the interface.
Due to the internal integration PIC16F876, so peripheral interface is quite simple, but to complete the complex control functions must conduct an internal register setting.4 software design
In accordance with the above design ideas designed software applications.
Figure 4-based program with touch screen input detection part of the process flow chart. Among them, the coordinate data processing usually uses the lookup method, the coordinates of the user command, use the datasheet for the formation of coordinate information to transform fast quick reference tables, thereby enhancing the software run faster.Figure 4 process flowchart
The following is the PIC16F876 with ADS7846 interface portion of the program code.
Conclusion
This system makes it easy and entered the peripherals are simplified in actual application improves the ability of human-computer interaction, received good social benefits.
System design ideas not only to applications in the medical industry, and can be applied to industrial production automation as well as handheld devices, and other industries.Reference documents
1 Burr-Brown Corporation.
ADS7846 TOUCH-SCREEN CONTROLLER. 19992 Microchip Technology Inc. PIC16F87X Data Sheet.2001
3 Yu-yun, Wang Yi Wu Hung, a front.
PIC series MCU development application technology: electronic industrial press, 2000
No comments:
Post a Comment