# Pic16F877A eeprom to (system_variables)

Status
Not open for further replies.

#### Chilly

##### New Member
Using HiTech C. I have a program that has a 6 case menu. Each case displays system settings that are currently running. There's 4 buttons controlling
menu up, menu down, value up and value down which controls the 5 system variables.
I've added a case whereby I can save the current settings to eeprom. I'm also able to read back the settings. What I'd like to do is insert into system variables my settings. I have an if statement. Interrupt is setup. Something like,
Code:
                If button down{
change(system_variables) with (eeprom_settings) ;
}
I've tried searching but don't exactly know what I'm looking for. If someone could point me in the right direction.

Mike.

#### Chilly

##### New Member
Thanks Mike. It's late here and I probably didn't make myself clear. I have those routines and successfully write to and retrieve data to/from eeprom. No problem.
Where I'm stuck is how to convert the eeprom data back into a system variable. It seems like it would be simple as
if(!button_down){
}

I'm thinking I just answered my own question.

Last edited:

#### Pommie

##### Well-Known Member
I'm thinking I just answered my own question.
I think you did.

Mike.

#### Chilly

##### New Member
Mike,
I just tried it and it worked. Looking at what I needed to do helped a great deal. I'll chalk it up to old age.
Thanks.

Status
Not open for further replies.