[SOLVED] Internal EEPROM ( PIC16F877A ) using microchip xc8 compiler

Status
Not open for further replies.

bhoobalan

Member level 1
Joined
Dec 28, 2013
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Visit site
Activity points
280
Hi friends,
I want to store LED values in Internal EEPROM using PIC16F877a in microchip xc8 compiler in c codes. I am struggling to do it. Pls help me with example c codes with circuit diagram along with simulation result.
 

If you look in the include directory of the compiler you will see a header file 'eeprom_routines.h'
In it you will find function prototypes:

/* library function versions */
extern void eeprom_write(unsigned char addr, unsigned char value);
extern unsigned char eeprom_read(unsigned char addr);

If you include 'xc.h' in your program, this header file is loaded.
So read write eeprom functions are available for you to use supplied by the compiler.
 

Thanks for the reply btbass
i can't able to find it..........
will u pls post the c code for xc8 compiler .............
 

You just need to include <xc.h>
Then you can use the functions anywhere in your program.

eeprom_write(unsigned char addr, unsigned char value);
unsigned char eeprom_read(unsigned char addr);
 

Thanks friends,,,,,,,,,,,,,,
Got the output...........
Good work........
I love this forum.........
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…