EECS 203 Mailing List
Re: Quick Button Check code


Re: Quick Button Check code

From: Joseph Teno <j-teno_at_avoiding.spam>
Date: Sun May 25 2008 - 20:49:00 CDT

Unless a bit is set to low, the subroutine just returns back to where it was
called from. If any button were depressed, then it moves to Gotanybutton,
which brings it back to Initialization. It doesn't replace the get button
loop, but acts the same way for the part when the lock has been opened. We
called it a "quick check" or something to see if anything was pressed. Call
it every time the light moves.

On 5/25/08, Byron Cheng <Byron@u.northwestern.edu> wrote:
>
> Hey guys, in class we did a bit of coding for "quick button check" but I
> can't seem to recall why we did it. This was the code I copied down,
>
>
>
> Quickbuttoncheck
>
>
>
> Btfss s2_reg, s2_bit
>
> Goto gotanybutton
>
>
>
> Btfss s3_reg, s3_reg
>
> Goto gotanybutton
>
>
>
> Return
>
>
>
> Gotanybutton
>
> Call wait_button_release
>
> Goto label before turning LED's on (which I assume is, in button.asm,
> main_loop)
>
>
>
> This replaced the get button loop I think? but from what I understand, all
> this does is just listens for a button press and goes on. I can't seem to
> think of how that is useful in the context of the code.
>
>
>
> _______________________________________
>
> Byron Cheng
>
> byron@u.northwestern.edu
>
> byroncheng@gmail.com
>
>
>
Received on Sun May 25 20:49:00 2008

This archive was generated by hypermail 2.1.8 : Sat Aug 23 2008 - 21:08:11 CDT