PDA

View Full Version : 2Kb code limitation?



luxornet
- 8th February 2011, 18:40
I use MCS Pro and PicBasic Pro.
I noticed that there are (probably) a limitation on compiled code when I use PIC16F628 2KB.
It is indeed a limitation or wrong?
Thanks.

Darrel Taylor
- 8th February 2011, 19:48
Yes, the 16F628 only has 2K words of program space.
It is a physical limitation of that chip.

The 16F648A has 4K and is very similar to the 628.
And there are other chips with even more memory

luxornet
- 9th February 2011, 05:28
Thank you very much, Darrel.
My previous error was: [218] address limit of 7ffh exceeded.

I switched to 16F648A and compiled the source code and now I got a warn: [102] code crosses boundary @ 800h.

The code will work correctly? I must do something special now?
Thank you very much.

mackrackit
- 9th February 2011, 09:31
http://www.picbasic.co.uk/forum/showthread.php?t=555

luxornet
- 9th February 2011, 11:14
Thank you very much, mackrackit.
Well, an old post for an old problem.

Darrel Taylor
- 9th February 2011, 15:47
In MicroCode Studio, go to ...

View > Editor Options > General tab, and check the "Disable 'code crosses boundary' ASM warning"
Then never use the BRANCH statement, use only BRANCHL if needed.