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

User Program Memory Vs. Total Program Memory Confusion

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



Joined: 30 Mar 2023
Posts: 20

View user's profile Send private message

User Program Memory Vs. Total Program Memory Confusion
PostPosted: Thu Oct 24, 2024 11:16 am     Reply with quote

I am working with a PIC24FJ256GA606. 256KB of program memory. In CCS Compiler, it says ROM space is 176KB, which aligns with "Program Memory Upper Boundary" listed in its datasheet on page 54: https://ww1.microchip.com/downloads/en/DeviceDoc/PIC24FJ1024GA610-GB610-Family-Data-Sheet-DS30010074G.pdf. Although the datasheet seems to have a typo where all of the decimal counterparts for the memory sizes are half of the hex values.

They also have a diagram showing unimplemented memory, Executive Code Memory, Customer OTP memory, etc. Is everything beyond "User Flash Program Memory" where the other 80KB of program memory is going or is there some other explanation? Kind of confused about how this works or how to explain it to other people.
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Fri Oct 25, 2024 1:50 am     Reply with quote

Basically forget it... Very Happy

The 'executive code memory', is not something you can ever use. It is
described in the chip's programming specification sheet.It is where code
used by the ICSP can be put. It is only used by the actual device debuggers
and programmers.
The Hex values give the byte addresses. The decimal values are in words.
The memory is treated as word addressable blocks, but the physical address
(which the hex value gives), is in bytes.

Now all the PIC24/30/33 chips, the memory only has three bytes out of
every four addresses implemented. So:
Code:

00000    Byte  Byte
00002    Byte  N/A
00004    Byte  Byte
00006    Byte  N/A
etc...

So a chip with 64K byte addresses, only has 48K bytes of RAM, and 32K
addresses that can be actually used.
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