News:

SMF for DIYStompboxes.com!

Main Menu

PIC Program Memory question

Started by burningman, March 27, 2009, 08:38:57 PM

Previous topic - Next topic

burningman

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.
Thanks.

iaresee

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.

ElectricDruid

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.
T.

MoltenVoltage

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.
MoltenVoltage.com for PedalSync audio control chips - make programmable and MIDI-controlled analog pedals!