Butterfly LCD & damage from alternate pin use

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had someone ask me a question that I need to refer on to the EEs.

In the Butterfly, the LCD segment pins are shared with general I/O port pins, but the LCD is hard wired in place. Lots of people, myself included, use the general I/O ports and ignore the random LCD segment activity that accompanies such use.

However, the questioner points out you're not supposed to apply a DC voltage to an LCD. The datasheet says:

Quote:
The voltage must alternate to avoid an electrophoresis effect in the liquid crystal, which degrades the display. Hence the waveform across a segment must not have a DC component.

The datasheet elsewhere mentions that those segment pins that are not used to drive LCD segments may be used for general I/O and doesn't address the specific question at that point. But later (under the "Disabling the LCD") the datasheet says:
Quote:
When the LCD is disabled, port function is activated again. Therefore, the user must check that port pins connected to a LCD terminal are either tri-state or output low (sink).

This would imply one should not output a high onto any of the Butterfly's segment pins, even when the LCD backplanes, etc., haven't been enabled.

In the particular case under discussion, the LCD's segment pin is used in LED multiplexing and is being driven low (optionally) for 1 ms then high for 3 ms. The solution in this case is to switch to input (tri-state) rather than driving it high, but the general question remains.

Comments? Any insights greatly appreciated.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have yet to hear of anyone damaging a Butterfly LCD other than with long exposure to direct sunlight (like for maybe a year). Virtually all my work and the work of others has been either short term experiments or long term installations where one chose either the LCD or the output pins but not both. Frankly, I think that if there were a real problem with leaving DC on the LCD while using the output pins, that we would have heard lots of yelling and whining (or whinging) about it by now.

Maybe one of us should write a program that leaves the pins high and every hour or so writes 'Butterfly' for a few minutes, then back to leaving the pins high. We could leave this running and check on it every few days to see if the shared pins fade. I'll add this to my nearly infinite todo list, unless someone else wants to have at it.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, Smiley. That's certainly been my experience, although I usually don't leave my little concoctions running very long.

I'll put the Butterfly Scorcher Project on my (probably) somewhat shorter list of things to do. I'll let everyone know what I find out.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I expect both of you have significantly more Butterfly experience than I ever will.

That said, why challenge the data sheet? Obviously for a personal project it doesn't matter. For your educational articles and books it is desirable to teach techniques and practices that are within spec.

I've always been told, as Chuck already sited above, do not apply a DC bias to the glass. That said I haven't looked at writing my own glass driver in years, which is where one would obviously find info on the subject.

As there are a few pins available on the Butterfly that are not in contention, one might have the option of bit banging to a port expander chip.

Sorry to rain on your parade...

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rain away. We need (and appreciate) the rain.

It seems odd to me that a "demonstration and evaluation kit" that pulls those multipurpose (but dedicated due to hard wiring) pins out to the headers wouldn't have a comment in the documentation about any restrictions of this sort. That's not to imply that there aren't restrictions; just that if you're trying to hook people (and engineers, too) on your product line, you might want them educated. Or not, says the cynical Uncle Bob in me.

Color me embarrassed if there is such a note in the Butterfly's user manual.

Anyway, thanks for the comments. I was able to solve the immediate problem within specs, but the general problem persists. Keep them cards and letters coming.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
That said, why challenge the data sheet?
If there is one thing I've learned about engineerng, it is that data sheets are at best guides to what might be true. In fact, I generally assume the data sheet is wrong on any important issue and test it myself. IMHO data sheets are genterally copies of copies of copies where the writer is past deadline and shovels in whatever seems most likely to cover his ass.

Anyway, I'm looking forward to the Butterfly Scorcher Project.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm looking forward to the Butterfly Scorcher Project
It's cooking. I don't know if you remember the famous "cat cam" where a guy tied a small camera around his cat's neck to get some sort of vicarious thrills having to do with small wild rodents. Or was that the 60s? They tell me I was there.

But anyway, I was thinking it would be nice to see the progression of LCD deterioration, if any, so I should burn the glass for several hours, put up all segments, turn on a light, and snap a picture. Rinse and repeat for a week or two, or until the camera's SD card fills up.

