View previous topic :: View next topic |
Author |
Message |
.C
Joined: 06 May 2004 Posts: 19 Location: Italy
|
External Program Memory |
Posted: Fri May 07, 2004 2:50 am |
|
|
Hi
It is possible run program from external memory on Flash Device? |
|
|
Pete Smith
Joined: 17 Sep 2003 Posts: 55 Location: Chester, UK
|
Re: External Program Memory |
Posted: Fri May 07, 2004 6:22 am |
|
|
.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 |
Posted: Fri May 07, 2004 6:28 am |
|
|
.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
|
|
Posted: Fri May 07, 2004 2:34 pm |
|
|
er... Harvard architecture |
|
|
Ttelmah Guest
|
|
Posted: Fri May 07, 2004 2:43 pm |
|
|
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 |
Posted: Fri May 07, 2004 3:45 pm |
|
|
Yes, it is possible....that's the way Basic STAMPS work isn't it ??? |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Fri May 07, 2004 6:17 pm |
|
|
Mr.Hamlett, poor Howard Aiken wasn't even aware of the fact that he had painted the "Christ in the Temple", up until now... |
|
|
Ttelmah Guest
|
Re: external memory |
Posted: Sat May 08, 2004 2:35 am |
|
|
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
|
|
Posted: Sat May 08, 2004 2:36 am |
|
|
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... |
|
|
|
.C
Joined: 06 May 2004 Posts: 19 Location: Italy
|
Re: external memory |
Posted: Tue May 11, 2004 8:42 am |
|
|
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 |
Posted: Tue May 11, 2004 9:10 am |
|
|
.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
|
|
Posted: Wed May 12, 2004 6:05 am |
|
|
Thank |
|
|
.C
Joined: 06 May 2004 Posts: 19 Location: Italy
|
|
Posted: Wed May 12, 2004 6:06 am |
|
|
Thank by .C |
|
|
|