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

Mar 12, 2010 3 Replies

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


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??

google is your friend

formatting link

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required