EECS 203 Mailing List
Re: trouble with lab 7


Re: trouble with lab 7

From: Walter Han <walterhan2007_at_avoiding.spam>
Date: Tue May 27 2008 - 03:17:57 CDT

I had the same problem. In my code i just turned off all the LEDs instead of
turning on the very left.

On 5/27/08, David Bild <d-bild@u.northwestern.edu> wrote:
>
> Ya, I would make sure that you clear the C bit (bcf STATUS, C) in the
> init_for_loop code.
>
> -- David
>
> On 5/27/08, Hyerim Shin <hyerimshin2007@u.northwestern.edu> wrote:
>>
>> when I simulate my program, and when it executes the part where there is
>> a cycling light to the right, it shows weird phenomenon
>>
>> it shows
>> '10000000' '11000000' '01100000' '00110000' '00011000'
>> '00001100' '00000110' '00000011'
>>
>> and then it works fine
>> '10000000' '01000000' '00100000'
>> '00010000' '00001000' '00000100' '00000010' '00000001'
>>
>> how do i fix this?
>> I think that there is something wrong with C......maybe
>>
>>
>> ;===========================================================================
>> init_for_loop
>> ;turn on the very left LED
>> movlw 0x80
>> movwf LED_REG
>>
>> ;===========================================================================
>> light_rotation
>> ;shift to right
>> rrf LED_REG, 1
>> call quick_button_check
>>
>> btfss LED_REG, 0
>> goto light_rotation
>>
>> goto init_for_loop
>>
>
>
Received on Tue May 27 03:17:57 2008

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