[Menu]>[Guide to use the PIC]


Instruction spec (7) of PIC16 series


Instruction set

RETFIEReturn from interrupt
Form [label]RETFIE
( label is omitable, shows SPACE code )
OperandsNone
Operation It returns from the interruption processing.
It sets the latest return address which is stored in the stack to the PC.
It sets the GIE bit of the INTCON register to 1 and it makes an interruption possible.
FlagNo change
Instruction
cycles
2 cycles


RETLWReturn with literal in W
Form [label]RETLWk
( label is omitable, shows SPACE code )
Operandsk : literal field ( 00(00h) to 255(FFh) )
Operation It returns from the subroutine.
It sets literal data to the W register.
It sets the latest return address which is stored in the stack to the PC.
The processing result can be delivered by literal data's using different RETLW by the processing result of the subroutine.
FlagNo change
Instruction
cycles
2 cycles


RETURNReturn from Subroutine
Form [label]RETURN
( label is omitable, shows SPACE code )
OperandsNone
Operation It returns unconditionally from the subroutine.
It sets the latest return address which is stored in the stack to the PC.
FlagNo change
Instruction
cycles
2 cycles


RLFRotate Left f through Carry
Form [label]RLFf, d
( label is omitable, shows SPACE code )
Operands f : Register file addesss ( 00(00h) to 127(7Fh) )
d : Destination select ( 0 or 1 )
Operation It moves the contents of the f register to the 1-bit left including the carry bit.
d = 0 : store result in W
d = 1 : store result in f
FlagIt sets the most significant bit of the f register to C.
Instruction
cycles
1 cycle


Next instructions