GLCD teething troubles

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

chrismills
Posts: 15
Joined: Fri Apr 04, 2008 12:28 am
Location: Plymouth, UK

GLCD teething troubles

Post by chrismills » Sun Jun 01, 2008 10:30 am

Hi there, Any help would be very welcome.

I'm trying to get going with the 320x240 S1D13700 touch screen graphics LCD (from RS components). I wondered if anyone with some experience with this unit might be able to give a little advice.

Chris

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Sun Jun 01, 2008 11:00 am


chrismills
Posts: 15
Joined: Fri Apr 04, 2008 12:28 am
Location: Plymouth, UK

Post by chrismills » Sun Jun 01, 2008 3:35 pm

Thanks David.

That looks like just what I need.

I've been trying to get the touch screen to work using Steve Wright's module. It seems to work very well, except that a position is returned all the time, rather than only above a certain pressure threshold. I have tried altering the threshold value with no luck. Am I missing something?

The other thing I wondered was about power supply to the GLCD unit. My understanding of the data sheet is that it needs 26v. Am I correct and is there an easy way of setting up this supply?

Chris

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

Post by Steven » Sun Jun 01, 2008 3:49 pm

Can you post the code that you are using, along with a summary of the touchscreen connections you have? Do you also have pull-down resistors on all four touchscreen connections?

chrismills
Posts: 15
Joined: Fri Apr 04, 2008 12:28 am
Location: Plymouth, UK

Post by chrismills » Sat Jun 07, 2008 5:30 pm

Pull downs on the touchscreen connectors.

I hadn't thought of that. I'll give it a try and let you know what happens.

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

Post by Steven » Sat Jun 07, 2008 9:50 pm

Check through the notes at the start of the module - I put some comments in there that might help you.

chrismills
Posts: 15
Joined: Fri Apr 04, 2008 12:28 am
Location: Plymouth, UK

Post by chrismills » Mon Jun 09, 2008 10:07 pm

Thanks Steve. Seems to be working much better with extra pull-ups. I'm happy I can now get a position from the touch screen which I'm writing to another LCD.

I now need to hook up the LCD part of the unit and get some display output. I wondered if you could offer any advice in that direction. What is the simplest way of connecting? Do I really need to supply 23v to the LCD? I'd hate to fry it at this stage. Also what's the easiest way of producing the 23v if required.

Sorry if these questions are a bit basic but my electronics knowledge was always a bit limited and is now very rusty to boot. I was always a bit better with the software anyway.

Chris

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

Post by Steven » Tue Jun 10, 2008 6:23 am

The 23V is an ouput, so don't connect a power supply to it. It provides the contrast adjust voltage. I'll try to give the full info this evening when I have more time.

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

Post by Steven » Tue Jun 10, 2008 5:52 pm

OK, here are my pin connections:

1. VDD -> +5V
3. A0 -> RB2
5. RD -> RB0
6-13. DB0-DB7 -> PORTD
15. RES -> RB5
17. VOUT -> one side of a 10K potentiometer, other side of potentiometer to GND (you might find it better to us 10K fixed resistor & 1K potentiometer in series, with fixed resistor connected to ground, as wiper position for correct contrast is quite sensitive and near on end of wiper travel for my display)
16. VEE -> wiper of potentiometer (contrast adjust)
19. X2 (touchscreen) -> RA1 (with 10K pull-down resistor to ground)
21. X1 (touchscreen) -> RA0 (with 10K pull-down resistor to ground)
20. Y1 (touchscreen) -> RA2 (with 10K pull-down resistor to ground)
22. Y2 (touchscreen) -> RA3 (with 10K pull-down resistor to ground)
23. LED+ -> +5V via 11ohm resistor
2. VSS -> GND
4. WR -> RB1
14. CS -> RB3
24. LED- -> GND
18. NC

You will, of course have to set the pin configurations for the display library to match these pin assignments.

Hope this helps.

Steve

chrismills
Posts: 15
Joined: Fri Apr 04, 2008 12:28 am
Location: Plymouth, UK

Post by chrismills » Wed Jun 11, 2008 10:13 pm

Thanks Steve, Fantastic.

I'll give it a try as soon as I can.

Chris

chrismills
Posts: 15
Joined: Fri Apr 04, 2008 12:28 am
Location: Plymouth, UK

Post by chrismills » Sat Jun 14, 2008 9:56 am

Still no luck Steve, but I think I might have a slightly different LCD unit from you.

My LCD has DISPLAYTEC 240320D printed on the reverse.
The datasheet I downloaded from RS has different pin connections to the ones you suggested, however RS also supply other units which look identical but on examining the datasheets, seem to comply with your pin connections.

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

Post by Steven » Mon Jun 16, 2008 6:16 pm

Can you give an RS parts number for your display?

chrismills
Posts: 15
Joined: Fri Apr 04, 2008 12:28 am
Location: Plymouth, UK

Post by chrismills » Tue Jun 17, 2008 3:46 pm

I have RS 532-7350, and 627-1747.
The data sheets for these displays, and the description provided by RS, are not a great deal of help.
I bought the 627-1747 because it seemed to have the same connections as those you specified, however, it doesn't seem to have a touch screen despite it being shown in the data sheet.
Frustrating

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

Post by Steven » Wed Jun 18, 2008 6:54 am

I've checked the displays you mention. The first (532-7350) does not have a display driver (S1D13700), the second looks right, except for the lack of touchscreen (the datasheet is a generic one for the series of displays I think, but I agree, it's not at all clear).

The display you want is, I think, 627-1769 - it has a S1D13700 driver and touchscreen - just check it is the right physical size for your needs.

Hope this helps, Steve

P.S. You should at least be able to test the graphics part of the code with your second display.

chrismills
Posts: 15
Joined: Fri Apr 04, 2008 12:28 am
Location: Plymouth, UK

Post by chrismills » Wed Jun 18, 2008 11:38 pm

Thanks Steve,

All this advice has been a big help.

I now have the touchscreen working correctly and I have been able to test the graphics part of my code.

Hopefully a GLCD unit combining both functions should arrive from RS tomorrow.

For the icing on the cake, are there any ways to reduce flickering and improve contrast from the display?

Thanks, Chris

Post Reply