View previous topic :: View next topic |
Author |
Message |
ckrusen
Joined: 09 Feb 2009 Posts: 12
|
Memory map question |
Posted: Mon Apr 27, 2009 7:15 am |
|
|
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
|
|
Posted: Mon Apr 27, 2009 9:11 am |
|
|
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
|
|
Posted: Tue Apr 28, 2009 11:59 am |
|
|
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
|
|
Posted: Tue Apr 28, 2009 3:51 pm |
|
|
You are correct. The 16F688 (rev. D) data sheet has mistakes in it. |
|
|
|