1. ADC and touch screen controller structure diagram
1. S5PV210 supports 10 analog inputs, namely AIN0-AIN9. AIN0 and AIN1 are only used for analog input, and AIN2-AIN9 can support 2 resistive touch screens respectively, so this is the resistive touch screen in the previous blog.
The first interface connects the resistive touch panel sensor directly to the SoC controller. So 4 analog input pins are responsible for one resistive touch screen.
2. As can be seen from the above, the entire controller consists of multiple parts. The AD conversion and touch screen control part has two subsidiary units. One of them is the logic of reverse control of the AINn pin (arrow in the figure), which is mainly used to power and measure the xy direction in time-sharing during the process of the touch screen acquiring coordinates; the second is the interrupt generation component. For AIN1 and AIN0, when the AD conversion is completed, the INT_ADC0 and INT_ADC1 interrupt signals will be used to notify the CPU that it can read the data. For the two sets of touch screens, if the X/Y axis data conversion is completed, the INT_PEN0 and INT_PEN1 interrupt signals will be used to notify the CPU to read the coordinate information. However, the interrupt generated by the touch screen being pressed is another interrupt signal. In fact, the hardware interface of the I2C slave device will have an interrupt pin connected to an external interrupt pin in the SoC.
3. Two working modes: Normal Conversion Mode (AUTO_PST = 0, XY_PST = 0) & Separate X/Y Position Conversion Mode (AUTO_PST = 0, XY_PST = control)
(1) The AD converter has two operating modes: normal operation mode and time-sharing X/Y position conversion mode.
(2) The normal operation mode is used for ordinary AD conversion, and the time-sharing X/Y position conversion mode is used for a resistive touch screen. In normal AD conversion, the AD conversion value is placed in TSDATX, and in the time-sharing X/Y mode, the X/Y coordinates are placed in TSDATX and TSDATY respectively.
(3) For AIN0 and AIN1, there are not so many modes, they can only work in normal mode; for AIN2-AIN9, because they are multiplexed, there are only 2 modes. If we use these pins as normal AD conversion
If it is used for resistive touch screen detection, it is configured as normal mode. If it is used for resistive touch screen detection, it is configured as X/Y mode.
4. Interruption of participation
(1) In fact, both ordinary AD conversion and touch screen AD conversion can be completed without the participation of interrupts.
(2) If you do not want to interrupt the normal AD conversion, then query it. After starting a conversion, keep querying the flag bit. It is not wrong to read the conversion value until the hardware automatically sets the flag bit after the AD conversion. Of course, you can also use interrupts. The controller provides a corresponding interrupt for normal AD conversion.
(3) The touch screen can also use or not use interrupts. The SoC never knows when a person will press or release the touch screen, so the pressing/releasing of the touch screen is a purely asynchronous event for the SoC. For this situation, the SoC has only two solutions: polling and interrupts.
5. Main registers
(1)TSADCCONn register
Start by read means that after the AD conversion is completed, if the CPU reads the converted data from the corresponding register, the hardware will automatically start the next AD conversion.
ENABLE_START bit, if we set this bit value to 1 to start an AD conversion, this bit will be automatically set to 0
(2) TSCONn: Mainly used to control the power supply of the two panel electrodes when measuring the X-axis and Y-axis coordinates.
(3)TSDLYn: As the name suggests, it is used for delay. This register is mainly used to implement that after completing an AD conversion, the next AD conversion should not be started immediately, but a delay period is required. Specify TS0 - ADC start or interval delay register
(4) TSDATXn: The data after the AD conversion of the X axis of the touch screen is stored in this register. If we only do ordinary AD conversion, then this data is also stored in this register.
(5)TSDATYn: The data after the Y-axis AD conversion of the touch screen is placed in this register
(6)CLRINTADCn: Clear the interrupt pending flag, corresponding to INT_ADCn in the above figure
(7)CLRINTPENn: Clear the interrupt pending flag, corresponding to INT_PENn in the above figure
Previous article:I2C bus and S5PV210 I2C bus controller
Next article:Detailed explanation of S5PV210 LCD controller
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- Compensation Method for High-Precision Temperature Measurement Using MSP430 Microcontroller
- Machine A sends control command characters
- [Review of Arteli Development Board AT32F421] + Raising a Watchdog
- Let's talk about five cents and share your experience in voltage regulation circuit design
- Share: A brief analysis of the access control system using RFID technology
- MicropyCli - Micropython project management automation
- 【AIoT Smart Smoke Detection System】System Design Overview
- Doping of semiconductors from the perspective of energy levels
- EEWORLD University - HDMI 2.1 Design and Testing Update
- Design of breathing light based on FPGA