LCD display
Fork of LCDLib by
Diff: TextLCD.cpp
- Revision:
- 20:5ab883d81a20
- Parent:
- 17:5ffb16966db2
diff -r 5ffb16966db2 -r 5ab883d81a20 TextLCD.cpp --- a/TextLCD.cpp Mon Sep 21 10:17:51 2015 +0000 +++ b/TextLCD.cpp Thu Oct 15 15:59:36 2015 +0000 @@ -24,17 +24,17 @@ init_4BitMode2LinesDisplayOn(); //enabler 4 bit mode wait_ms(1); - lcdComand(0x00); + lcdCommand(0x00); wait_us(100); - lcdComand(0x28);//(0b0010 1000); // 4- bit mode LCD 2 line 16x2 Matrix + lcdCommand(0x28);//(0b0010 1000); // 4- bit mode LCD 2 line 16x2 Matrix wait_us(100); - lcdComand(0x01); //(0b00000001); + lcdCommand(0x01); //(0b00000001); wait_us(100); - lcdComand(0x06);//(0b00000110); + lcdCommand(0x06);//(0b00000110); wait_us(100); - lcdComand(0xC);//(0b0000 1100); + lcdCommand(0xC);//(0b0000 1100); wait_us(100); } @@ -86,17 +86,17 @@ writeLcdBitD4toD7(0xC);//(0b1100); // 2 Lines + Disp On pulseEn(); //LCD exec function - lcdComand(0x01); // Clear Display + lcdCommand(0x01); // Clear Display wait_ms(3); - lcdComand(0x28); // Function set 001 BW N F - - - lcdComand(0x06); // Cursor Direction and Display Shift : 0000 01 CD S (CD 0-left, 1-right S(hift) 0-no, 1-yes - lcdComand(0x0C); // Dispon + Hide cursor + lcdCommand(0x28); // Function set 001 BW N F - - + lcdCommand(0x06); // Cursor Direction and Display Shift : 0000 01 CD S (CD 0-left, 1-right S(hift) 0-no, 1-yes + lcdCommand(0x0C); // Dispon + Hide cursor wait_us(100); } //Writes the byte comand to the LCD-module using 4 bits mode -void TextLCD::lcdComand(unsigned char cmd) +void TextLCD::lcdCommand(unsigned char cmd) { writeLcdBitD4toD7(cmd>>4); //Write the first high cmd nibble @@ -131,7 +131,7 @@ void TextLCD::gotoxy(int x, int y) { unsigned char firstCharAdr[]= { 0x80,0xc0,0x94,0xD4}; - lcdComand(firstCharAdr[y-1]+ x -1); + lcdCommand(firstCharAdr[y-1]+ x -1); wait_us(100); }