CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

RAM use report error

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
avatarengineer



Joined: 13 May 2013
Posts: 51
Location: Arizona

View user's profile Send private message Visit poster's website

RAM use report error
PostPosted: Sun Sep 18, 2016 8:48 pm     Reply with quote

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? Rolling Eyes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Sep 18, 2016 9:54 pm     Reply with quote

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

View user's profile Send private message Visit poster's website

RAM use report error
PostPosted: Sun Sep 18, 2016 10:00 pm     Reply with quote

You found it. Wink
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Sep 19, 2016 1:44 pm     Reply with quote

bad as far back as 5.041 ....
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Sep 19, 2016 1:45 pm     Reply with quote

bad as far back as 5.041 .... thats the oldest ver i have active right now
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Sep 19, 2016 1:54 pm     Reply with quote

I emailed a bug report to CCS support to make sure they are notified.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 20, 2016 1:56 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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