
//------------------------------------------------------------------------------------
//ReadInstrReg
//read from instruction register of LCD
//------------------------------------------------------------------------------------
static unsigned char ReadInstrReg(void)
	{
		unsigned char Instr;
		char SFRPAGE_SAVE = SFRPAGE;
		SFRPAGE = CONFIG_PAGE;
		DISPDATA=0xFF;	// set port for all inputs
		REGSEL=0;		// Select inst. register
		RDWR=  1; 		// read mode
		ENABLE=1;		// enable LCD
		_nop_();
		_nop_();
		ENABLE=0;		//disable LCD
		Instr=DISPDATA;	//read in the data
		SFRPAGE = SFRPAGE_SAVE;
		return(Instr);
	}
