PDA

View Full Version : GLCD and TouchScreen trouble



SteveB
- 10th June 2007, 22:44
I am trying to get a GLCD (http://www.crystalfontz.com/products/320240cx/index.html#CFAG320240CXTFHT) and a TouchScreen (http://touch-screen-lcds.shopeio.com/inventory/details.asp?id=928&cat=Lcds&sub=Touch%20Screen) working together. I’ve got them both working separately just fine. But, when I put them together, the GLCD goes blank expect for a thick line at the top (like the “liquid” is pooling at the top of the screen).

I haven’t had a lot of time to fiddle with it, but if the TS is held above the GLCD, there isn’t any problem. Even just propping one edge on a pencil, between the black GLCD bezel and the TS keeps the problem from occurring. But as soon at they “mate”, the screen misbehaves. There is a slight “attraction” between the items as they come together. It takes a Reset or powerdown to fix the problem, just removing the TS does not restore the GLCD


Anyone work on this stuff before and have any ideas. I'd sure like to avoid a time consuming troubleshooting session if possible.
SteveB

skimask
- 10th June 2007, 23:06
Have you tried isolating them completely, like with a piece of tape or something only around the edges of the LCD frame?
Sounds like a grounding/static problem to me...

SteveB
- 10th June 2007, 23:11
Yea, that's my next step, after I get back tonight.

SteveB
- 11th June 2007, 03:52
Here are some more details.

If I place a piece of plastic, or rest it on some rubber bands, or both, I get this:
http://home.earthlink.net/~2hosting/Pics/TS_no_Pencils.JPG

Now, if I place the TS on a couple of ordinary pencils, it works fine:
http://home.earthlink.net/~2hosting/Pics/TS_on_Pencils.JPG

Also, if the TS is only about 1/4 of the way on the GLCD, it seems to be OK as well:
http://home.earthlink.net/~2hosting/Pics/TS_on_partial.JPG

Any Ideas whats causing this? I will be playing with it to see if I can get a minimum clearance, but I like to know whats going on.

SteveB

skimask
- 11th June 2007, 03:56
Here are some more details.

Any Ideas whats causing this? I will be playing with it to see if I can get a minimum clearance, but I like to know whats going on.

SteveB

Capacitive touchscreen type thing? Or resistive?
If it's capacitive, maybe it (or the LCD) isn't not grounded well enough and inducing a charge back into the LCD. Or maybe you have to TOTALLY isolate the two...who knows. Looks pretty goofy to me. Ya gotta wonder how all those PDA's handle it.

SteveB
- 11th June 2007, 04:17
Using some various piece of thin plasic, I can get no closer than 1/4". If I reduce the gap by 1/32", it blanks out.


Capacitive touchscreen type thing? Or resistive?

It's 4-wire resistive.

SteveB
- 11th June 2007, 05:03
I don't know if it will make a difference in any help, but here is the code relevent to scanning the TS:

XRaw VAR WORD
YRaw VAR WORD

Xp VAR PORTA.3
Xm VAR PORTA.5
Yp VAR PORTA.2
Ym VAR PORTA.4

ADCON1 = $0D 'Set only PORTA.0-1 Analog


'Scan X
HIGH Xp
LOW Xm
INPUT Yp
INPUT Ym
PAUSEUS 5
ADCIN 0, XRaw
LOW Xp
'Scan Y
HIGH Yp
LOW Ym
INPUT Xp
INPUT Xm
PAUSEUS 5
ADCIN 1, YRaw
LOW Yp


and a schematic of the hookup:
http://home.earthlink.net/~2hosting/Pics/TS_Scheme.gif

skimask
- 11th June 2007, 05:17
I keep going back to that grounding thing, static or EMI...
Neither of the datasheets has any helpful hints as to what might be going on.
Maybe try hooking a 'grounding wire' up to the touchscreen to the LCD frame, first with a 1K resistor (maybe less), then maybe a direct connection.
I'm thinking it's some sort of static buildup causing the controllers on the GLCD to go nuts.
Maybe try it sitting on a regular character LCD and see what happens? Not that a touch panel on a character LCD is any good, but it might lead to something...

SteveB
- 11th June 2007, 05:39
Maybe try it sitting on a regular character LCD and see what happens? Not that a touch panel on a character LCD is any good, but it might lead to something...
I just happened to have a 4X20 breadboarded up with this project, and the TS has no effect on it.

I'll look into the resistor idea tomorrow (or whenever I can get back to it this week). Not a lot of options to connect it to though, the lcd bezel is painted and there is nothing exposed on the TS. The "FrameGround" pin on the lcd is connected to GND. (I've also tried it not connected)

SteveB

Ron Marcus
- 12th June 2007, 17:48
I bet that the touch screen is creating an EM field due to the high frequency switching going on. Just for a test, take some of the static protective translucent poly bag material, and sandwich it between the two. If this doesn't relieve the problem, it should reduce the distance. You do have a wierd ground loop problem going on there. What is the hookup of your GLCD?
Ron

SteveB
- 12th June 2007, 19:24
As an update to my trouble shooting:
I can't think of a good way to hook up the resistor, but along that idea, I took a piece of 12gauge (maybe 10) bare copper wire, created a U shape and laid that across the bezel on three sides, from the bottom, around the right edge, then to the top. Laid the TS on top of this and it worked.

I am going to try and find a smaller wire and try that (or pound the 12gauge into a flat frame), possibly tonight if time permits. I'll also give Ron's suggestion a try at the same time. I was also thinking about an EM field, but not to much as that stuff is way over my head. BTW, the TS scan occurs every about every 10-20ms.

As for the GLCD hookup, Here is the pin arrangement. (I just noticed i put a 2620 in the above schematic, I am actually using a 4620)

