Last active
March 13, 2018 06:28
-
-
Save SaheblalBagwan/b1087ae6b897c9815e0d59f410039ae1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pic16f877a.h> | |
#include "uart.h" | |
#include "eeprom.h" | |
/* start the main program */ | |
int main() | |
{ | |
unsigned char eeprom_address = 0, write_char, read_char; | |
UART_Init(9600); | |
for(write_char='A';write_char<='Z';write_char++) | |
{ | |
UART_Printf("\n\rEeprom Write: %c ",write_char); //Print the message on UART | |
EEPROM_WriteByte(eeprom_address, write_char); // Write the data at memoryLocation 0x00 | |
read_char = EEPROM_ReadByte(eeprom_address); // Read the data from memoryLocation 0x00 | |
UART_Printf("Eeprom Read: %c",read_char); //transmit the data read from Eeprom | |
} | |
while (1); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment