CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Porky code on 18F2520 ... need more ROM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
evsource



Joined: 21 Nov 2006
Posts: 129

View user's profile Send private message

Porky code on 18F2520 ... need more ROM
PostPosted: Sat Jun 16, 2007 10:48 pm     Reply with quote

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 Smile

Thanks in advance.
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

View user's profile Send private message Send e-mail

PostPosted: Sat Jun 16, 2007 11:48 pm     Reply with quote

try the 18f2620 (double the ROM of the 2520)
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010284

I assume it is pin compatible, I know the 4520 and the 4620 are (44 pin version of the chip you are referring to).

Idea Check the data sheet
_________________
What has been learnt if you make the same mistake? Wink
evsource



Joined: 21 Nov 2006
Posts: 129

View user's profile Send private message

PostPosted: Mon Jun 18, 2007 9:56 am     Reply with quote

Storic wrote:
try the 18f2620 (double the ROM of the 2520)
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010284

I assume it is pin compatible, I know the 4520 and the 4620 are (44 pin version of the chip you are referring to).

Idea Check the data sheet


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

View user's profile Send private message

PostPosted: Thu Jun 21, 2007 7:55 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Thu Jun 21, 2007 8:13 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 25, 2007 2:08 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 25, 2007 3:29 am     Reply with quote

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 Wink

so you might check for a pic bootloader that read a program from a eeprom.
libor



Joined: 14 Dec 2004
Posts: 288
Location: Hungary

View user's profile Send private message

PostPosted: Tue Sep 25, 2007 3:34 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 25, 2007 6:33 am     Reply with quote

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







PostPosted: Tue Sep 25, 2007 6:59 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group