LCD display
Fork of LCDLib by
TextLCD.h@1:8902f6be12a5, 2015-09-20 (annotated)
- Committer:
- rlanghbv
- Date:
- Sun Sep 20 10:36:08 2015 +0000
- Revision:
- 1:8902f6be12a5
- Child:
- 2:f0a520c95838
Changed to .cpp class lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rlanghbv | 1:8902f6be12a5 | 1 | /* |
rlanghbv | 1:8902f6be12a5 | 2 | * LCD.h |
rlanghbv | 1:8902f6be12a5 | 3 | * |
rlanghbv | 1:8902f6be12a5 | 4 | * Created: 20.01.2012 13:05:14 |
rlanghbv | 1:8902f6be12a5 | 5 | * Author: rul |
rlanghbv | 1:8902f6be12a5 | 6 | */ |
rlanghbv | 1:8902f6be12a5 | 7 | #ifndef LCD_H_ |
rlanghbv | 1:8902f6be12a5 | 8 | #define LCD_H_ |
rlanghbv | 1:8902f6be12a5 | 9 | class TextLCD : public Stream |
rlanghbv | 1:8902f6be12a5 | 10 | { |
rlanghbv | 1:8902f6be12a5 | 11 | public: |
rlanghbv | 1:8902f6be12a5 | 12 | |
rlanghbv | 1:8902f6be12a5 | 13 | //Enables the LCD Module for use 2-Lines... |
rlanghbv | 1:8902f6be12a5 | 14 | TextLCD(); |
rlanghbv | 1:8902f6be12a5 | 15 | // EN = 1 for L-to-H / |
rlanghbv | 1:8902f6be12a5 | 16 | // EN = 0 for H-to-L |
rlanghbv | 1:8902f6be12a5 | 17 | // Causes the LCD-module to read the data on the data input pins |
rlanghbv | 1:8902f6be12a5 | 18 | void pulseEn(); |
rlanghbv | 1:8902f6be12a5 | 19 | |
rlanghbv | 1:8902f6be12a5 | 20 | //Writes the low lible of data to the LCD-module data pins D4 to D7 |
rlanghbv | 1:8902f6be12a5 | 21 | void writeLcdBitD4toD7(char ); |
rlanghbv | 1:8902f6be12a5 | 22 | |
rlanghbv | 1:8902f6be12a5 | 23 | //Writes the byte comand to the LCD-module using 4 bits mode |
rlanghbv | 1:8902f6be12a5 | 24 | void lcdComand(unsigned char); |
rlanghbv | 1:8902f6be12a5 | 25 | |
rlanghbv | 1:8902f6be12a5 | 26 | //Writes charecters to the LCD display |
rlanghbv | 1:8902f6be12a5 | 27 | void lcdData(unsigned char); |
rlanghbv | 1:8902f6be12a5 | 28 | |
rlanghbv | 1:8902f6be12a5 | 29 | //Enable 4 bit mode From KS0066U Documentation |
rlanghbv | 1:8902f6be12a5 | 30 | void init_4BitMode2LinesDisplayOn(); |
rlanghbv | 1:8902f6be12a5 | 31 | |
rlanghbv | 1:8902f6be12a5 | 32 | |
rlanghbv | 1:8902f6be12a5 | 33 | //Moves cursor to the X,Y position |
rlanghbv | 1:8902f6be12a5 | 34 | void gotoxy(unsigned char , unsigned char ); |
rlanghbv | 1:8902f6be12a5 | 35 | |
rlanghbv | 1:8902f6be12a5 | 36 | //Writes a string to the LCD Display |
rlanghbv | 1:8902f6be12a5 | 37 | void lcd_print(char *); |
rlanghbv | 1:8902f6be12a5 | 38 | |
rlanghbv | 1:8902f6be12a5 | 39 | protected: |
rlanghbv | 1:8902f6be12a5 | 40 | // Stream implementation functions |
rlanghbv | 1:8902f6be12a5 | 41 | virtual int _putc(int value); |
rlanghbv | 1:8902f6be12a5 | 42 | virtual int _getc(); |
rlanghbv | 1:8902f6be12a5 | 43 | }; |
rlanghbv | 1:8902f6be12a5 | 44 | |
rlanghbv | 1:8902f6be12a5 | 45 | #endif /* LCD_H_ */ |