Touch screen classification:
Resistive: accurate positioning, single-point touch
Capacitive induction: Capacitive induction: supports multi-touch, but is more expensive. Most widely used in industry
Infrared: Low price, but the frame is fragile, prone to light interference, and distortion on curved surfaces
Surface acoustic wave type: solves various shortcomings, but if there are water droplets and dust on the screen surface, the touch screen will become dull
Note: The touch screen is essentially separated from the LCD. The touch screen is responsible for detecting touch points, while the LCD is responsible for display. Capacitive touch screens generally require a driver IC to detect capacitive touch, and generally output touch data through the IIC interface.
Common driver ICs:
GT9147: 17*10 drive structure (10 sensing channels, 17 drive channels)
OTT2001A: 13*8 drive structure (8 sensing channels, 13 drive channels)
Note: They are connected to the MCU via 4 wires: SDA, SCL, RST and INT.
GT9147:
The IIC address of GT9147 can be 0X14 or 0X5D. Within 5ms after the reset, if INT is high, 0X14 is used as the address, otherwise 0X5D is used as the address. For the specific setting process, please refer to the document: GT9147 Data Manual.pdf. In this chapter, we use 0X14 as the device address (excluding the lowest bit, converted into read and write commands: read: 0X29, write: 0X28)
Control command register (0X8040)
This register can be written with different values to achieve different controls. We generally use the two values 0 and 2. Writing 2 can soft reset GT9147. After hard reset, generally write 2 to this register to implement soft reset. Then, write 0 to read the coordinate data normally (and end the soft reset).
Configuration register group (0X8047~0X8100)
There are 186 registers here, which are used to configure the various parameters of GT9147. These configurations are generally provided to us by the manufacturer (an array), so we only need to write the configuration given by the manufacturer into these registers to complete the configuration of GT9147.
Product ID register (0X8140~0X8143)
There are 4 registers here to store product ID. For GT9147, these 4 registers are read as 9, 1, 4, 7 (ASCII code format). Therefore, we can use the values of these 4 registers to determine the model of the driver IC, and thus determine whether it is OTT2001A or GT9147, so as to perform different initializations.
Status Register (0x814E)
We only care about the highest bit and the lowest 4 bits. The highest bit is used to indicate the buffer status. If there is data (coordinates/buttons), the buffer will be 1. The lowest 4 bits are used to indicate the number of valid touch points, ranging from 0 to 5, 0 means no touch, and 5 means 5 touch points.
Coordinate data registers (30 in total)
There are 5 groups (5 points) here, and each group of 6 registers stores data. Take the coordinate data register group of contact 1 as an example.
We generally only use the x and y coordinates of the contact, so we only need to read the data from 0X8150 to 0X8153, and combine them to get the coordinates of the contact. The other 4 groups are composed of 16 registers starting with 0X8158, 0X8160, 0X8168 and 0X8170, respectively for the coordinates of contacts 2 to 4. Similarly, GT9147 also supports register address self-increment. We only need to send the first address of the register group and then read it continuously. GT9147 will automatically increase the address, thereby increasing the reading speed.
Previous article:STM32 Series No. 27 - Infrared Remote Control
Next article:STM32 Series Chapter 25 - CAN Bus
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Altium Designer 18 Schematic
- I am designing a transformer for a flyback switching power supply. Is my estimate of the maximum duty cycle correct?
- Connected sports devices, desktop toys and medical wearables face new security challenges
- FAQ_ How to test the frequency deviation of low-speed clock in BlueNRG-X
- Start the Allwinner V853 platform GUI "Hello World!" journey in 5 minutes
- How to reduce the CAN bus load?
- How to detect idle in input capture mode of STM32
- Design of DSP Embedded TCP/IP Network Communication System
- Is the chip industry about to change? Nvidia launches its first CPU, which achieves ten times the performance of x86
- Importance and necessity of wiring harness tester in new energy vehicle wiring harness production