Sign in to follow this  
Followers 0
BITS N BYTES

CJ1M INTERRUPT COUNTING

4 posts in this topic

I cannot get the CNT instruction to work within an interrupt. The CNT input is conditioned with the ALWAYS ON FLAG [CF113]. Though the Instruction Set manual states that the CNT instruction CAN be used within an interrupt I am baffled how to make it work. Using a statement |+[400] D0 #0001 D0| appears to work fine!! I just cannot get the CNT to work. HELP!!

Share this post


Link to post
Share on other sites
I am baffled why you would need a CNT instruction in an interrupt subroutine. Why not us +B?

Share this post


Link to post
Share on other sites
The CNT instruction looks for a positive edge to trigger on. An always on contact has no such transition.

Share this post


Link to post
Share on other sites
Thanks for the explanation. Guess I will stick with the ++(590) [binary increment] or +(400) [binary addition].

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0