GregOlson Posted November 5, 2015 Report Share Posted November 5, 2015 WARNING: I'm a uGFX NOOB.My company is looking at uGFX for a new project. Regarding the drivers in uGFX for touchscreens which is the most stable/mature in the library? What reason(s) do people have for using the different chips available? Does the MCU ADC driver work well? In looking at ginput_mouse.c, it appears that debouncing is taken care of in the MCU ADC driver. Since our target processor has a built in ADC that would be the cheapest option, but we are after the fastest to implement and most reliable solution. We are using a 4-wire resistive touchscreen in our design and cost isn't as much of a concern at the moment.Any input would be much appreciated.Thanks,Greg Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 5, 2015 Report Share Posted November 5, 2015 Hello Greg and welcome to the community!Personally I don't like having the four-wire touchscreen hooked up directly to the microcontroller. In order to read one touch point, four measurements need to be taken. The problem is that in between each measurement the pin directions need to be changed. The next problem is that just one point measurement doesn't give a usable result. Our tests showed that at least four measurements (this means 4 * 4 = 16 individual ADC samplings, swapping pin configurations between each sampling) are required for usable results. Having a very good result usually requires 8 measurements (again, 8 x 4). That takes a lot of CPU time...In fact, working with the MCU driver is the reason why there are some touchscreen related configuration options in the uGFX library such as the lazy release feature. There was just too much noise.Using an external touchscreen controller is definitely the right way to go in our opinion. These chips usually provide enhanced noise rejection filters and also generate an IRQ once the touchscreen is being touched. When connecting the four-wire touchpanel directly to the ADC of the microcontroller you will have to scan periodically yourself in order to figure out when the touchscreen is actually being touched. With an external dedicated touchscreen controller chip you can just hook the IRQ signal up to an external interrupt pin of your microcontroller (or a regular GPIO and poll it regularly).The most used & best implemented touchscreen drivers are the ADS7843 (there is a list of compatible ones on our website) and the STMPE811. Personally I prefer the STMPE811. If money is becoming an issue then the XPT2046 (that is an ADS7846) should be available for just a couple of cents.~ Tectu Link to comment Share on other sites More sharing options...
inmarket Posted November 7, 2015 Report Share Posted November 7, 2015 After Tectu has said all that (to which I agree), the MCU ADC touch driver does work really well as we have put a lot of effort in making that happen.Some dedicated touch controllers have internal bugs that mean they are not as reliable as they should be. Again we have had to spend a lot of time making sure these issues are worked around. For example, I think all the touch drivers currently poll the controller as the hardware interrupt pins are exceptionally unreliable leading to missed touch events and even the touch controller appearing to turn off. Check the code for each touch driver if you are interested in the detail.In conclusion, our preference is for a dedicated controller chip as it can be more cpu efficient however both solutions work well, dedicated controllers no longer have such a clear advantage, lazy touch work arounds are now seldom needed, and cost is allowed to be a factor in the hardware you use. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now