Would you have to watch out for the carry? ----- Original Message ----- From: "Sean Schouten" To: "piclist" Sent: Thursday, January 05, 2006 5:00 PM Subject: [PIC] Problems with RRF on PIC16F684 > 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 > > > MAIN > > NOP > MOVF TEMP_VAR, W > RRF TEMP_VAR > > GOTO MAIN > > [/code] > > > What I want to happen is this: > > 11111111 > 01111111 > 10111111 > 11011111 > 11101111 > 11110111 > > etc.... > > > What happens is more like: > > 11111111 > 01111111 > 10000000 > 11000000 > 11000001 > 11100001 > 11100010 > > > Does anybody have any idea what could be going wrong, because I am really > lost. > > Thanks, > > Sean. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist