The code for this is fairly easy. The problem is, it's so easy, that it's hard to give you hints without doing the code for you. It may be ego gratifying for us to show how smart we are to eachothr (but we already know that), but it doesn't do YOU any good.
Your instructor doesn't want the ANSWERS - I'm sure he's got it. He wants YOU to work out the answer.
But I understand: You're stuck. What I don't understand is: Stuck where?
Post something - anything - to show where you are stuck, and then we can give hints to unstick you.
Without that, we are ROBBING
YOU of an eduction. We're here to give, not to take.
Here's are two hints:
You were right about the MOV.
Just what do you mean by "then reset itself"?
- Do you mean that while I:0/0 is (HIGH), T$:0 will time to 7 seconds over and over and over again?
- Or do you mean that it will time to 7 seconds, reset, and stop?
- Or do you mean that it will time to 7 seconds, but reset when I:0/0 goes (LOW)?
The three scenarios produce very different code. Which are you after?
Good luck!
(Tip on posting ladder here: First put down the vBcodes
[LADDER ] and
[/LADDER ] (without the extra space in the bracket, and with a blank lines between). In the space between, use dashes, spaces, pipes (the '|' symbol), and anything other charactor to make it look exactly as you want. You don't have to draw the full box for a timer - --(T4:0 7sec)- will do nicely.
When you're done - Preview Reply, just to check it out.
If you don't use the vBcodes, anything over two consecutive spaces gets reduced to one, and your post looks like -- not good.)