electronbas Posted May 5, 2014 Report Share Posted May 5, 2014 Hi, I'm unable to get back my counter value after power fail cycle. i have attached code img here, help me on this Thanks Baskar Quote Link to comment Share on other sites More sharing options...
Michael_P Posted May 5, 2014 Report Share Posted May 5, 2014 Hi Baskar, If you are using a HSC with reload you will not be able to directly manipulate the value of the counter. You can perform the same actions as you are: however you will need to sore the actual HSC into a buffer. You will need to account for the value that is retained within the HSC, You can store this into a new buffer and subtract to generate a home of 0. You can also trigger the reload event of the HSC. You can then add t he new counts (MI0 = Buffer MI = actual counts) It is because we cannot directly store into the HSC register that prohibits the operation you have shown. Please let us know of this helps. Thanks Quote Link to comment Share on other sites More sharing options...
electronbas Posted May 7, 2014 Author Report Share Posted May 7, 2014 Hi michael, Thanks for your kind response, i did mistake in my code now its okay. Thanks Baskar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.