LCD display

Dependents:   LAB05_Oppgave4

Fork of LCDLib by Rune Langoy

TextLCD.h

Committer:
rlanghbv
Date:
2015-09-20
Revision:
3:d2f70de20dbe
Parent:
2:f0a520c95838
Child:
4:264d9b06bf60

File content as of revision 3:d2f70de20dbe:

/*
 * LCD.h
 *
 * Created: 20.01.2012 13:05:14
 *  Author: rul
 */ 
#ifndef LCD_H_
#define LCD_H_
class TextLCD : public Stream 
{
public:

 //Enables the LCD Module for use 2-Lines...
     TextLCD(PinName rs,PinName rw, PinName e, PinName d4, PinName d5,
                 PinName d6, PinName d7) ;
    // EN = 1 for L-to-H /
    // EN = 0 for H-to-L
    // Causes the LCD-module to read the data on the data input pins
    void pulseEn();
    
    //Writes the low lible of data to the LCD-module data pins D4 to D7
    void writeLcdBitD4toD7(char );
    
    //Writes the byte comand to the LCD-module using 4 bits mode
    void lcdComand(unsigned char);
    
    //Writes charecters to the LCD display
    void lcdData(unsigned char);
    
    //Enable 4 bit mode  From KS0066U Documentation
    void init_4BitMode2LinesDisplayOn();
  
    
    //Moves cursor to the X,Y position
    void gotoxy(int , int );
    
    //Writes a string to the LCD Display
    void lcd_print(char *);
    
protected:
    // Stream implementation functions
    virtual int _putc(int value);
    virtual int _getc();
    
    DigitalOut LCD_RS,LCD_RW,LCD_EN;
    DigitalOut LCD_D4,LCD_D5,LCD_D6,LCD_D7;

    
};

#endif /* LCD_H_ */