Design of industrial touch screen based on LPC2478 and ADS7843

Publisher:SereneDreamsLatest update time:2010-10-20 Source: 现代电子技术Keywords:LPC2478 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Touch screens have many advantages such as durability, fast response, space saving, and easy communication. Compared with keyboard input, touch screen technology is simpler, more intuitive, faster, and has rich and colorful expressive capabilities. When designing a touch screen, the most important issue is to accurately locate the coordinates of the touch point. This article details the practical solution of designing a four-wire resistive touch screen using industrial-grade chips LPC2478 and ADS7843.

1 Hardware Design

1.1 Hardware Selection

The LPC2478 chip integrates an LCD interface, and its operating range is -40 to +80°C. Its wide temperature range is particularly suitable for the industrial field. The ADS7843 chip is a chip designed for touch sampling, with 12-bit programmable accuracy. The external reference voltage range is from 1 V to Vcc, and the maximum Vcc voltage is 5 V. The high speed and low power consumption make the ADS7843 very suitable for handheld devices with resistive touch screens.

1.2 Hardware Circuit

The author designed the hardware interface circuit of ADS7843 (as shown in Figure 1). This circuit uses the GPIO pins of LPC2478 to simulate the SPI timing, and connects DCLK, CS, DIN, BUS-Y, and DOUT to the five GPIO pins of LPC2478. The pins of ADS7843 are connected to the interrupt 1 of LPC2478. The four-wire resistive touch screen is connected to the X+, Y+, X-, and Y- pins of ADS7843 respectively.

ADS7843 hardware interface circuit

1.3 Collection method

ADS7843 has two reference voltage modes: single-ended mode and differential mode. In single-ended mode, the reference input voltage is selected from Vcc and GND. Since the internal switch resistance voltage drop affects the conversion result and causes errors, the low-resistance switch inside the converter has a certain impact on the conversion accuracy. The differential mode reference input is provided by the unselected input channels Y+, Y-, X+, and X- to provide reference power and ground. Regardless of how the internal switch resistance changes, the conversion result is always proportional to the resistance of the touch screen, overcoming the influence of the internal switch resistance, but when the conversion frequency is very high, the power consumption increases, and low-power design needs to be considered. The author uses a differential method in the program for sampling accuracy reasons.

The pin of ADS7843 is a PIN interrupt pin. When the display screen is touched, a low level is generated to trigger the interrupt of LPC2478. The falling edge trigger method is adopted. The level change process of one click on the touch screen is captured in Figure 2. It is not very suitable to collect the level change by interrupt method, and it is impossible to capture the sliding process on the touch screen, so the author uses the cyclic acquisition method.

Level change process

Cyclic acquisition method: mainly through the LPC2478 timed acquisition of ADS7843, in the author's program, the time interval of the timer is set to 50 ms. This method increases the CPU load, so it is not suitable for the slower MCS51 microcontroller, but it is more suitable for the LPC2478 processor. Each collected data must be compared with the last data to determine whether it is new data.

In this study, LPC2478 and ADS7843 are mainly used for display and external input, without other large-scale calculations and real-time control of the device. Therefore, the advantages and disadvantages of the interrupt method and the loop method are compared. In order to better respond to some sliding actions on the screen, the loop acquisition method is finally adopted.

1.4 ADS7843 acquisition process

The acquisition method of 12-bit differential mode is adopted, and the control words in the program are 0xg0 (x coordinate) and 0xD0 (y coordinate). According to the timing diagram of ADS7843, the workflow of the author's acquisition program is: after the control word is sent after 8 clock cycles, it is read 12 times continuously at the falling edge of DCLK to read the AD sampling value on the touch screen. Due to the cyclic acquisition method adopted by the author, the collected data is not necessarily the data generated by people touching the screen. In the system used by the author, the LPC2478 LCD screen uses the Sharp LQ043T3DX02 LCD screen. If the x-axis data collected is 4 095 (the y-axis data collected is mostly 0, but sometimes it may not be 0). It means that no one touched the screen when the data was collected, and the data can be discarded directly.

In practice, we are not only concerned about the A/D conversion value of the current touch point voltage value by ADS7843, but also the relationship between the touch point and the LCD coordinates. The conversion can be performed through the following conversion formula:
Conversion formula
Where: x, y are the coordinates in the LCD coordinates; xAD, yAD are the AD values ​​collected by ADS7843; Tchscr_XMax, Tchscr_XMin, Tchscr_YMax, TchScr_YMin are the ranges of x, y coordinates returned by the touch screen.

2 Conclusion

This article introduces a practical solution for designing a four-wire resistive touch screen using the chip LPC2478 and ADS7843 to achieve specific functions. Practical applications show that the touch screen designed using LPC2478 has strong reliability and environmental adaptability.

Keywords:LPC2478 Reference address:Design of industrial touch screen based on LPC2478 and ADS7843

Previous article:Design of Constant Temperature Automatic Calorimeter Based on S3C2410
Next article:Design of an Airborne Radio Station Detection Controller Based on ARM

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号