Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Big program size absurdity

Status
Not open for further replies.

jhanus

Member level 2
Joined
Feb 27, 2007
Messages
48
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Croatia
Activity points
1,690
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?! :cry:

EDIT: I 'discovered' the problem with program size, but my errors with underflow and overflow stay
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top