MCC18 / PIC C18 - how to write to internal EEPROM?

I'm new to C and am trying to write a byte to the internal EEPROM in a

18F45k20.

I've done this in the past using assembly but now I'm working in C I figure there should be a function for doing this.

I've found reference to write_b_eep and read_b_eep on the net but cannot see any reference to these in the MPLAB C18 Compiler Libraries documentation.

What is the way to approach this?

thanks

Reply to
Royston Vasey
Loading thread data ...

ok - I tried the following:

Write_b_eep(0,my_var); //code to save my_var to eeprom

Looking at the EEPROM memory at location 0x00 is not changed.

It compiles fine and during execution I can see the code jump into the Write_b_eep function located in write_b.c

Is there some documentation somewhere that will help me with this function??

Reply to
Royston Vasey

google is your friend

formatting link

hamilton

Reply to
hamilton

Thanks hamilton, google threw me a couple of dud results....your suggested link works great. At the learning stage I'm at, discerning the crap from the good is difficult.

Thanks

Reply to
Royston Vasey

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.