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 support@ccsinfo.com

External Program Memory

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



Joined: 06 May 2004
Posts: 19
Location: Italy

View user's profile Send private message

External Program Memory
PostPosted: Fri May 07, 2004 2:50 am     Reply with quote

Hi

It is possible run program from external memory on Flash Device?
Pete Smith



Joined: 17 Sep 2003
Posts: 55
Location: Chester, UK

View user's profile Send private message Visit poster's website MSN Messenger ICQ Number

Re: External Program Memory
PostPosted: Fri May 07, 2004 6:22 am     Reply with quote

.C wrote:
Hi

It is possible run program from external memory on Flash Device?


I suppose it would be, in principle.

If you could put some code into high ROM on your device, you could then load instructions from external storage, copy them to the ROM of your PIC, and then execute them.

You'd have to be really careful though, regarding what you paged into where etc, and it would be quite slow.

ISTR that home computers years ago (I'm talking 20 years here) used things called "Overlays" which would dynamically load code from disk, run it, and then unload it. It would give you effectively far more code space, at the expense of speed.

Pete.
ttelmah
Guest







Re: External Program Memory
PostPosted: Fri May 07, 2004 6:28 am     Reply with quote

.C wrote:
Hi

It is possible run program from external memory on Flash Device?

Not really.
Some of the larger PICs support using external memory, and with these it could be done, if you had a flash chip with the right architecture. However The key' reason it can't be done, is the Hoffman architecture of the chip. With this design, the 'data' memory, is seperate from the program memory, so you cannot 'execute' and instruction in the data memory (which is where data read from the external memory will arrive). You can though run an 'interpreter'. Here you run a program in the PIC itself, which carries out required operations, based on the value of a data byte. This is how devices like the Stamp work.
The other alternative, would be to read a block of data from the external device, and write this into the program memory (on a flash PIC), but then you run into the limited number of write cycles supported by the program memory, and the very long time involved to transfer the data.

Best Wishes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri May 07, 2004 2:34 pm     Reply with quote

er... Harvard architecture
Ttelmah
Guest







PostPosted: Fri May 07, 2004 2:43 pm     Reply with quote

PCM programmer wrote:
er... Harvard architecture

Argh!.
I have been looking at 'art' books recently, and did a mental 'crossover', between Heinrich Hoffman, and the computer architecture name (which derives of course from the Harvard university, where the pioneering work on this was done...).
There doen't seem to be an icon for 'embarrased grin'...
I'll be calling the shared memory/data space architecture, the Von Richtofen architecture next...

Best Wishes
jbmiller
Guest







external memory
PostPosted: Fri May 07, 2004 3:45 pm     Reply with quote

Yes, it is possible....that's the way Basic STAMPS work isn't it ???
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Fri May 07, 2004 6:17 pm     Reply with quote

Mr.Hamlett, poor Howard Aiken wasn't even aware of the fact that he had painted the "Christ in the Temple", up until now... Very Happy
Ttelmah
Guest







Re: external memory
PostPosted: Sat May 08, 2004 2:35 am     Reply with quote

jbmiller wrote:
Yes, it is possible....that's the way Basic STAMPS work isn't it ???

Not really.
The way the Stamps work, is that they are running an 'interpreter' program, that then takes the numeric values from the external EEPROM, and branches to the different routines based on the value. The PIC does not 'run' the code in the EEPROM, but changes the block of code it executes based on the values. I outlined that this was one way you could get (partially) the required effect. However you don't have access to the 'core' functions of the processor, instead you are limited to what routines the interpreter understands.

Best Wishes
Ttelmah
Guest







PostPosted: Sat May 08, 2004 2:36 am     Reply with quote

Haplo wrote:
Mr.Hamlett, poor Howard Aiken wasn't even aware of the fact that he had painted the "Christ in the Temple", up until now... Very Happy

Very Happy
.C



Joined: 06 May 2004
Posts: 19
Location: Italy

View user's profile Send private message

Re: external memory
PostPosted: Tue May 11, 2004 8:42 am     Reply with quote

Ttelmah wrote:
jbmiller wrote:
Yes, it is possible....that's the way Basic STAMPS work isn't it ???

Not really.
The way the Stamps work, is that they are running an 'interpreter' program, that then takes the numeric values from the external EEPROM, and branches to the different routines based on the value. The PIC does not 'run' the code in the EEPROM, but changes the block of code it executes based on the values. I outlined that this was one way you could get (partially) the required effect. However you don't have access to the 'core' functions of the processor, instead you are limited to what routines the interpreter understands.

Best Wishes


I think about BASIC STAMP is too much expensive ( about 60$ ?) for some prjs
Ttelmah
Guest







Re: external memory
PostPosted: Tue May 11, 2004 9:10 am     Reply with quote

.C wrote:
Ttelmah wrote:
jbmiller wrote:
Yes, it is possible....that's the way Basic STAMPS work isn't it ???

Not really.
The way the Stamps work, is that they are running an 'interpreter' program, that then takes the numeric values from the external EEPROM, and branches to the different routines based on the value. The PIC does not 'run' the code in the EEPROM, but changes the block of code it executes based on the values. I outlined that this was one way you could get (partially) the required effect. However you don't have access to the 'core' functions of the processor, instead you are limited to what routines the interpreter understands.

Best Wishes


I think about BASIC STAMP is too much expensive ( about 60$ ?) for some prjs

Have a look at:
http://www.hippy.freeserve.co.uk/diystamp.htm

Best Wishes
Guest








PostPosted: Wed May 12, 2004 6:05 am     Reply with quote

Thank
.C



Joined: 06 May 2004
Posts: 19
Location: Italy

View user's profile Send private message

PostPosted: Wed May 12, 2004 6:06 am     Reply with quote

Anonymous wrote:
Thank


Thank by .C
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