jhanus
New Member
Hello,
let me get directly to the point, I'm developing a project in assembler.
But I got to a wall, the problem is that I got carried away a bit, and my program size exponentially increased.
So after researching I assumed the problem is when I use 'call' trough more then 255 instructions, because while testing in Proteus it gave me underflow and overflow errors.
To eliminate this problem I disabled some functions and it worked.
After more reading I found potential solution trough division of code to pages and using PCLATH.
Then, while cruising trough datasheet of PIC 16F628a I saw 2048word limit for program(I never got a problem with program size before!) and my HEX file has 2,57 KB (2.637 bytes)...
After that I realized that my previous hex file for 16f84a had 1,97 KB (2.019 bytes) and it worked fine.(16f84a has 1024words)
So, my question is how is this possible?!
let me get directly to the point, I'm developing a project in assembler.
But I got to a wall, the problem is that I got carried away a bit, and my program size exponentially increased.
So after researching I assumed the problem is when I use 'call' trough more then 255 instructions, because while testing in Proteus it gave me underflow and overflow errors.
To eliminate this problem I disabled some functions and it worked.
After more reading I found potential solution trough division of code to pages and using PCLATH.
Then, while cruising trough datasheet of PIC 16F628a I saw 2048word limit for program(I never got a problem with program size before!) and my HEX file has 2,57 KB (2.637 bytes)...
After that I realized that my previous hex file for 16f84a had 1,97 KB (2.019 bytes) and it worked fine.(16f84a has 1024words)
So, my question is how is this possible?!