Main Page Modules Related Pages
Returns
-
A few details
-
There are two kinds of returns:
- RET
Return from subroutine.
The Program Counter is loaded with the return address (22 bit wide) read from the stack, and the Stack Pointer is incremented by 3. - RETI
The same as RET, but in addition sets the general interrupt flag (flag I in the Status Register).
Returns are the slowest instructions in the pAVR implementation of the AVR instruction set. They take 9 clocks.
First 2 clocks are spent while waiting the previous instructions to write the Unified Memory. Next 5 clocks, the Program Counter is read from the Unified Memory. In a future version, this part might take only 4 clocks. Finally, another 2 clocks are spent while bringing the target instruction into the instruction register.
Generated on Sat Jul 3 08:13:38 2004 for Pipelined AVR microcontroller by
1.2.12 written by Dimitri van Heesch,
© 1997-2001