PIC 18F External RAM HELP

Thread Starter

Sherri

Joined Mar 31, 2018
29
Hello all!
I was thinking the other day if it would be possible to load multiple programs hex files into an external ram and then load the program(one of the hex files I loaded into external RAM) I was wanting to use into ROM and run the program that way.
Is this possible and if so, what is the most efficient way of doing this?
Thanks for your help.

Sherri
 

Papabravo

Joined Feb 24, 2006
21,225
Hello all!
I was thinking the other day if it would be possible to load multiple programs hex files into an external ram and then load the program(one of the hex files I loaded into external RAM) I was wanting to use into ROM and run the program that way.
Is this possible and if so, what is the most efficient way of doing this?
Thanks for your help.

Sherri
What happens to the external RAM when the device loses power? Hint: nothing good.
Can you verify that is is possible to write the program (flash) memory from a program?
Rather than use an external RAM, could you use an external SD card?
 

JohnInTX

Joined Jun 26, 2012
4,787
The main problem with that is the 18F executes only out of its flash. That means you would need a boot-loader / monitor program to reprogram the flash from RAM to load a new program. That would be a slow and tedious process. Other issues are that the PIC 18F 'stalls' when it writes a block of flash so you would lose some real-time response if that were an issue. Also, the flash does have a relatively low number of times you can re-write it - 10Kmin to 100K typ. cycles for an 18F4520.

It's doable but not really a good fit IMO. A better way would be to get an 18F with lots of ROM and load all the programs at once with some means of selecting which one you want to run.
 
Top