The flow of the program is shown in the figure above.
After writing the program, I tested and found that when the waiting interrupt is set to wait for the key press interrupt (enter_wait_pen_down_mode) in the initialization function, pen down is displayed after power on, but the touch screen is not actually pressed. At this time, the program will enter the waiting state and will not detect the press. At this time, it is necessary to perform the press and lift operation again for the subsequent detection to be normal. Only when it is set to wait for the key to be lifted (enter_wait_pen_up_mode), pen up is displayed after power on, and the program will enter the waiting state for the key to be pressed, and the detection can be normal.
When set to wait for the key to be released, the debugging information is as follows.
When set to wait for a key press, the debug information is as follows.
The strange thing is that the debug information in the video and the example is as follows, and the wait key press mode (enter_wait_pen_down_mode) is set.
According to the chip manual of 2440, it is possible to determine whether the key is pressed or lifted based on bit 15 of the ADCDATA0 register.
It can be seen that the debug information in the routine shows that the value of ADCDAT0 is 0x3000, and its bit15 is 0, but it shows pen up. Checking the configuration, it is found that the configuration of the routine is the same as that of the test program. It can also be seen from the debug information that the values of the registers are the same. But why the routine shows pen up, while the test program shows pen down, I have not figured out the reason yet. The current solution is to set it to wait for the key to be lifted mode (enter_wait_pen_up_mode) during initialization, so that the program can run normally.
Previous article:1.9.4_ADC and touch screen_S3C2440 touch screen interface_P
Next article:1.9.6_ADC and touch screen_ADC interrupt_P
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- [Hua Diao Experience] 05 Building a development environment for Xingkong board: SSH connection and Jupyter programming
- What birthday gift should I give to my mother?
- Download the free NI white paper "Overcoming the Challenges of Production Test for Complex Devices Under Test"
- 2.4G module NRF24L01 debugging experience
- Could you please recommend a mature domestic high-power step-down DCDC?
- Design of analog signal source for remote sensing images with wide spectrum coverage
- DSP Basics--Fixed-point Decimal Operations
- Small Cell Networks and the Evolution of 5G
- C Language Core Technology (Original Book 2nd Edition)
- Do you know the chip manufacturer of this Bluetooth module?