Convenience routines for an I"C connected LCD display. Handy things like taking cursor to home, positioning cursor, clearing display, writing strings etc
jtlcd.h@5:37e171e2035c, 2012-11-12 (annotated)
- Committer:
- jont
- Date:
- Mon Nov 12 16:08:54 2012 +0000
- Revision:
- 5:37e171e2035c
- Parent:
- 4:ce867009531a
Added some comments;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jont | 0:8f724a47a820 | 1 | |
jont | 0:8f724a47a820 | 2 | #ifndef jtlcd |
jont | 0:8f724a47a820 | 3 | #define jtlcd |
jont | 0:8f724a47a820 | 4 | |
jont | 0:8f724a47a820 | 5 | #define Slave 0x7c |
jont | 3:5744bf6006e1 | 6 | #define LCD_LINE_SIZE 16 |
jont | 2:5b220477045b | 7 | //#define Comsend 0x00 |
jont | 2:5b220477045b | 8 | //#define Datasend 0x40 |
jont | 4:ce867009531a | 9 | //write followed by spaces up to LCD_LINE_SIZE */ |
jont | 5:37e171e2035c | 10 | void LcdWriteTextLine(char *text); //auto fills with spaces to display length |
jont | 4:ce867009531a | 11 | //write followed by spaces up to numb */ |
jont | 3:5744bf6006e1 | 12 | void LcdWriteTextAndFill(char *text, int numb); |
jont | 5:37e171e2035c | 13 | void LcdWriteText(char *text); |
jont | 2:5b220477045b | 14 | void LcdInit(); |
jont | 2:5b220477045b | 15 | //void lcdclear(); |
jont | 2:5b220477045b | 16 | void test(); |
jont | 2:5b220477045b | 17 | void LcdHomeBottom(void); |
jont | 2:5b220477045b | 18 | |
jont | 2:5b220477045b | 19 | void write_E_port(unsigned char command,unsigned char data); |
jont | 0:8f724a47a820 | 20 | |
jont | 2:5b220477045b | 21 | void LcdClear(void); |
jont | 2:5b220477045b | 22 | void LcdHomeTop(void); |
jont | 2:5b220477045b | 23 | void LcdHomeBottom(void); |
jont | 2:5b220477045b | 24 | void LcdCursorLeft(void); |
jont | 2:5b220477045b | 25 | void LcdCursorRight(void); |
jont | 2:5b220477045b | 26 | void LcdSpace(void); |
jont | 2:5b220477045b | 27 | |
jont | 2:5b220477045b | 28 | void LcdCursorFlash(void); |
jont | 2:5b220477045b | 29 | void LcdCursorOff(void); |
jont | 2:5b220477045b | 30 | void LcdCursorNorm(void); |
jont | 2:5b220477045b | 31 | void LcdClearTop(void); |
jont | 2:5b220477045b | 32 | void LcdClearBottom(void); |
jont | 2:5b220477045b | 33 | |
jont | 2:5b220477045b | 34 | void LcdNSpace(int); |
jont | 2:5b220477045b | 35 | void LcdCursorNRight(int); |
jont | 2:5b220477045b | 36 | void LcdCursorNLeft(int); |
jont | 2:5b220477045b | 37 | void LcdPositionBottom(int); |
jont | 2:5b220477045b | 38 | void LcdPositionTop(int); |
jont | 2:5b220477045b | 39 | |
jont | 2:5b220477045b | 40 | //int LcdGetAddress(void); |
jont | 2:5b220477045b | 41 | void LcdSetAddress(int); |
jont | 2:5b220477045b | 42 | |
jont | 2:5b220477045b | 43 | |
jont | 0:8f724a47a820 | 44 | |
jont | 0:8f724a47a820 | 45 | |
jont | 0:8f724a47a820 | 46 | #endif |