![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
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? | |
| |
| | #2 |
|
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.
| |
| |
| | #3 |
| 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.
| |
| |
| | #4 |
|
How does 100 words translate into memory size, < 100 bytes? Thanks, Mike | |
| |
| | #5 |
|
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.
__________________ Private messages are for personal communication, please do not use them to ask for help. | |
| |
| | #6 |
| 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). | |
| |
| | #7 |
| | |
| |
| | #8 |
| 3.5k of what, and in what processor?. Read the datasheet and look how many WORDS a processor can hold, that's all that matters. For an example a 16F627 holds 1K, a 16F628 2K, and a 16F877 8K. | |
| |
| | #9 |
|
Right after I asked that, the sim I am using showed 2k. sorry.
| |
| |
|
| Tags |
| memory, pic |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| SD memory help | eldermalagon | Electronic Projects Design/Ideas/Reviews | 7 | 22nd April 2009 09:00 PM |
| How much memory do I need? | Nrets | Micro Controllers | 12 | 6th January 2009 04:49 PM |
| memory? | colin886 | Datasheet/Parts Requests | 2 | 12th December 2005 05:02 AM |
| PC ram memory | mahinda jayasinghe | General Electronics Chat | 2 | 5th November 2004 07:36 AM |
| Memory on a PIC | brentonw2004 | Micro Controllers | 7 | 19th December 2003 01:30 PM |