I've been working on an application using two 28x2 (great little chips!) in master-slave configuration. Programming works great. But I've been scratching my head as to how to solve this final problem.
The master runs a program which can take different setting parameters. Whenever I want to change the settings, I find myself reloading the entire program. At the moment the settings are entered as constants. But it is set up so that it can read the settings from EEPROM. Trouble is, I haven't figured out how I can change the EEPROM data without overwriting the program. As I understand the EEPROM directive, it would write the data, but clear any existing programming.
It's not a huge problem. But is would make changes quicker. And it would make the application more robust if end users can be guaranteed not to tinker with the programming or accidentally change the wrong settings (I have MANY, most of which should be left alone as constants).
Does anyone know of a method I can use?
Just as a quick aside. In this master-slave configuration, I tried temporarily swapping the master-slave roles to do some calibrations. That didn't work out, they lost communication. Is there a reason one should not be able to re-assign roles on the fly? Or did I just not get the programming right. I realize I didn't post the code, I'll work that out if the role-reversal is possible.
John
The master runs a program which can take different setting parameters. Whenever I want to change the settings, I find myself reloading the entire program. At the moment the settings are entered as constants. But it is set up so that it can read the settings from EEPROM. Trouble is, I haven't figured out how I can change the EEPROM data without overwriting the program. As I understand the EEPROM directive, it would write the data, but clear any existing programming.
It's not a huge problem. But is would make changes quicker. And it would make the application more robust if end users can be guaranteed not to tinker with the programming or accidentally change the wrong settings (I have MANY, most of which should be left alone as constants).
Does anyone know of a method I can use?
Just as a quick aside. In this master-slave configuration, I tried temporarily swapping the master-slave roles to do some calibrations. That didn't work out, they lost communication. Is there a reason one should not be able to re-assign roles on the fly? Or did I just not get the programming right. I realize I didn't post the code, I'll work that out if the role-reversal is possible.
John