??? 02/03/05 12:46 Read: times |
#86458 - solutions Responding to: ???'s previous message |
hi,
the answer depends on task of your application. For simplest way, as Erik has already said, save counters into part of RAM. RAM is not affected with reset. But just note that its contents is not defined at power-up so you need to determine this state correctly. It may be done with PowerON bit or by special bytes token placed in defined memory area. As well, after power off you lose values of counters so the position of motors is not defined. Another way already mentioned: use non-volatile memory (battery backed RAM, FRAM, EEPROM etc). There are some derivatives which has EEPROM built-in or support write to their flash. The possible problem is that due some malfunction you have a risk to keep wrong values that causes permanent displacement. Third way: do not use these counters in the whole. Just use four sensors (buttons), one for each direction, which is closed when max. position is reached. Then control their states to determine is it possible to move to the direction any more. Indeed, you may combine all these methods. Regards, Oleg |
Topic | Author | Date |
running code before reset!! | 01/01/70 00:00 | |
explain | 01/01/70 00:00 | |
What button? | 01/01/70 00:00 | |
to late | 01/01/70 00:00 | |
solutions | 01/01/70 00:00 | |
sort of | 01/01/70 00:00 | |
right ok | 01/01/70 00:00 | |
No, But | 01/01/70 00:00 | |
ill give the button a go | 01/01/70 00:00 | |
what is the problem? | 01/01/70 00:00 | |
Use nonvolatile memory | 01/01/70 00:00 | |
'Warm reset', 'Early power fail' | 01/01/70 00:00 | |
interesting | 01/01/70 00:00 | |
you can't teach old dogs new tricks | 01/01/70 00:00 | |
Hardware Reset? | 01/01/70 00:00 | |
bad idea | 01/01/70 00:00 | |
bad idea.......80% agree | 01/01/70 00:00 | |
May be is.. | 01/01/70 00:00 | |
hardware reset possible..![]() | 01/01/70 00:00 |