Instruction spec (8) of PIC16 series

Instruction set

RRF Rotate Right f through Carry [label]RRFf, d ( label is omitable, shows SPACE code ) f : Register file addesss ( 00(00h) to 127(7Fh) ) d : Destination select ( 0 or 1 ) It moves the contents of the f register to the 1-bit right including the carry bit. d = 0 : store result in W d = 1 : store result in f It sets the least significant bit of the f register to C. 1 cycle

SLEEP Go into stanby mode [label]SLEEP ( label is omitable, shows SPACE code ) None It stops a clock generator and it makes a processor a standby mode. It resets a watchdog timer. When using the prescaler for the watchdog timer, it resets the prescaler, too. It sets 1 to TO and it sets 0 to the PD. 1 cycle

SUBLW Subtract W from literal [label]SUBLWk ( label is omitable, shows SPACE code ) k : literal field ( 00(00h) to 255(FFh) ) It executes the subtraction of the contents of the W register from the literal data. In the actual calculation, it changes the content of the W register by the 2's complement and it adds with the literal data. (EX) C=1, Z=0 ( Result is positive ) C=1, Z=1 ( Result is zero ) C=0, Z=0 ( Result is negative ) 1 cycle

SUBWF Subtract W from f [label]SUBWFf, d ( label is omitable, shows SPACE code ) f : Register file addesss ( 00(00h) to 127(7Fh) ) d : Destination select ( 0 or 1 ) It executes the subtraction of the contents of the W register from the f register. d = 0 : store result in W d = 1 : store result in f In the actual calculation, it changes the content of the W register by the 2's complement and it adds with the contents of the f register. (EX) C=1, Z=0 ( Result is positive ) C=1, Z=1 ( Result is zero ) C=0, Z=0 ( Result is negative ) 1 cycle

Next instructions