LCD display
Fork of LCDLib by
Diff: TextLCD.cpp
- Revision:
- 3:d2f70de20dbe
- Parent:
- 2:f0a520c95838
- Child:
- 4:264d9b06bf60
diff -r f0a520c95838 -r d2f70de20dbe TextLCD.cpp --- a/TextLCD.cpp Sun Sep 20 10:42:51 2015 +0000 +++ b/TextLCD.cpp Sun Sep 20 11:06:45 2015 +0000 @@ -6,7 +6,6 @@ */ #include "mbed.h" -#include "LCD_IO_MAP.h" #include "TextLCD.h" #define SET_EN() (LCD_EN=1) @@ -19,7 +18,27 @@ //Enables the LCD Module for use 2-Lines... -TextLCD::TextLCD() +/*TextLCD::TextLCD() +{ + CLEAR_EN(); //EN =0 + wait_ms(500); + + init_4BitMode2LinesDisplayOn(); //enabler 4 bit mode + wait_us(100); + + lcdComand(0x28);//(0b0010 1000); // 4- bit mode LCD 2 line 5x7 Matrix + wait_us(100); + lcdComand(0xE);//(0b0000 1110); //Hva gjør vi her ? + wait_us(100); + lcdComand(0x01); //(0b00000001); //Hva gjør vi her ? + wait_us(100); + lcdComand(0x06);//(0b00000110); //Hva gjør vi her ? + wait_us(100); +}*/ + +TextLCD::TextLCD(PinName rs,PinName rw, PinName e, PinName d4, PinName d5, + PinName d6, PinName d7) : LCD_RS(rs),LCD_RW(rw), + LCD_EN(e), LCD_D4(d4), LCD_D5(d5), LCD_D6(d6), LCD_D7(d7) { CLEAR_EN(); //EN =0 wait_ms(500); @@ -38,6 +57,10 @@ } + + + + // Causes the LCD-module to read the data on the data input pins void TextLCD::pulseEn() {