View Full Version : Stack size for 18F2620
Joe Rocci
- 11th August 2006, 01:11
Anyone know what the size of the subroutine stack is for the 18F2620?
Joe
Bruce
- 11th August 2006, 03:57
31 for the 18F series.
Joe Rocci
- 11th August 2006, 13:36
Thanks Bruce! How about the 16F687, which I'm trying to make interchangeable PBP code for?
Bruce
- 11th August 2006, 14:54
Hi Joe,
The return stack for 14-bit core is 8 levels deep.
In the data sheet look in the Program Memory Organization section for stack
size information.
Joe Rocci
- 11th August 2006, 15:35
Yes, I saw that the PIC stack is 8 levels deep, but what is the PBP subroutine maximum stack depth (nesting)?
Bruce
- 11th August 2006, 16:02
Hi Joe,
Subroutine nesting is normally restricted to 4 levels deep on 14-bit core, and
27 levels deep for 18Xxxx parts.
Look in the manual under GOSUB.
mister_e
- 11th August 2006, 16:07
But if you want more... Darrel did something interesting awhile back
http://www.pbpgroup.com/modules/wfsection/article.php?articleid=14
Didn't use it as now but i'm sure it works :)
Joe Rocci
- 12th August 2006, 12:27
mister e,
Thanks for the lead! This looks like a good solution for what I need. I'll take a closer look when I get back in the office Monday.
Thanks Again!
Joe
Darrel Taylor
- 12th August 2006, 19:38
It works!
In fact, it was the basis for the RTOS that ended up on the Proton forum. :)
<br>
mister_e
- 12th August 2006, 20:01
Why i'm not surprise at all :)
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.