On January 5, 2006 05:00 pm, Sean Schouten wrote: > Hi guys, > > What seems to be no more than perhaps a simple logical operation > seems to defy my logic. > > Using the following code in a small loop, I don't seem to be getting > the desired-output when monitoring the W-Register: > > [code] > > START > > MOVLW 0xFF > MOVWF TEMP_VAR ;where is TEMP_VAR located? clrc ;clear the carry bit (bcf status,c) > MAIN > > ;not needed unless you want to waste time NOP > MOVF TEMP_VAR, W ;just watching, not needed > RRF TEMP_VAR, F ;no guessed destination > > GOTO MAIN > > [/code] > > > What I want to happen is this: > > 11111111 > 01111111 > 10111111 > 11011111 > 11101111 > 11110111 > > etc.... > > > What happens is more like: > > 11111111 > 01111111 ;okay so far... > 10000000 ;if "stepping" find this hard to believe > 11000000 > 11000001 > 11100001 > 11100010 > > > Does anybody have any idea what could be going wrong, because I am > really lost. Where is your TEMP_VAR located? It should not be a special location like a port or anything hardware related, but simply a plain register. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist