Tinkering with the display

Libraries, utilities, bootloaders...

Tinkering with the display

Postby Sorunome » Sat Aug 20, 2016 4:26 pm

Ever thought stuff like "What if I abuse the screen?" "What if I keep changing contrast?" "What if I keep turning it on and off?"

Well, at least i thought that stuff and went ahead to try it out!

Below I assume I already filled the screen with black.

DISCLAIMER: Trying these code snippets might break your screen!

So let's try first turning on and off in an infinite loop. Unfortunately that didn't yield any result, the screen was only white. So I went ahead to add delay(1); in between each one to see what is happening. Well, then funny flickering horizontal lines appeared (They look cooler IRL).
Sketch:
Code: Select all
#include <SPI.h>
#include <Gamebuino.h>
Gamebuino gb;

    void setup(void) {
      gb.begin();
      gb.display.setColor(BLACK);
      gb.display.fillRect(0,0,84,48);
      gb.display.update();
      noInterrupts();
    }

    void loop(void) {
     
        gb.display.command(PCD8544_FUNCTIONSET | PCD8544_EXTENDEDINSTRUCTION);
        gb.display.command(PCD8544_SETVOP | 0x7f);
     
      while(1){
        gb.display.command(PCD8544_FUNCTIONSET | 4);
        delay(1);
        gb.display.command(PCD8544_FUNCTIONSET);
        delay(1);
      }
    }


Result:



Now that wasn't too exciting, pretty boring. So I went ahead and wrote a sketch which keeps on switching the contrast between min/max. This also needed some fine-tuned delays but the result was just a gray screen. booooring, we want more exciting stuff!

So, how about we combind turning the screen of/on with setting the contrast to max/min? Well, now THAT is something way more interesting (and aaaawesome looking!)
Sketch:
Code: Select all
#include <SPI.h>
#include <Gamebuino.h>
Gamebuino gb;

    void setup(void) {
      gb.begin();
      gb.display.setColor(BLACK);
      gb.display.fillRect(0,0,84,48);
      gb.display.update();
      noInterrupts();
    }

    void loop(void) {
     
        gb.display.command(PCD8544_FUNCTIONSET | PCD8544_EXTENDEDINSTRUCTION);
        gb.display.command(PCD8544_SETVOP | 0x7f);
     
      while(1){
        gb.display.command(PCD8544_FUNCTIONSET | 4);
        gb.display.command(PCD8544_FUNCTIONSET | PCD8544_EXTENDEDINSTRUCTION);
        gb.display.command(PCD8544_SETVOP | 0x7f);
        gb.display.command(PCD8544_FUNCTIONSET | PCD8544_EXTENDEDINSTRUCTION);
        gb.display.command(PCD8544_SETVOP | 0);
      }
    }

Result:

As I said, probably not too healthy :P
Interestingly enough, that horizontal line appears on a random row when starting the program, and only if it is in the lower part of the screen it yields that cool particle effect.

Unfortunately I couldn't find any neat effects playing around with the voltage and thelike.
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Tinkering with the display

Postby agentavacado » Sun Aug 21, 2016 2:59 am

Thanks! If my gamebuino ever misbehaves, I'll know exactly what to do! ;)
agentavacado
 
Posts: 19
Joined: Thu Jun 25, 2015 12:50 am

Re: Tinkering with the display

Postby jonnection » Sun Aug 21, 2016 3:33 pm

I've killed a couple of these screens by using out-of-bounds values for contrast.

It is not just a simple "contrast" setting. It is the voltage for some control circuit that in my experience will get fried if you abuse it too much.

Just so you know. This is really a way to brick the screen.
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: Tinkering with the display

Postby Sorunome » Sun Aug 21, 2016 10:11 pm

jonnection wrote:I've killed a couple of these screens by using out-of-bounds values for contrast.

It is not just a simple "contrast" setting. It is the voltage for some control circuit that in my experience will get fried if you abuse it too much.

That is why you check documentations ;) http://skpang.co.uk/catalog/images/lcd/ ... CD5110.pdf
Both contrast and voltage settings require the additional commands.
On recieving the next byte:
When the most-significant bit is 1 it uses it as a voltage, which happens when you use larger values
Just so you know. This is really a way to brick the screen.

Yup, i know, thanks, thus the large disclaimer ^.^

I wanted to toy around to see if I could find interesting stuff, for example on the TI-84+ screens it is possible to achive blue pixels with this kind of stuff. (it also only has a b/w screen)
User avatar
Sorunome
 
Posts: 629
Joined: Sun Mar 01, 2015 1:58 pm

Re: Tinkering with the display

Postby jonnection » Tue Aug 23, 2016 3:21 pm

I know you know

I am just saying that others should take that warning seriously. The lcd will not tolerate a voltage above the spec.

Actually, i had a couple of screens with a lousy contrast. So i "tickled" them a little bit with high vop and it killed them totally.

So I can verify what you are saying.
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm


Return to Software Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron