LCD serial with shift register

One possibility to control a display saving pin ;)

/media/uploads/Suky/lcdserial.png

Example

#include "mbed.h"
#include "LCD_Serial.h"

DigitalOut myled(LED1);
LCDSerial myLcd(p13,p14,p15,p16); // Data, Clock, Enable, Back

int main() {
    char k=0;
    
    myLcd.printf("\fHello mbed! Library\nLCD serial with\nshift register\nby Suky...");
    myLcd.vSetBacklight(1);
    while(1) {
        myLcd.vGotoxy(20,4);
        myLcd.vPutc(k);
        if(++k==8){k=0;}
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}

» Import this programSerialLCD_example

LCD Serial with shift register

/media/uploads/Suky/imagen0059.jpg

Library

» Import this library into a programSerialLCD

LCD Serial with shift register





6 comments:

06 Feb 2011

Nice work..btw you have given 5V supply to shift register..won't it create problem with MBED ?

06 Feb 2011

user Vatsal Shah wrote:

Nice work..btw you have given 5V supply to shift register..won't it create problem with MBED ?

The display requires 5V to operate. In addition, a logical 1 must be greater than 4.5V, so the register must be fed with 5V. And there has been no problem with the mbed. USB can deliver up to 500mA depending on how you set the descriptor

15 Feb 2011

It works perfectly...thanks a lot..i am making LCD backpack PCB for the same..will share it..

17 Feb 2011

Great job ! I try the lib, and it works at once. Works with my old stock of 5Volt 2X16 LCD.

17 Feb 2011

Btw, I think you could move ENABLE and BACK to shift register and drive it serially, saving two port more at MBED......

14 Mar 2011

hi, i wanted to know how to modify clk for transmission. i am directly sending 9600 baud serial data to lcd..it is missing every alternate character.

Thank you, Vatsal