How much memory does a typical 100 line ASM program take up in a PIC? The 16f628A shows 3.5k but is a little overkill on some of our needs. I am looking at the 10F2## for small needs.
Also, does the 10F2## PIC's have a built in internal oscillator?
All in the 10F series have internal oscillators, but be careful - not all the chips in the 10F and 12F series have interrupts. Check the datasheet if you need to use interrupts.
How much memory does a typical 100 line ASM program take up in a PIC? The 16f628A shows 3.5k but is a little overkill on some of our needs. I am looking at the 10F2## for small needs.
16F and lower PIC's are easy - all instructions are a single word long - so a 100 line program will take LESS than 100 words of memory, as some lines generate no code.
For smaller PIC parts, all instructions are 14 bits long. So 100 NOP instructions take up the same space as 100 complex operations involving the stack.
However, some instructions take more than one cycle to run. So instruction "length" in PIC flash memory does not relate to execution speed.
PIC's don't use bytes, 16F series use 14 bit words, 12C series use 12 bit words, and 18F use 16 bit words.
The 'bytes' listed for a PIC is purely for advertising comparisons, multiply the number of words by the number of bits, then divide by 8 to get the number of bytes (a completely useless and pointless value).
16F and lower PIC's are easy - all instructions are a single word long - so a 100 line program will take LESS than 100 words of memory, as some lines generate no code.