Abstract: This paper describes the structure and the touch screen works, and the company’s Burr-Brown ADS7843 touch screen controller chip as an example, a typical touch-screen application and operation of the circuit. The ADS7843 12-bit internal A / D, in theory, enter the coordinates of the touch screen recognition accuracy for the effective length and width of 1 / 4096.
Keywords: ITO ADS7843 touch screen embedded systems
1, the basic principle of the touch screen
A typical work of some of the general touch screen consists of three parts, as shown in Figure 1: two transparent resistive conductor layer, insulating layer between two conductors, electrodes. Use of resistive conductor layer resistive material, such as indium tin oxide (ITO) coated on the substrate composition, the upper plastic substrate, the lower glass substrate. Isolation insulating layer viscous liquid materials, such as polyester film. Excellent conductive properties of the electrode materials used (such as silver full regalia) form, the conductive properties of ITO is about 1000 times.
The touch screen work, the equivalent resistance of the upper and lower conductor layer network shown in Figure 2. When coupled with a layer of electrode voltage, the network will be formed in the voltage gradient. If external force makes contact with the upper and lower layers at a certain point, then another layer of the electrode voltage can not increase the measured voltage at the contact point to know the coordinates of the contact point. For example, in the top electrode (X +, X-) be added to the voltage, the conductor layer formed on the top of the voltage gradient, when there are external forces at some point makes contact with the upper and lower layers, can be measured at the bottom to the voltage at the contact point , then according to the voltage and the electrode (X +) the distance between the relationship and know where the X coordinates. Then, the voltage switch to the bottom electrode (Y +, Y-) on, and the contact point at the top of the voltage measurement to know the Y coordinates.
2 touch-screen control to achieve
Now many PDA applications, the touch screen as an input device, the touch screen control also have a special chip. Obviously, the touch screen controller chip to accomplish two things: First, is the completion of the electrode voltage switching; Second, is the voltage at the collecting point of contact (ie A / D). In this paper, BB (Burr-Brown) ADS7843 chip company example, the touch screen implementation.
2.1 ADS7843 and a typical application of the basic characteristics of
ADS7843 is a built-in 12-bit analog-digital conversion, low-resistance analog switches of the serial interface chip. Supply voltage 2.7 ~ 5 V, reference voltage VREF to 1 V ~ + VCC, the input voltage conversion range 0 ~ VREF, maximum conversion rate of 125 kHz. ADS7843 pin configuration shown in Figure 3. Pin Function Table 1, Figure 4 shows a typical application.
2.2 ADS7843′s internal structure and the reference voltage mode selection
ADS7843 touch screen has been able to achieve control because of its internal structure is very easy to switch the electrode voltage, and can fast A / D conversion. Their internal structure as shown in Figure 5, A2 ~ A0, and SER / for the control of the control register bits used for switching and reference voltage selection.
ADS7843 supports two reference voltage input mode: one is a fixed reference voltage VREF, the other to differential mode, the reference voltage from the drive electrode. These modes are shown in Figure 6 (a), (b) below. In Figure 6 (b) the differential mode can eliminate the switch turn-on voltage drop impact. Table 2 and Table 3 for the two reference voltage input mode corresponding to the internal switch status.
2.3 ADS7843 control word and data transfer format
ADS7843 control words are listed in Table 4, where S is the data transmission start flag, the bit will be 1. A2 ~ A0 for channel selection (see Table 2 and 3).
MODE is used to select A / D conversion accuracy, a select 8-bit, 0 to select 12 bits.
SER / Select reference voltage input mode (see Table 2 and 3). PD1, PD0 selected power-saving mode:
00 power-saving mode allows, in the two A / D converter between the power-down, and the interrupt enable;
01 with 00, just does not interrupt;
11 No power saving mode.
In order to complete the first electrode voltage switch and A / D conversion, you need to send through the serial port to the ADS7843 control word, the conversion is complete and then read out via the serial port voltage conversion value. Standard requires a conversion of 24 clock cycles, as shown in Figure 7. Since the serial port to support two-way transmission at the same time, and the next in a reading and send control words can overlap between, so conversion rate can be increased to every 16 clock cycles, shown in Figure 8. If conditions permit, CPU CLK can be generated if the 15 (such as FPGAs and ASICs), conversion rate can be increased to every 15 clock cycles, shown in Figure 9.
2.4 A / D conversion timing of the program design
ADS7843 typical application shown in Figure 4. Assuming μP interface MCU P1.3 ~ P1.7 51 connected to a conversion is 24 clock cycles to be an example, the A / D conversion timing of the programming.
; A / D interface to control line
DCLK BIT P1.3
CS BIT P1.4
DIN BIT P1.5
BUSY BIT P1.6
DOUT BIT P1.7
; A / D channel selection command word and working registers
CHX EQU 094H; channel selection control word X +
CHY EQU 0D4H; channel selection control word Y +
CH3 EQU 0A4H
CH4 EQU 0E4H
AD_CH EQU 35H; channel select register
AD_RESULTH EQU 36H; store 12 bit A / D value
AD_RESULTL EQU 37H
; Storage channel CHX + the A / D value
CHXAdResultH EQU 38H
CHXAdResultL EQU 39H
; Storage channel CHY + the A / D value
CHYAdResultH EQU 3AH
CHYAdResultL EQU 3BH
; Acquisition channels CHX +’s block (CHXAD)
CHXAD: MOV AD_CH, # CHX
MOV CHXAdResultH, AD_RESULTH
MOV CHXAdResultL, AD_RESULTL
; Acquisition channels CHY +’s block (CHYAD)
CHYAD: MOV AD_CH, # CHY
MOV CHYAdResultH, AD_RESULTH
MOV CHYAdResultL, AD_RESULTL
; A / D conversion routine (AD_RUN)
; Input: AD_CH-mode and channel selection command word
; Output: AD_RESULTH, L; 12 bit of the A / D conversion value
; Use of: R2; auxiliary work register
CLR CS; chip allows
MOV R2, # 8; the first to write 8 bit command word
MOV A, AD_CH
MOV C, ACC.7
MOV DIN, C; clock latched DIN
SETB DCLK; start sending command word
CLR DCLK; clock pulse, a total of 24
DJNZ R2, AD_LOOP
ADW0: JNB BUSY, AD_WAIT; wait for the conversion to complete
ADW1: MOV R2, # 12; start reading the 12bit result
CLR DCLK; read with the falling edge of the clock
MOV A, AD_RESULTL
MOV C, DOUT
MOV AD_RESULTL, A
MOV A, AD_RESULTH
MOV AD_RESULTH, A
DJNZ R2, AD_READ
MOV R2, # 4; Finally, there is no use four clock
DJNZ R2, IGNORE
SETB CS; against chips
ANL AD_RESULTH, # 0FH; shielded high 4 bit
2.5 A / D conversion result data format
ADS7843 conversion result to a binary format. It should be noted that, during the formula, the reference voltage input mode in the two is not the same. Moreover, if the selected 8-bit conversion accuracy, 1LSB = VREF/256, a conversion is completed ahead of time can be 4 clock cycles, when the serial clock rate can be doubled.
In many embedded systems, CPU modules provide specialized support for LCD and touch screen input, making the interface is very simple. For example, MOTOROLA’s MC68VZ328 (known as the Dragon Ball) to provide dedicated pins to support 8-bit and 4 bit LCD touch screen support for use of ADS7843 by SPI2 is also very easy to complete.