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

Memory map question

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



Joined: 09 Feb 2009
Posts: 12

View user's profile Send private message

Memory map question
PostPosted: Mon Apr 27, 2009 7:15 am     Reply with quote

Sorry if this is such a basic question, but I'm new to the PIC micros.

I'm using the PIC16F688, which has 4K of flash and 256 bytes of EEPROM.

I would think that the program space goes from 0x000 to 0x0FFF.

But the data sheet for the micro says,"Only the first 4K x 14 (0000h-01FFF) for the PIC16F688 is physically implemented." And the memory map figure 2-1 shows the On-Chip Program Memory going from 0x005 - 0x01FF.

Is the 0x01FF a typo? I'd think it should go to 0x0FFF.

Thanks
_________________
Calvin
Ttelmah
Guest







PostPosted: Mon Apr 27, 2009 9:11 am     Reply with quote

Re-read what it says.
0-1FFF is implemented. This is in _bytes_.
This is 8K _bytes_, but 4K _words_, which is what the chip has fitted.
The picture in 2-1, shows the program memory layout in words. 0xFFF words, is 4096 words, which is the end of the white section, showing the memory ctually fitted. Then the map is shown extending to 0x1FFF (one more 'F' than you are typing), in grey, which is the 8192 words, supported by the architecture.

Best Wishes
ckrusen



Joined: 09 Feb 2009
Posts: 12

View user's profile Send private message

PostPosted: Tue Apr 28, 2009 11:59 am     Reply with quote

Ttelmah - thanks for the reply.

My data sheet shows the "On-Chip Program Memory" going from 0005h to 01FFh. (<-that is not a typo! the datasheet shows a 4 char hex value of 01FFh, NOT 1FFFh)

And the "Wraps to 0000h-07FFh" (grey section) going from 02000h to 1FFFh.

That leaves a gap from 0200h to 1FFFh. I'm guessing the 01FF shuld be 1FFF, and the 02000 should be 2000.
_________________
Calvin
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 28, 2009 3:51 pm     Reply with quote

You are correct. The 16F688 (rev. D) data sheet has mistakes in it.
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