The touch control module mainly drives the ADS7843 chip to realize the coordinate value conversion. It is the key to realize the touch operation. The working sequence diagram is shown in Figure 8.
The touch control module uses 24 working modes of clock conversion cycle to drive ADS7843, which communicates once every 8 clock cycles, and requires 3 communication with the controller. The first communication is the DIN port of the touch control module. The control word is sent to ADS7843 through IO, and the voltage value of X and Y is collected. The control word for reading X is 11010000, and the control word for reading Y is 10010000.
In Figure 8, S is the start flag of the control word; A2 to A0 is the channel selection; M is the precision control bit for A / D conversion; SER is the input mode of the reference voltage. Different modes of operation are selected by sending different control words. The bytes are transmitted at high and low bit by bit on the falling edge of the conversion clock DCLK, and the controller receives the control command on the rising edge of DCLK and starts to change jobs.
After the control command is sent, it reads the coordinates second times and third times, and the 12 bit coordinates are read and placed in the specified register according to the high and low position in the later order, and 4 bits are added to zero. After the coordinate FPGA internal wiring to achieve data exchange between the module and the touch control module data sharing, the microprocessor through the FSMC bus to read from time to time coordinates, and coordinates calibration and filtering processing, according to the response values of the coordinates, complete touch operation.
With the designed LCD touch screen controller as the experimental platform, the performance of the controller's portability, data update rate and touch operation are verified. The experimental equipment is shown in Figure 9, of which FPGA is EP4CE10F17C8N, ARM is STM32F407IGT6, SDRAM is HY57V641620HT-6.
In order to verify the portability of the controller, a display template is set up. The width of each bar is 40pixel and the white stripe interval is 40pixel. The LCD screen with different resolutions is displayed without changing the driver. The experimental result is shown in Figure 10.
We can see from Figure 10: in different resolution mode, display the number of IOUS template increases with increasing resolution, clear image, no splash screen, jitter phenomenon, which proves that the design of the LCD touch screen controller for different resolution has good portability.
1. Data update rate test
The controller sends data frames estimates within the 1s data update rate, each sending 1 a data count signal, calculating data update rate by counting signal.
In different resolution mode, when the SDRAM working clock is 150MHz, the maximum data update speed of controller is: 1024pixel * 768pixel to 21 frames /s, 800pixel x 480pixel to 36 frames /s, 480pixel 272pixel 272pixel achieves 50 frame /s.
The data update rate is multiplied by the data volume of a frame, and the data update rate can be obtained. According to the test data, when the resolution is 1024pixel * 758pixel, the data update rate of the controller is the largest, 31MB/s.
Under different experimental conditions, the LCD with resolution of 800pixel * 480pixel is tested. When no hardware accelerates, the maximum data update rate is 22 frames /s, and when the hardware accelerates, the maximum data update rate is 36 frames /s.
From the test data, we can see that the maximum speed of data update is significantly improved by hardware accelerated design scheme, and the speed is increased by 1.6 times compared with the original scheme.
2. Touch operation verification
Touch operation is the main part of completing human-machine interaction. It generates the timing signal that meets the requirements through the controller, drives the ADS7843 chip to complete the analog signal acquisition and digital to analog conversion, and realizes the one-to-one correspondence between pixels and contacts. In order to verify the touch function, with LCD 800pixel * 480pixel resolution touch screen platform, draw a 10pixel * 10pixel in the LCD screen at the center of the box, with a touch pen box click center, displays the current coordinates on the screen at the same time, the red dot drawing 5pixel * 5pixel, touch the experimental results as shown in figure 11.
From Figure 11, we can see that the coordinates of LCD display correspond to the physical location of the contacts one by one, and the display is clear and no jitter, which proves the reliability of the touch function designed by the LCD touch screen controller.