Touchscreen Controller Library
Moderators: David Barker, Jerry Messina
Touchscreen Controller Library
I am in the final stages of putting together a short library for reading from a touchscreen. To wet your appetite, here is a video of it in use with a 320x240 S1D13700 display:
http://uk.youtube.com/watch?v=XNj6_Ua-yZw
I'll post the library and example code in the next day or so.
Kind regards,
Steve
http://uk.youtube.com/watch?v=XNj6_Ua-yZw
I'll post the library and example code in the next day or so.
Kind regards,
Steve
Last edited by Steven on Sat Jul 28, 2007 9:35 am, edited 1 time in total.
Octal,
I purchased this unit from RS in the UK:
Graphic LCD,320x240 QVGA3.9in WhiteLED+T:
http://rswww.com/cgi-bin/bv/rswww/searc ... t=627-1769
Ignore the photo on their website as it is wrong. The contrast on the display is a little disappointing, otherwise I am very pleased with it. The touch screen works well.
Regards,
Steve
I purchased this unit from RS in the UK:
Graphic LCD,320x240 QVGA3.9in WhiteLED+T:
http://rswww.com/cgi-bin/bv/rswww/searc ... t=627-1769
Ignore the photo on their website as it is wrong. The contrast on the display is a little disappointing, otherwise I am very pleased with it. The touch screen works well.
Regards,
Steve
Touch screen keyboard
Here is a video of the second sample application, this time showing a touch screen keyboard:
http://uk.youtube.com/watch?v=Ztk7YEWbprg
I'll now post the code on the wiki and let you know when it's done.
Regards,
Steve
http://uk.youtube.com/watch?v=Ztk7YEWbprg
I'll now post the code on the wiki and let you know when it's done.
Regards,
Steve
OK, here is the link to the wiki section with module code and examples. I hope that it is of use to someone.
http://www.sfcompiler.co.uk/wiki/pmwiki ... ouchScreen
Regards,
Steve
http://www.sfcompiler.co.uk/wiki/pmwiki ... ouchScreen
Regards,
Steve
Storing the calibration data to EEPROM would be a good idea. You could soon do this in your code and then read this EEPROM data at the start of your code and write it to the calibration variables.
Storing it in code space may prove to be fine, but it doesn't give you a way of re-calibrating the screen if it drifts with time (I'm yet to see if this occurs in practice), without re-programming (unless you write to code space). If you are going to fix the values at programming, you might like to use the GetXY command in a test app to get the values, then use the #option statements to set these in your main code. If you then wanted to reclaim the variables used to hold the calibration values you could alter the library to use constants for these.
Regards,
Steve
Storing it in code space may prove to be fine, but it doesn't give you a way of re-calibrating the screen if it drifts with time (I'm yet to see if this occurs in practice), without re-programming (unless you write to code space). If you are going to fix the values at programming, you might like to use the GetXY command in a test app to get the values, then use the #option statements to set these in your main code. If you then wanted to reclaim the variables used to hold the calibration values you could alter the library to use constants for these.
Regards,
Steve