I was looking @ this tutorial about RRF and RLF commands.
http://www.mstracey.btinternet.co.uk/pictutorial/progtut9.htm
Of greatest interest is the section where it demonstrates how the bit moves through the files.
My problem is two fold:
I am doing the program almost just as is given in the example that I linked to. However, it doesn't clear the bit behind it as what I've put above in the code tags would indicate. It leaves the bit behind it set (IE: LED's all stay on). The same happens if I start by setting bit 7 on PORTB and RRF (just in the opposite direction, of course).
The second issue:
The bit isn't rotating through carry. The tutorial indicates that if you rotate the file all the way through carry, and then tell it "RLF PORTB,1" again, it should come back to bit 0. Now, this may be actually working, its just that I can't tell because of all of the bits staying set.
http://www.mstracey.btinternet.co.uk/pictutorial/progtut9.htm
Of greatest interest is the section where it demonstrates how the bit moves through the files.
Rich (BB code):
Just demonstration of what I understand the code to do, not the actual code of course:
C 76543210
0 00000001
RLF 0 00000010
RLF 0 00000100
RLF 0 00001000
RLF 0 00010000
RLF 0 00100000
RLF 0 01000000
RLF 0 10000000
RLF 1 00000000
RLF 0 00000001
I am doing the program almost just as is given in the example that I linked to. However, it doesn't clear the bit behind it as what I've put above in the code tags would indicate. It leaves the bit behind it set (IE: LED's all stay on). The same happens if I start by setting bit 7 on PORTB and RRF (just in the opposite direction, of course).
The second issue:
The bit isn't rotating through carry. The tutorial indicates that if you rotate the file all the way through carry, and then tell it "RLF PORTB,1" again, it should come back to bit 0. Now, this may be actually working, its just that I can't tell because of all of the bits staying set.
Last edited: