Touchscreen Controller Library

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Touchscreen Controller Library

Post by Steven » Fri Jul 27, 2007 9:49 pm

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
Last edited by Steven on Sat Jul 28, 2007 9:35 am, edited 1 time in total.

User avatar
octal
Registered User
Registered User
Posts: 584
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Sat Jul 28, 2007 9:09 am

Very nice work Steven ...
please, where can we buy such display units?

regards
Octal

CS
Posts: 127
Joined: Thu Nov 02, 2006 9:14 am

Post by CS » Sat Jul 28, 2007 9:27 am

Hi Steven,

I also wanted to see the video but I only gets a message that the video was removed by the user.

What happens?

Best wishes

Christian

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Sat Jul 28, 2007 9:37 am

Appologies CS - I was just in the process of replacing it with what I was hoping would be a better video - I've chnaged the link in the first post.

Regards,

Steve

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Sat Jul 28, 2007 9:41 am

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

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Sat Jul 28, 2007 10:13 am

Just wanted to say great job Steve!

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Sat Jul 28, 2007 10:18 am

Thanks. There will be two sample applications along later - one is the simple drawing application, the other a touch screen keyboard I'm in the process of writing now.

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Touch screen keyboard

Post by Steven » Sat Jul 28, 2007 5:26 pm

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

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Sat Jul 28, 2007 5:41 pm

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

User avatar
octal
Registered User
Registered User
Posts: 584
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Sat Jul 28, 2007 5:41 pm

Very nice ... very nice Steven.
I bought a GLCD unit today. I'm waiting impatiently that arrive to france.

Regards
Octal

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Sat Jul 28, 2007 5:46 pm

That's good news. I hope that it works as well for you. Did you also order a connector? I should have thought to warn you, as the pitch of the cable is quite fine.

Regards,

Steve

User avatar
octal
Registered User
Registered User
Posts: 584
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Sat Jul 28, 2007 6:01 pm

Yes Steven ... I also ordered a connector. I had a so bad experience with some GLCDs when working for my old CIE because of LCDs connectors... ;)

Regards
octal

xor
Posts: 286
Joined: Sun Nov 05, 2006 1:15 pm
Location: NYC
Contact:

Post by xor » Mon Jul 30, 2007 11:11 am

Very nice Steve. Your module is quite thorough. I especially like the calibration feature. :D

User avatar
octal
Registered User
Registered User
Posts: 584
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Mon Jul 30, 2007 11:17 am

xor wrote:Very nice Steve. Your module is quite thorough. I especially like the calibration feature. :D
Yes I also agree with that. Althought I think that it will be nice to store calbration data in the PIC EEprom (or Code Space).

Regards
Octal

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Mon Jul 30, 2007 2:51 pm

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

Post Reply