> What I want to happen is this: > > 11111111 > 01111111 > 10111111 > 11011111 > 11101111 > 11110111 I tried this in MPLAB movlw 0xff movwf temp_var clrc main nop movf temp_var,w rrf temp_var goto main and do get what you want - a rotating 0. clrc before 'main' guarantees this. If you don't use clrc it's 50:50, depending on the status of C before you start. Effectively you have a 9-bit shift register, and if all bits are 1, they'll stay 1, no matter how many rotates you do I have absolutely no idea how you get this 11111111 01111111 10000000 11000000 11000001 11100001 11100010 Something else is going on. It doesn't appear to be random, but it's not entirely a repeating shift effect either -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist