Skip to content

Instantly share code, notes, and snippets.

@SaheblalBagwan
Created May 18, 2016 07:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaheblalBagwan/fbe889e4d93ee9b2af5ccc1e5a03e7f7 to your computer and use it in GitHub Desktop.
Save SaheblalBagwan/fbe889e4d93ee9b2af5ccc1e5a03e7f7 to your computer and use it in GitHub Desktop.
unsigned char EEPROM_ReadByte(unsigned char eepromAddress)
{
while(RD || WR); // check the WR&RD bit to see if a RD/WR is in progress
EEADR=eepromAddress; // Write the address to EEADR.
RD = 1; // Set the RD bit to trigger the eeprom read operation.
return(EEDATA); // Return the data read form eeprom.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment