PIC12F609-I/PQTP MICROCHIP [Microchip Technology], PIC12F609-I/PQTP Datasheet - Page 121

no-image

PIC12F609-I/PQTP

Manufacturer Part Number
PIC12F609-I/PQTP
Description
8-Pin Flash-Based, 8-Bit CMOS Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
RETFIE
Syntax:
Operands:
Operation:
Status Affected:
Description:
Words:
Cycles:
Example:
© 2006 Microchip Technology Inc.
Return from Interrupt
[ label ]
None
TOS
1
None
Return from Interrupt. Stack is
POPed and Top-of-Stack (TOS) is
loaded in the PC. Interrupts are
enabled by setting Global
Interrupt Enable bit, GIE
(INTCON<7>). This is a two-cycle
instruction.
1
2
After Interrupt
RETFIE
GIE
PC,
PC =
GIE =
RETFIE
TOS
1
PIC12F609/615/12HV609/615
Preliminary
RETLW
Syntax:
Operands:
Operation:
Status Affected:
Description:
Words:
Cycles:
Example:
TABLE
DONE
RETURN
Syntax:
Operands:
Operation:
Status Affected:
Description:
Return from Subroutine
[ label ]
None
TOS
None
Return from subroutine. The stack
is POPed and the top of the stack
(TOS) is loaded into the program
counter. This is a two-cycle
instruction.
Return with literal in W
[ label ]
0
k
TOS
None
The W register is loaded with the
eight-bit literal ‘k’. The program
counter is loaded from the top of
the stack (the return address).
This is a two-cycle instruction.
1
2
Before Instruction
After Instruction
CALL TABLE;W contains
GOTO DONE
ADDWF PC
RETLW k1
RETLW k2
RETLW kn
k
(W);
255
PC
PC
W
W
RETURN
RETLW k
=
=
;table offset
;value
;W = offset
;Begin table
;
;End of table
DS41302A-page 119
0x07
value of k8

Related parts for PIC12F609-I/PQTP