Go Down

Topic: Dimming up Adafruit 1.4'' Display (Read 513 times) previous topic - next topic


Sep 14, 2016, 04:51 pm Last Edit: Sep 14, 2016, 04:52 pm by carguy

I am trying to "dim up" my Adafruit 1.44'' TFT display on power-up, using an Atmega1284P-PU's PWM function, i.e. the "Lite" pin of the display is connected to pin 15 of the Atmega.

For the most part, this is working quite well with the following code (irrelevant parts of code omitted):

Code: [Select]

void setup() {

  pinMode(displayDimmer, OUTPUT);
  analogWrite(displayDimmer, 0);

//Preparing Welcome Screen
  bmpDraw("mg-welc.bmp", 0, 0);

// Welcome Screen Fade In and Fade out
 int disp = 0;

  while (disp <= 255) {

    analogWrite(displayDimmer, disp);
    disp ++;


  while (disp >= 0) {

    analogWrite(displayDimmer, disp);
    disp --;

  analogWrite(displayDimmer, 255);


But the problem is that when I first power up the Atmega1284, it starts with a brightly lit white screen (with nothing on it).  I'd really like to have it so that it immediately starts with just a completely black screen at power-up, and then the welcome logo fades in.

How can I achieve that?


IO pins default to high impedance inputs after a reset. Add a pullup or pulldown resistor as needed for a low level or high level when the 1284 is not controlling the pin.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


I've just tried a 10K resistor, both as pull up and pull down, on the Lite pin of the display. The problem still persists :(


The Lite input already has a 2K2 pullup to 3.3V so you need a stronger pulldown. A pulldown value of 470 Ohm should work as this will bring the LED switching FET gate voltage down to about 0.6V. The line can still be driven with a PWM signal.
Formerly Rowboteer (now a broken user profile!)


Sep 15, 2016, 12:23 pm Last Edit: Sep 15, 2016, 12:24 pm by carguy
Thanks... perfect... it's working now. I didn't have any 470 Ohm resistors, so I tried a 510 one instead, as pull down, and it did the trick...

Go Up