void EEPROM_Normal()
{
EECON=0x00;	//Allow usage of EPROM
AUXR=0x0C;	//Restore normal R/W Cycles						  
}

void EEPROM_Write()
{
EECON=0x54;	//Programming
EECON=0xA4;	//Sequence
Delay(5);		//Delay to give the EEBUSY time to rise
while((EECON==0xA5)|(EECON==0x01));		//Wait till EEBUSY is off					 
EEPROM_Normal();	//Restore normal situation
}

void EEPROM_Read()
{
EECON=0x02;	//Access EPROM
AUXR=0x2C;	//Extend the Read cycles to accomidate for slow memory
}
