View previous topic :: View next topic |
Author |
Message |
avatarengineer
Joined: 13 May 2013 Posts: 51 Location: Arizona
|
RAM use report error |
Posted: Sun Sep 18, 2016 8:48 pm |
|
|
Playing with small PIC10F320 & PIC10F322.
Both have 64 Bytes of RAM.
Same program is loaded into compiler (5.062)
Choose 10F320, RAM use is 76%
Choose 10F322, RAM use is 39%
Anyone have an answer for this?
Both devices have the same RAM available and
are loaded with the same program.
Only difference between devices is
the 10F320 has 256 Words of Flash while
the 10F322 has 512 Words...
Any Answers? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Sep 18, 2016 9:54 pm |
|
|
It looks like a bug in the database for the 10F320. It fails in both 5.062
and vs. 5.063.
Compile the program below and and look at the .LST file. It's only
loading 0x20 (32 decimal) into 'temp'. That's a bug. Report it to CCS.
If you have the IDE version of the compiler (PCWH, PCWHD, etc)., then
you could edit the device database and fix it yourself.
If you have the command line version of the compiler, you need to get
a fix from CCS.
Part of the .LST file:
Code: | ....................
.................... temp = getenv("RAM");
000B: MOVLW 20
000C: MOVWF temp |
Test program:
Code: | #include <10F320.h>
#fuses INTRC, NOWDT
#use delay(clock=4M)
//==========================
void main()
{
int8 temp;
temp = getenv("RAM");
while(TRUE);
} |
|
|
|
avatarengineer
Joined: 13 May 2013 Posts: 51 Location: Arizona
|
RAM use report error |
Posted: Sun Sep 18, 2016 10:00 pm |
|
|
You found it. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Sep 19, 2016 1:44 pm |
|
|
bad as far back as 5.041 .... |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Sep 19, 2016 1:45 pm |
|
|
bad as far back as 5.041 .... thats the oldest ver i have active right now |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Sep 19, 2016 1:54 pm |
|
|
I emailed a bug report to CCS support to make sure they are notified. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Sep 20, 2016 1:56 pm |
|
|
CCS support gave this reply:
Quote: |
The reason it was set to 32 bytes was because of an errata for the first
revision of the chip where it only had 32 bytes of RAM.
|
This problem was in the A1 silicon. We are now up to silicon rev. A4
which doesn't have that errata, so I believe CCS will update the database
for the next compiler revision, to show all 64 bytes are available. |
|
|
|