View previous topic :: View next topic |
Author |
Message |
evsource
Joined: 21 Nov 2006 Posts: 129
|
Porky code on 18F2520 ... need more ROM |
Posted: Sat Jun 16, 2007 10:48 pm |
|
|
I'm sure everyone is tired of hearing about out-of-ROM errors. I hit the ROM barrier with the 16F876, so I went to the 18F2520. Well, the code has grown and grown, and now I'm out of space again.
I'm doubtful, but is there any pin-for-pin replacement for the 18F2520 that has more space? I'm sure I could optimize a bit and use up less space, but I'm looking for the quick and easy solution
Thanks in advance. |
|
|
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
|
|
evsource
Joined: 21 Nov 2006 Posts: 129
|
|
Posted: Mon Jun 18, 2007 9:56 am |
|
|
Yep, looks pin-for-pin compatible... and *double* the ROM space!!! I've got a couple on order, and will give it a try. The code compiles with only a single change to the Brown-out fuse setting.
Thanks, that's exactly the info. I was looking for! |
|
|
silelis
Joined: 12 Jun 2007 Posts: 68 Location: Poland, podlaskie district
|
|
Posted: Thu Jun 21, 2007 7:55 am |
|
|
Few day ago I had problem with ROM so I changed PIC16f77 to PIC18f4620 and it's working without any problem.
But I've got question: Is there any posibility to read PIC program form external ROM location? |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Thu Jun 21, 2007 8:13 am |
|
|
What do you mean by external ROM.
Do you have a chip part number? |
|
|
silelis
Joined: 12 Jun 2007 Posts: 68 Location: Poland, podlaskie district
|
|
Posted: Tue Sep 25, 2007 2:08 am |
|
|
I mean is it possible to read program on the flow from for example EEPROM, memory card or some other kind of memory? |
|
|
ELCouz
Joined: 18 Jul 2007 Posts: 427 Location: Montreal,Quebec
|
|
Posted: Tue Sep 25, 2007 3:29 am |
|
|
Basic stamp does it (using a pic with a bootloader inside ,,, then read the program from a eeprom chip)... so its possible to do it
so you might check for a pic bootloader that read a program from a eeprom. |
|
|
libor
Joined: 14 Dec 2004 Posts: 288 Location: Hungary
|
|
Posted: Tue Sep 25, 2007 3:34 am |
|
|
Yes. Some high end (18F8xxx) chips have parallel external memory interface. They can use external memory (EPROMs, Flash, or even SRAM) up to 2Mbytes both for running code from and/or data.
Read the AN869 - External Memory Interfacing Techniques for the PIC18F8XXX.
You can also make your own solution for huge programs: write you own interpreter residing in the main chip and execute your own pseudo-code (optimized for that particular project) from the external memory on the fly. |
|
|
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
|
Posted: Tue Sep 25, 2007 6:33 am |
|
|
Hi,
Out of ROM errors could also occur if a function is larger than the page size...you could isolate the function and break it down into smaller pieces...
thanks
arunb |
|
|
Ttelmah Guest
|
|
Posted: Tue Sep 25, 2007 6:59 am |
|
|
There are two different ways to do this. The first is a chip that supports using an external memory. You can then run 'real' code from this. The second, is to not actually 'run' the code, but use number stored externally, with an interpreter that is running on the main chip. This is what the 'basic STAMP' does. On these the PIC itself, does not execute the external code, but performs relatively high level functions based on a numeric value read from the external chip.
This is obviously slower, but has the advantage that the memory does not have to be directly accessed.
Best Wishes |
|
|
|