SED1335/Densitron LM4733 LCD Module

Hello,

I'm looking for some help, I've written some code for this LCD module that uses the SED1335 controller, and am 99% there, but I'm experiencing a bit of a problem. I am aware this could well be just a driver coding issue of my making, but I've almost exhausted all avenues of investigation now so am hoping that the symptoms of my problem will ring a bell with someone out there.

Basically I am drawing a bitmap on screen (approx 50 * 50 pixels), row at a time, using the "command byte+stream of data bytes" (per row) method. Sometimes a problem occurs where an additional 8 (or so) pixels can be written on the end of the row. It *appears* that an extra byte has been inserted during the row write for some reason, since the first byte of the row is always written correctly and the last few bytes seem to have been pushed along by 8 (or so) pixels. I know this looks like a silly coding error, but bear with me!! I've checked the WR strobe pulse and I am not strobing it once too often or anything stupid like that.

What is extremely confusing though is that this behaviour becomes better/worse under certain conditions:

1) It happens much less frequently if I disable the screen (using the command) then do the write, then re-enable the screen, but this is undesirable due to screen flicker. 2) It happens much less frequently if I write only one data byte per command byte, i.e. "command byte+databyte+command byte+databyte...". 3) It happens much less frequently (and this is the biggest puzzler of all) if the data bytes I send tend to comprise of mostly 0s! How can this be?!

My code should in theory work the same regardless of data byte values, I've done a quick check for any unusual optimisations etc but can see nothing. Exactly the same code runs in all cases, apart from the described differences. One other thing worth mentioning, when writing data bytes (following memory write commands) I synchronise the writes with the status flag on D6 and write no more than 4 data bytes before the next screen line draw. This should not really affect write reliability anyway though, it's just to avoid momentary distortion on screen.

If anyone out there can offer any advice about what's going wrong I'd be grateful! I've looked at everything I can, the code looks fine, the timings all look fine, it can run for about 15 hours and this problem might only occur 3 times, but I am worried because I can't explain why it happens, and of course it might occur 10 seconds after powerup, not really ideal!!

I don't really expect anyone to figure out my code for me, but I am hoping that anyone who is familiar with either this module or this controller just

*might* have encountered this and know the root cause.

Regards, Richard.

Reply to
Richard Phillips
Loading thread data ...

To me it looks like a problem with spikes on Gnd or WR or CS lines. If you have a suitably fast oscilloscope or analyser, check that out.

It not, well, you can add a small capacitor (10 to 100pf, depends on speed) to the WR line (of course ONLY for a test) just to see if the problem gets worse or better.

Maybe it is a harware timing problem. WR pulse too short maybe?

HTH Wolfgang

--
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply to
Wolfgang Mahringer

It does all sound like the typical things you get when the timing is wrong. For example, changing the data at the same time as you apply the clock edge that latches that data.

An alternative theory would be that the correct logic levels for the part are not being met, or that a lot of noise is present.

All these things are consistent with the data-pattern-dependent behaviour you see. You need to get a scope and look carefully at the signals.

--

John Devereux
Reply to
John Devereux

I'd echo what Wolfgang said.

A reflection on the WR line would cause this sort of issue, clocking extra bytes with random data.

If all else fails, try a series resistor in the WR line.

Reply to
Jim Stewart

Wolfgang, Jim, John,

Firstly thanks for all your replies. I'll reply to all of you in the same message to keep things simple, I've seperated this into a section each but I may say something of relevance to you all in each section. It's hard to reply to 3 people at once!

Wolfgang, I did have concerns about spikes and interference because the datasheet for the module states that the connecting wires between micro and module should be no more than 30cm, ours are exactly this length. The hardware also sits pretty close to a powersupply and monitor. I spoke to the hardware guy involved about it (today as it happens) and he seemed to think it was probably ok, but I will revisit this with him tomorrow. I did find today that when I tied the CS permanently low (I think), things

*seemed* to get a little better, though it's hard to say for sure because I may think it's improved but it can just be luck! Perhaps this might help make it more immune to spikes on that line? I've checked the signals out with a scope and I thought it all looked pretty good, but how small a spike does it take to spoil things, i.e. how fast a scope do you think is required to spot the interference? I will certainly try the capacitor test tomorrow and see what happens. With regard to the WR pulse, I've measured it at approx 750ns, spec says it should be 220ns minimum, so I think I'm fine there.

Jim, When you say reflection, you are using this to mean something other than a spike? I do remember covering the theory of this in college many years ago but it's not something I've ever encountered in working life, what would be the cause of this? It definately seems to be clocking an extra byte, though I must say they don't appear to be random. It seems to write a random byte (in terms of it's position within the sequence) twice. E.g. instead of writing 3, 4, 4,

4, 3 I seem to write 3, 4, 4, 4, 4, 3... if you see what I mean? But there isn't any extra pulse shown on the scope, certainly nothing like a 220ns+ pulse anyway. I will definately try your series resistor idea if all else fails.

