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 support@ccsinfo.com

16F18324 memory 4Kbytes or 7Kbytes?

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



Joined: 18 Dec 2007
Posts: 76

View user's profile Send private message Send e-mail

16F18324 memory 4Kbytes or 7Kbytes?
PostPosted: Tue Dec 15, 2020 3:05 am     Reply with quote

CCS compiler PCW IDE 5.092 PCB 5.092 PCM 5.092

Who can explain this?

If you read the datasheet PIC16(L)F18324/18344 you will find the next information:
Memory
• 7 Kbytes Program Flash Memory
• 512B Data SRAM Memory
• 256B of EEPROM

But if you open the 16F18324.H from CCS you will find:
#device PIC16F18324
#nolist
//////// Program memory: 4096x14 Data RAM: 496 Stack: 16
//////// I/O: 12 Analog Pins: 11
//////// Data EEPROM: 256
//////// C Scratch area: 77 ID Location: 8000


I choose this 16F18324 controller because of the large memory but now I'm limited to 4K. The statistics of CCS shows me my memory is full while it's 4K (much below 7K).

Any ideas?
Ttelmah



Joined: 11 Mar 2010
Posts: 19439

View user's profile Send private message

PostPosted: Tue Dec 15, 2020 3:41 am     Reply with quote

Key difference is one is words and the other bytes.

The memory is 4K*14 bits wide. 7K bytes.

Go to the data sheet. Section 4 'memory organization'. Bottom of the page.
"Program Memory Size (Words)" 4096.

The CCS header is quoting how many instruction words of memory there are.
4K.

So the chip only supports 4K instructions. Not a lot. It is not exactly a
'large' chip. The 16F18325 has 8K words, the 18326 has 16K. You have
the smallest version.
bschriek



Joined: 18 Dec 2007
Posts: 76

View user's profile Send private message Send e-mail

PostPosted: Tue Dec 15, 2020 3:58 am     Reply with quote

Dear Ttelmah,

Of course, that makes sense.
Thank you.
temtronic



Joined: 01 Jul 2010
Posts: 9199
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Dec 15, 2020 6:34 am     Reply with quote

As a general comment, it's usually better to buy the 'biggest' PIC of a series or family to get maximum codespace, lots of RAM, and EEPROM, at least for 'product development'. Always frustrating to be a few bytes short of space !! Once code is finalized,it might fit into a smaller PIC and save a few pennies per PIC. Often it's overall cheaper to use the 'big' PIC, especially if you include R&D $$ (time and labour) into the true cost of the product.
bschriek



Joined: 18 Dec 2007
Posts: 76

View user's profile Send private message Send e-mail

PostPosted: Tue Dec 15, 2020 6:41 am     Reply with quote

Yes, I know but I also use this part for other applications too so easy to start with.
Actually this is the first time I'm faced with this memory problem/misunderstanding.
Best regards,
Bas
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