freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于arm嵌入式系統(tǒng)的觸摸屏驅(qū)動程序開發(fā)(參考版)

2025-01-21 14:48本頁面
  

【正文】 take a measurement, and so on all without any core CPU intervention whatsoever. Understanding how to program the LH79524 ADC Sequencer control banks could be a challenge but this is made much easier by an application note provided by Sharp (). The provided driver precisely follows the remendations of this application note regarding how to configure the Sharp ADC sequence controller. Is the screen touched?Once the basic hardware setup is plete, we need a reliable method to determine if the screen is touched. It makes no sense to run the ADC and get conversion readings if the user is not touching the screen. Both controllers provide a mechanism to detect if the screen is touched, and optionally to interrupt the main processor when a touch down event occurs. The driver function that determines if the screen is touched or not is named WaitForTouchState(). When the controller is in the touch detection mode the yaxis touch plane is tied high through a pullup resister. The xaxis touch plane is tied to ground. When the user touches anywhere on the screen, the planes are shorted together and the yaxis plane is pulled low. This can be connected internally to an interrupt generation mechanism known as the PEN_DOWN IRQ. During normal operation the drivers use the PEN_DOWN IRQ to wake up the touch driver task when a touchdown event occurs. This allows the driver task to block itself and not consume any CPU time when the screen is not touched and wake up and go into conversion mode once the user touches the screen. We can also save power by disablin。 drive the opposite plane。 delay。re generated in the following paragraphs. The next question is how fast do we want to receive sample input readings from the ADC. The rate will affect how we need to configure the clock that will drive the touch controller and ADC. We want the clock to be fast enough to provide responsive input and accurate tracking but not so fast that the conversion is inaccurate or the system is consuming more power than required. In my experience, a touch screen needs to provide position updates to the higherlevel software at a minimum 20Hz rate, or every 50ms. Faster is better, assuming the higherlevel software can keep up, and we aren39。ed in for each of the many supported RTOSes. In all cases the drivers actually use two distinct interrupts: 1. An interrupt to wake up when the screen is initially touched, known as the PEN_DOWN interrupt and 2. A second interrupt to signal when the ADC a set of data conversions. I39。s a reasonable design and is worth considering depending on your overall system requirements. How to go about configuring an interrupt varies from one operating system to another. You39。t do any polling. I felt (temporarily) like an idiot for asking the question, but on further reflection polling is a very reasonable thing to consider. If you39。t let anyone tell you that your touch driver is done wrong if it39。t infer from this implementation that it39。s walk through the thought process used to make these decisions. As for whether or not the touch driver should use interrupts, the example drivers do in fact use the interruptdriven approach. I did this mainly because, to be honest, it39。 5. Send changes in touch status and position to the higherlevel graphics software. Now I39。 3. Acquire stable, debounced position measurements。ll instead describe the design and flow of the drivers and highlight the important bits. You can download the full source code for each driver at ftp://Taking a top level view, the software provides functions to acplish these things: 1. Configure the controller hardware。ll examine two reference boards featuring CPUs that have integrated touchscreen support. Both of these CPUs are based on the ARM processor architecture. The first board is the Freescale MX9823ADS evaluation board, which features Freescale39。t change. In the simplest fourwire design, one resistive layer, the xaxis layer, is powered and the second layer, the yaxis layer is used as the pickup to measure voltage corresponding to the xaxis position. The process is then reversed and the yaxis layer is powered while the xaxis layer is used as the voltage pickup. Figure 2: Touchscreen circuit diagram Figure 2 shows the simple circuit equivalent of a resistive touch screen. Note that two pletely separate readings must be taken, xaxis position and yaxis position, and these readings cannot be taken in parallel with a four or fivewire resistive touch screen. Your software must read one axis, then the other. It doesn39。re inexpensive and electrically straightforward to add to your system. Resistive touch screens are so named because they are basically resistive voltage dividers. They39。re the type of touch screen you39。re free to download and use as a baseline for your own efforts. Touchscreen technologiesBefore we can begin writing a touchscreen driver we have to have some basic understanding of how the hardware works. Many different touch technologies convert pressure or touch at a screen location into meaningful numerical coordinates. Some of these technologies include resistive, surface wave, infrared, and capacitive touch screens. For an excellent overview of the available technologies, you can go to and . For this article I39。第41頁附錄B 英文資料How to design touch screens driverAlthough touch screens are rapidly being more popular most developers have never created one before. Here is a step by step design guide that leads you through the hardware and software required to make touch screens work the first time. Touch screens are everywhere. Industrial control systems, consumer electronics, and even medical devices are mo
點擊復制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1