John, I am definately changing the data before changing the clock high (i.e. WR). They are controlled on seperate pins (obviously) on seperate ports, so I update the data on one port then the WR is strobed on the other port. Logic levels look ok but I will not rule anything out at this stage! I will double check... When you say that this is consistent with the data-pattern-dependant behaviour, I guess that a lot of 0s are easier/more likely to get corrupted with spikes than lots of 1s? If so then that definately makes sense to me.

Thanks again to you all, I will investigate furthur tomorrow. What gives me a lot of optimism is you all seem to recognise the characteristics of this problem as something that looks fairly common/known. I'm not just dealing with some kind of unknown phenomena!!

Regards, Richard.

Reply to
Richard Phillips

Well,

It seems I have cured my problem.

Simple as it gets really, I just extended the leads connecting the LCD module to the powersupply and moved the module as far away from the powersupply and the monitor as I could and it's been solid ever since.

I did consider interference but I somewhat ruled it out because the signals

*looked* ok, and the hardware engineer didn't sound too overwhelmed with this suggestion. Looking back, maybe I should have expected this response!

Anyway, thanks to all who responded, I would probably still be tearing my hair out without you. The fact that you all confidently recognised the symptoms and likely causes definately put me on the right track!

Best regards, Richard.

Reply to
Richard Phillips

Hi Richard,

It's great that you have made progress, and thanks for letting us know. But, if I were you I would still be a bit worried. Monitors do not generate *that* much interference. If your system is that sensitive, it is always going to be a bit flaky, even if you have managed to get it to work OK for now.

Something is still wrong; the ribbon cable too long, some signal is high impedance, the clock timing too fast, something is just on the edge of working and the interference pushes it over.

--

John Devereux
Reply to
John Devereux

Hello John,

It was actually placed on my bench between a powersupply and my monitor, so it was getting interference from two sources. It's now placed as far as I can get it from both.

Still, I agree with you about the fact it's a bit sensitive. I've informed the hardware engineer of the problem and it's his responsibility now to deal with it (I don't mean to sound like I'm happy to pass the buck, but I'd be treading on his toes if I start changing circuits!).

I am happy that I've at least seemingly found the source of the problem. This was what was worrying me the most, I didn't know if it was a software issue or hardware. I'm now 99% confident it's hardware. I've checked all the timings and an confident I am well within spec by a comfortable margin. Given we are right on the recommended limit of connecting lead length though, you may be right about cables being too long. Again, my colleague can now investigate this. I think when we get proper (i.e. not development) hardware built we'll hopefully have seen the end of this!

Thanks again, Richard.

Reply to
Richard Phillips

We had similar problems connecting an Optrex display to an E1331 controller in a weatherproof box, where the door with display had to be able to swing open. An 16" ribbon was used where the system had been designed for a direct plug-in to the main PCB. We ended up having to buy shielded ribbon cable before it would pass EMC testing without the LCD being corrupted.

--Gene

Reply to
Gene S. Berkowitz

Gene,

We currently have 30cm connections between micro and LCD module, but this is just the harness that was made up for me, really it doesn't need to be anything like this length in the finished product so I am going to do something about this today!

Regards, Richard.

Reply to
Richard Phillips

Dear Sirs, We have obtained your address from google.com by chance and we write to introduce ourselves as one of largest manufacturer, from China, of a wide range of LCD & LCM. Considering the improvements it offers, we believe you will find our HUAXIAN a very good product. Because we have always been faithful in carrying out its contracts, reasonable in price, superior in quality, timely in delivery, flexible in trade, the Corp. Serves clients wholeheartedly. Foreign friends are warmly welcome to establish trade ties. It will be a great pleasure to receive your inquiries for any of the items against which we will send you our lowest quotations. Yours faithfully, Sophie Sales manager Qingdao Seako Electronics Co., LTD HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch

402, No 1009 Dalao Road, Qingdao, China Tel: +86-532-87061859 Fax: +86-532-87061859 MSN:sophie snipped-for-privacy@hotmail.com Email:qd snipped-for-privacy@126.com
Reply to
Sophie

Dear Madam/Sir:

Glad to know you through the Internet!

Are you in need of LCD products?

SEAKO ELECTRONIC CO., LTD (HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch )is the professional supplier of LCDs from China. We offer all kinds of LCD products including COB, COG, TAB type LCD Module and TFT monitor/TV. Standard products or customer design projects are both available here.

Considering the improvements it offers, we believe you will find our HUAXIAN a very good product. Because we have always been faithful in carrying out its contracts, reasonable in price, superior in quality, timely in delivery, flexible in trade, the Corp. Serves clients wholeheartedly. Foreign friends are warmly welcome to establish trade ties. It will be a great pleasure to receive your inquiries for any of the items against which we will send you our lowest quotations.

Remember, we care about your business and our highly trained R&D team will work closely with you to meet all your requirement.

Yours faithfully, Sophie Sales manager Qingdao Seako Electronics Co., LTD HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch

402, No 1009 Dalao Road, Qingdao, China Tel: +86-532-87061859 Fax: +86-532-87061859 MSN:sophie snipped-for-privacy@hotmail.com Email:qd snipped-for-privacy@126.com
Reply to
Sophie

