• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Memory

Status
Not open for further replies.

GatorGnet

New Member
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.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
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.
 

edeca

Active Member
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.

The Wikipedia page PIC microcontroller - Wikipedia, the free encyclopedia shows the instructions and their binary equivalents once assembled.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
How does 100 words translate into memory size, < 100 bytes?
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).
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top