Specifications
}
/* clear the rest of line 1 and line 2 */
if(line == 0){
while(counter < NO_COL){
counter++;
putch(' ');
}
gotoxy(1,0);
counter = 0;
while(counter < NO_COL){
counter++;
putch(' ');
}
} else {
counter = counter - NO_COL;
while(counter < NO_COL){
counter++;
putch(' ');
}
}
}
/* prints the text at the co-ordinates x,y */
void printxy(unsigned char x, unsigned char y, char *text)
{
gotoxy(x,y);
print(text);
}
/* usec delay */
void delay2(int clks)
{
clks = clks * 4;
while ( clks )
{
clks--;
}
}
/* The initialise function of the LCD */
void initialise_lcd(void)
{
/* setup the port */
PORTE = 0x40;
DDRE = 0x9F;
control (0x03); //intitialise
NutDelay(5);
control (0x03); //intitialise
delay2 (100);
control (0x03); //intitialise
delay2 (40);
control(0x02); // 4 bit
90