Dear Madam/Sir:

Glad to know you through the Internet!

Are you in need of LCD products?

SEAKO ELECTRONIC CO., LTD (HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch )is the professional supplier of LCDs from China. We offer all kinds of LCD products including COB, COG, TAB type LCD Module and TFT monitor/TV. Standard products or customer design projects are both available here.

Considering the improvements it offers, we believe you will find our HUAXIAN a very good product. Because we have always been faithful in carrying out its contracts, reasonable in price, superior in quality, timely in delivery, flexible in trade, the Corp. Serves clients wholeheartedly. Foreign friends are warmly welcome to establish trade ties. It will be a great pleasure to receive your inquiries for any of the items against which we will send you our lowest quotations.

Remember, we care about your business and our highly trained R&D team will work closely with you to meet all your requirement.

Yours faithfully, Sophie Sales manager Qingdao Seako Electronics Co., LTD HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch

402, No 1009 Dalao Road, Qingdao, China Tel: +86-532-87061859 Fax: +86-532-87061859 MSN:sophie snipped-for-privacy@hotmail.com Email:qd snipped-for-privacy@126.com
Reply to
Sophie

Wolfgang Mahringer =E5=86=99=E9=81=93=EF=BC=9A

hat

it of

my

at a

the

Dear Madam/Sir:

Glad to know you through the Internet!

Are you in need of LCD products?

SEAKO ELECTRONIC CO., LTD (HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch )is the professional supplier of LCDs from China. We offer all kinds of LCD products including COB, COG, TAB type LCD Module and TFT monitor/TV. Standard products or customer design projects are both available here.

Considering the improvements it offers, we believe you will find our HUAXIAN a very good product. Because we have always been faithful in carrying out its contracts, reasonable in price, superior in quality, timely in delivery, flexible in trade, the Corp. Serves clients wholeheartedly. Foreign friends are warmly welcome to establish trade ties. It will be a great pleasure to receive your inquiries for any of the items against which we will send you our lowest quotations.

Remember, we care about your business and our highly trained R&D team will work closely with you to meet all your requirement.

Yours faithfully, Sophie Sales manager Qingdao Seako Electronics Co., LTD HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch

402, No 1009 Dalao Road, Qingdao, China Tel: +86-532-87061859 Fax: +86-532-87061859 MSN:sophie snipped-for-privacy@hotmail.com=20 Email:qd snipped-for-privacy@126.com
Reply to
Sophie

Wolfgang Mahringer =E5=86=99=E9=81=93=EF=BC=9A

hat

it of

my

at a

the

Dear Madam/Sir:

Glad to know you through the Internet!

Are you in need of LCD products?

SEAKO ELECTRONIC CO., LTD (HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch )is the professional supplier of LCDs from China. We offer all kinds of LCD products including COB, COG, TAB type LCD Module and TFT monitor/TV. Standard products or customer design projects are both available here.

Considering the improvements it offers, we believe you will find our HUAXIAN a very good product. Because we have always been faithful in carrying out its contracts, reasonable in price, superior in quality, timely in delivery, flexible in trade, the Corp. Serves clients wholeheartedly. Foreign friends are warmly welcome to establish trade ties. It will be a great pleasure to receive your inquiries for any of the items against which we will send you our lowest quotations.

Remember, we care about your business and our highly trained R&D team will work closely with you to meet all your requirement.

Yours faithfully, Sophie Sales manager Qingdao Seako Electronics Co., LTD HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch

402, No 1009 Dalao Road, Qingdao, China Tel: +86-532-87061859 Fax: +86-532-87061859 MSN:sophie snipped-for-privacy@hotmail.com=20 Email:qd snipped-for-privacy@126.com
Reply to
Sophie

Wolfgang Mahringer =E5=86=99=E9=81=93=EF=BC=9A

hat

it of

my

at a

the

Dear Madam/Sir:

Glad to know you through the Internet!

Are you in need of LCD products?

SEAKO ELECTRONIC CO., LTD (HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch )is the professional supplier of LCDs from China. We offer all kinds of LCD products including COB, COG, TAB type LCD Module and TFT monitor/TV. Standard products or customer design projects are both available here.

Considering the improvements it offers, we believe you will find our HUAXIAN a very good product. Because we have always been faithful in carrying out its contracts, reasonable in price, superior in quality, timely in delivery, flexible in trade, the Corp. Serves clients wholeheartedly. Foreign friends are warmly welcome to establish trade ties. It will be a great pleasure to receive your inquiries for any of the items against which we will send you our lowest quotations.

Remember, we care about your business and our highly trained R&D team will work closely with you to meet all your requirement.

Yours faithfully, Sophie Sales manager Qingdao Seako Electronics Co., LTD HUAXIAN PHOTOELECTRIC CO., LTD Qingdao Branch

402, No 1009 Dalao Road, Qingdao, China Tel: +86-532-87061859 Fax: +86-532-87061859 MSN:sophie snipped-for-privacy@hotmail.com=20 Email:qd snipped-for-privacy@126.com
Reply to
Sophie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.