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 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 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now