So that's where the project is now. Engineering still has it. Marketing will probably come in and screw it up, as usual.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This has finally worked its way up to the top of the list and is ready to go. Just one or two more tweaks (we've all heard that before) and we'll toast some glass. We've had some fierce heat here that has seriously curtailed playtime since almost nobody has home air conditioning (usually not needed at all - we're about 25 degrees (F) hotter than usual).

I ended up using a webcam pointed at the Butterfly instead of a still camera. The PC talks to the Butterfly and can control lots of stuff, including turning on lights for the pictures, LCD segments, and outputting to the LCD segment drivers when the LCD is disabled.

So it will cook the segment drivers for an hour or so, enable the LCD, light all the segments, turn on the lights, and snap a couple of stills. I figure to do two just in case there are any interference artifacts. Then it will do a third picture which will show a sequence number. The PC will store the pictures, since that will give me the ability to get ongoing feedback without having to unload an SD card to see the pictures.

So I'll let it run a week or so and let everyone know. Film at 11.

I was going to call it The Smiley Cooker, but then the name ButterFry won instead.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds like an impressive setup, I'm looking forward to seeing the results.

Sorry to hear you are having record highs, we are having record lows. Must be due to Al Gore living near by.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, so which of the general I/O pins are best or "safest" to use for off-board connections?

And doesn't the Dataflash chip also have applied safe voltage issues? So interfacing those shared pins to an external 5V would presumably be bad.

Neal

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I personally wouldn't use 5v on the dataflash (or the Butterfly), but there have been threads here in which people have stated it works for them. You might do a search and see who it was to track down more details.

As for the LCD, here's my current theory, and it's only a theory. The real test has yet to start because I can't get my silly camera to focus tightly enough on the LCD to show minor changes.

There are 4 COM lines to the LCD on port A, and the 25 segment lines are on ports A, C, D, and G. Ports B, D, E, and F are brought out to headers on the Butterfly (directly or indirectly), and COM0 comes out indirectly.

I think (again, opinion) that if you leave the COM lines alone (leave them as inputs), you can diddle with the segments (that is, all the "normal" I/O pins) and not hurt anything. I think the problem is going to arise when the COM lines are one DC polarity and the segments lines are the other.

I have two tests devised, one which leaves the COMs floating and powers the segments, and one which powers COMs and segments in the opposite polarity. They'll get run any day now, as soon as I get a round tuit that will do a macro shot and can be automated to run unattended.

Attachment(s): 

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

Last Edited: Wed. Aug 5, 2009 - 05:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The following are attached to the joystick. As long as the joystick is not used these are fully available:
PB4, PB6, PB7, PE2, PE3

The following are on the USI connector. As long as you are not using the USI, then these are fully available:
PE4, PE5, PE6

The following are on the JTAG connector. As long as you are not using JTAG (and have it turned off), they are fully available. They can also be used as ADC inputs:
PF4, PF5, PF6, PF7

The following are the ISP and SPI lines. They are available when not being used for those functions. As far as the on board dataflash, it may be safe to apply 5v to these lines as long as you don't actually write or read the dataflash itself (i.e. apply the CS line (PB0)). I have used the butterfly at 5v and never destroyed the dataflash. Of course, I could have just gotten lucky :)
PB1, PB2, PB3

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Smiley has a tutorial on the alternate pin usage of the Butterfly if you want to have a look at that. It lays all this out.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, finally ready to roll. Hardly perfect, and requires a little touch up to lighten the pictures, but I think it will be good enough to tell if the LCD is degenerating, and how fast.

Since there are glasses on cows on this forum, I put glasses on my webcam. Thus the distortion, but at least the image should suffice.

Stay tuned.

Attachment(s): 

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, first round of tests done.

I didn't see any damage if I only used the I/O pins that are brought out to headers, and did not apply an opposite voltage to the LCD COMs outputs. However, I didn't run this test very long, so that part is inconclusive.

Then I ran the full cook test (segments high, COMs low) for about 33 hours, with the results shown in the photo below. The left photo is of the LCD at rest (disabled), and the right photo, taken at the same time, is of the LCD in use.

But, I waited an hour or so and snapped another picture (the single below), and there's no sign of persistent damage. I can't physically inspect the Butterfly without disassembling everything, and I'm not quite ready to do that yet. But it looks like there has been no permanent damage, although 33 hours is hardly a significant amount of testing.

So yes, the LCD doesn't like it, but I'd say it's too early to tell whether it's fatal.

Attachment(s): 

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If anyone wants to cook a Butterfly, the software is attached. It's all ASCII commands over the serial line, so it can be manipulated through something like HyperTerminal. I used a little VB6 front end which talked to my webcam, but that's another story. The Butterfly side is ImageCraft C if you want to tweak it (remember their free demo version), or use the hex file ready to load.

Here are the commands:

//      default - COMs float, segments float (lcd = 0)
//      LCD     - LCD controller enabled     (lcd = 1)
//      cook1   - COMs float, segments high  (lcd = 2)
//      cook2   - COMs low, segments high    (lcd = 3)
//
// most command are one character:
//
//      N - normal mode (LCD off, default)
//      L - LCD mode
//      H - cook1 mode
//      h - cook2 mode
//
//      e - echo off (default)
//      E - echo on
//      C - terminating CRLF
//      c - no terminating CRLF (default)
//
//      X - clear LCD
//      Z - all LCD segments on
//      # - output single char to LCD & advance cursor
//          # is blank or 0 - 9
//      =c - set LCD cursor position (c is 0 - 5)
//
//      R - lighting relay on
//      r - lighting relay off (default)
//
//      ? - return LCD cursor position (1 char returned, 0 - 5)
//      V - return version (1 char returned)
//
// Ports:
//      A0 - A3 LCD Com outputs
//      A4 - A7, C, D, G0 - G4 LCD segments
//
//      B1 - relay with DPDT switches. Off is output 0
//      B2 - LED lighting relay. Off is output 0

I used relays for the lighting because I had them handy and wasn't sure what sort of lighting arrangement I was going to be using when I wrote the code.

And I have disassembled the test jig. The segments are barely visible in certain light now (Butterfly powered off), whereas with a "new" Butterfly they are totally invisible. So there has been some permanent (probably) alteration, but at this point it is negligible.

Attachment(s): 

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

zbaird's signature:

Quote:
What would Scooby Doo?

Hoe Lang is een chinees

That's the Dutch version of yours, Chuck !

Interesting experiment. Although I am an EE, I couldn't predict the outcome. Like you say: 30 hours is short for a burn-in test.

Your program is called Butterfry.zip.
You cook them; I like them roasted :)

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips