
//----------------------------------------------------------------------
//putchar function
//-------------------------------------------------------------------------
char putchar(char c)
	{
	  	unsigned char line;
		if (c=='n')
			{
		  	  line=ReadInstrReg();
		  		if (line & LINE2_ADDR)
		  		{
		    	  WriteInstrReg (LINE1_ADDR | DD_RAM_PTR);
				  LCD_Delay(LCD_100us);						//wait for 100us
		  		}
		  		else 
		  		{
		    	  WriteInstrReg (LINE2_ADDR | DD_RAM_PTR);
				 LCD_Delay(LCD_100us);						//wait for 100us
		  		}
			}
		else
		{
		  WriteDataReg (c);
		  LCD_Delay(LCD_100us);						//wait for 100us
		}
		return (c);
	}