Pin Connection
1 VSS 0v – Ground
2 VDD +5.0v – Supply voltage for logic
3 VO None – Supply voltage for driving LCD
4 RD PortC.2 - 8080 mode 1 = No operation 0 = Read
5 WR PortC.3 - 8080 mode 1 = No operation 0 = Write
6 A0 PortC.5 -
7-14 DB0-7 PortD - Data Bits
15 CS PortC.4 - Chip select, Active L
16 RES PortE.2 - Controller reset signal, Active L
17 VEE None - Negative voltage output
18 FGND 0v - Frame ground
19 DISPOFF +5.0v - Display L: No Display
20 WAIT None

Thanks for the help,
Steve

skimask
- 12th June 2007, 19:58
From what you just described, it sounds like you just need a chunk of wire to run from the frame of the touchscreen (maybe epoxy it on there?) to the frame of the GLCD...and that's it. If there is an issue with EMI, then that direct connection would effectively drain the field away, for lack of a better phrase...
Is the bezel of the touchscreen or the GLCD painted? Maybe that's why it isn't getting a good ground?

Ron Marcus
- 12th June 2007, 19:59
Where does the frame ground go? (pin 18)

mister_e
- 12th June 2007, 20:15
Silly questions:
1. What happen if you remove ALL ferrite beads?
2. what happen if you leave all unused i/o to input when you do ADC reading instead of setting them to LOW or HIGH
3. do you have any 10uF-47uF tantalum capacitor close to the GLCD Vdd rails
4. What happen if you use lower voltage for ADC convertion.
5. what happen if you tie VEE to GND with a 10k resistor
6. what happen if you load WAIT pin to GND or VDD with a resistor?
7. What happen if you slow down the ADCs readings?
8. How far the GLCD is away of the PIC?
9. What happen if you use some resistor in serie to the adc pins + 0.1 uF to GND?

SteveB
- 13th June 2007, 00:23
Skimask:
Is the bezel of the touchscreen or the GLCD painted? Maybe that's why it isn't getting a good ground?(pin 18)
The GLCD is painted black

Ron:
Where does the frame ground go? (pin 18)
I've got it tied to the GND rail on the breadboard

Steve:
1. What happen if you remove ALL ferrite beads?
No Change, thats what I started with.
2. What happen if you leave all unused i/o to input when you do ADC reading instead of setting them to LOW or HIGH?
I assume you mean the i/o connected to the TS. If this is the case, any pins connected to the TS that don't need to be driven a specific direction are made inputs so the pin floats. Typical, you drive one direction (X+ to X-) then read the opposite neg (Y-), and leave the other pin (Y+) floating. The exception are the pins used for ADC (A0 and A1), those are stuck with being analog inputs (at least A0 is).
3. do you have any 10uF-47uF tantalum capacitor close to the GLCD Vdd rails
Nope, good idea, and I imagine it can't hurt.
4. What happen if you use lower voltage for ADC convertion.
haven't tried it yet, I could drive it with 3v, probably using some MOSFETs I guess. I will put this in the hopper to try if/when I can
5. what happen if you tie VEE to GND with a 10k resistor
Don't know yet, into the hopper
6. what happen if you load WAIT pin to GND or VDD with a resistor?
Don't know yet, into the hopper
7. What happen if you slow down the ADCs readings?
By slow down, do you mean the frequency of readings or the actual ADC aquasition time?
8. How far the GLCD is away of the PIC?
They are at least 6 inches apart, at times as much as 8 or 9. I've use an old floppy drive cable to plug into the GLCD and break out to the breadboard.
9. What happen if you use some resistor in serie to the adc pins + 0.1 uF to GND?
I'll try this with the caps on the GLCD rails. Quick and easy to implement. Got a suggestion for the resistors, I'm thinking 330, or maybe even lower.

I'll start with the decouple caps first (and the suggestions from above posts, like Ron's poly bag for trouble shooting purposes), as they should be there anyway, then work through the list as I get time. Busy week at work. (I've written the last two posts on lunch/dinner breaks).

Thanks to all for the helping hand,
Steve

SteveB
- 13th June 2007, 04:39
More Info after some playing:
- Static sheild products had no discernable effect. Except that the "foil" loking bag (I tried a plastic product as well) actually caused the same phenomona just on it's own on e time, but I could not repeat it.

- Caps and Resistors, both and seperately, did not help, and caused problems with the TS Scanning. Decoupling Caps don't help either.

- I slowed the frequency of the scans, but no change. Increase the ADC time. No change.

I did have succus with a "frame" made of 18gauge bare copper wire between the GLCD and the TS. But, If I only put the wire on two or three sides, it wouldn't consistantly solve the problem. I might try to find some copper sheet and cut out a frame to see what that does. I may also try connecting it to GND.

I think that leaves working with the Vee pin, Wait pin, and driving with a lower voltage.

SteveB

Ron Marcus
- 13th June 2007, 14:09
Have you tried disconnecting the frame ground altogether? With audio work, I know ground loops can be induced with multiple connections to the same point. Try moving it around on the board and see if this has any effect.
Ron

mister_e
- 13th June 2007, 14:11
mmm, it's one of those thread i wish i could have the same hardware on hand...mmm

One thing is sure, the 0.1+10-47uF have to be mounted on the GLCD board. Now i don't know how good this will be if you use a dedicated voltage regulator ONLY for the glcd...

I'm thinking the Vee and Vo pin should be connected to a Trim pot as per the datasheet, unless some noise may go directly to the Column/row driver and produce some kind of problem... sure it's something like that. Kind of floating MCLR... sort of.

keep thinking...

EDIT: yeah ground loop could be something like that as well.