|
|
View previous topic :: View next topic |
Author |
Message |
Guest
|
programmer memory for PIC16F676 |
Posted: Sun Mar 20, 2005 5:46 am |
|
|
Hi,
I found my firmware not running if ROM usage bigger than 768, even debugger shows no compile error.
datasheet says the flash memory is 1024 for PIC16F676
1, Is there any limitionation of progamme size?
2, Normally, what is the difference of code written in assembly and CCS C? Can reach 50%
Recently I found PIC16F676 does not have enough ROM for my design.
I wonder whether to replace with a high memory chip or write my code in assembly can solve the problem.
|
|
|
Ttelmah Guest
|
|
Posted: Sun Mar 20, 2005 6:27 am |
|
|
Are you using an ICD?.
If so, this uses memory. There is a significant block of ROM at the top of the chip, that is used by the ICD system, and is therefore not available for code when you are operating this way.
The 'useage' difference between assembler, and C, varies massively, both with compiler versions, and what you are actually 'doing'. Typically, the overhead will range from nothing (some lines result in very efficient code), with an overall average, depending on the chip involved, at perhaps +10% to +40%. The latter versions of the compiler have tended to improve this. I have a project that was originally written in assembler, and then the version-2, shifted to compiler, on one of the larger PICs. The assembler was 10377 lines long. The compiler source, was 2066 lines, and the resulting asembler 'list' file, when generated, was 13142 lines. With the latest improvements in optimisation on the larger PIC chips, this has since fallen to 11147 lines. The difference in maintainability on a 2000 line program, versus a 10000 line program, is where C wins....
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|