11 years, 5 months ago.

LCD 16x2 power off problem with mbed microcontroller & mosfet

/media/uploads/weebeng/mosfet.jpg

The aim for my project is to completely turn off the power of the LCD display when my switch is open.
My problem was that the LCD did not turn off completely, the LED of the LCD are slightly on. When i check the voltage using a voltmeter across VCC,GND and LED+,LED- of the LCD pin, it shows around 2V.
My source voltage are supplied from an external regulated 5V DC source output.
I'm using a standard 5V 16x2 HD44780 LCD display driver.
Px is a digitalIn pin which i use as an argument.

Your help will be much appreciated, thanks!

#include "mbed.h"
#include "TextLCD.h"

DigitalIn enable(p5); 
TextLCD lcd(p15, p16, p17, p18, p19, p20);

int main() {
    enable.mode(PullDown);
    while(1) {
        if(enable) {
        lcd.locate(0,0);
        lcd.cls();
        lcd.printf("HelloWorld\n");
        }
        wait(1);
    }
}

1 Answer

11 years, 5 months ago.

There is two power to LCD a) LCD Backlit b) The LCD itself (for the text)

The backlit can be controlled via one of the DigitalOut pin rather than 3.3V/5V. In this way, you can completely switch off the LCD