Storing Calibration Data
steprog
Posts: 227
Hello Guys,
I find that I need to store calibration data into the eeprom when I reset or turn off the prop.· Is there a good way to do that?· I only have a 32k eeprom in my system.· Is there a way I can reserve a block of memory and then write back and forth into this?·
Thanks,
Greg
I find that I need to store calibration data into the eeprom when I reset or turn off the prop.· Is there a good way to do that?· I only have a 32k eeprom in my system.· Is there a way I can reserve a block of memory and then write back and forth into this?·
Thanks,
Greg
Comments
Remember, the EEPROM is completely copied into HUB-RAM at boot-time. As variables are reserved during compilation they have a fixed place in HUB-RAM/EEPROM. If you overwrite the value in EEPROM it will immediately be there after boot - no need to read it by yourself.
Thanks,
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Thanks,
Greg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
Have you used this? I was looking it over tonight. I wont have time to switch to 64k eeprom however. I'm hopping to be able to define a block of memory where I can write calibration data that automatically gets brought back on reset. These would be simple variables nothing fancy here.
Greg
Yes but I'm using this as a boiler-plate for my own project. Just remembered. Is this what you're looking for? http://forums.parallax.com/forums/default.aspx?f=25&m=219237
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
It may be a bit overkill for your project if you only have a single profile of calibration settings or only a few settings. But the object also has read and write methods that could be used for stand alone processes, this may be more of what you are looking for. If you need to store a stack or string it will manage them across the EEPROM sectors; or just write and read byte/word/long size sections of the EEPROM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
I got lots of sources and things to look at.· I can't believe how great you fellas are when it comes to helping everyone out.· I hope someday I will get wise enough to return the favor.· Have a happy 4th everyone.
Thanks Again,
Greg
I looked through the settings.spin and there is alot of stuff not needed.· One routine PUB commit | addr seems like what you must have used.· Did you just strip everything else away?
Greg
I looked through this object and it's a nice piece of work.· All I need is just 20 or 30 varables to store that I can bring back on reboot.· Im still a bit weak with spin however.· One question, how do you know where your putting these values in memory.· I only have the 32k eeprom and I need to make sure I'm putting the data in a known block where I don't overwrite my code.
Greg
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!