Author Topic: PIC Program Memory question  (Read 4090 times)


PIC Program Memory question
« on: March 27, 2009, 08:38:57 PM »
The 16F887A datasheet describes the chip as having 8k x 14words
Can someone explain this a bit clearer? I'm writing a program, pretty sure I'm not up to that limit :) but unsure what it really means.


Re: PIC Program Memory question
« Reply #1 on: March 27, 2009, 09:57:04 PM »
A word is the smallest size of instruction you can address in memory. This is different than the smallest size of memory you can address in your program. In your PIC words are 14 bits if I'm reading that correctly. So you've got 8k x 14 bits = 14 KBytes of program space available to you in 14 bit chunks. Basically you can store a program in on-chip memory that's got 8000 instructions in it.


Re: PIC Program Memory question
« Reply #2 on: May 14, 2009, 11:08:56 AM »
iaresee is spot on.

You've got 8096 instructions-worth of program space. Each instruction is 14-bits, so in total that's 14KBytes. Mosty, though, you'll be thinking about it in terms of instructions, so it's just over 8000 instructions.


Re: PIC Program Memory question
« Reply #3 on: May 17, 2009, 12:44:09 AM »
If you need to see how much memory your program uses, just view the Program Memory in MPLAB after you Build.  All the unused memory will be at the bottom as RETLW. for PedalSync audio control chips - make programmable and MIDI-controlled analog pedals!