View previous topic :: View next topic |
Author |
Message |
Bilal
Joined: 24 Apr 2010 Posts: 75 Location: Islamabad
|
Run code outside the flash |
Posted: Sat Jun 02, 2012 7:45 am |
|
|
Hi, did anyone try to run a code outside the flash by using PIC? Maybe from eeprom or sd card.
(its not about copy the code from external source and then run it). _________________ ... |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Sat Jun 02, 2012 8:32 am |
|
|
get a bigger PIC.
;) _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Sat Jun 02, 2012 12:25 pm |
|
|
Yes, technically possible but reality says buy a bigger/more powerful PIC.
If you add the cost of external EEPROM or SD interface(and card) it will exceed the cost of a bigger PIC !
Also overall performance will be less due to the constant reads to the external memory.
BASIC Stamps kinda work that way but unless you have a LOT of time on your hands.....buy a bigger PIC, reduce your code,optimize functions, etc. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Sat Jun 02, 2012 1:55 pm |
|
|
Basically, the PIC only runs code in it's own memory.
Some larger PIC's allow external memory to be added to this area.
Other choice is to do what the Stamp's do,and have the code in the PIC form an interpreter, which then reads it's 'code' from an external memory. However it doesn't then directly 'run' this code.
Best Wishes |
|
|
Bilal
Joined: 24 Apr 2010 Posts: 75 Location: Islamabad
|
|
Posted: Sun Jun 03, 2012 9:24 am |
|
|
Hi i have watched a video
http://www.youtube.com/watch?v=5h28QiYlXe8&feature=related
guy did this with other controller
can i do the same with PIC??? I have some PICs like
PIC16F877A with external EEPROM
PIC18F4550 with external sdcard
and PIC32MX775F512H with external sdcard _________________ ... |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Sun Jun 03, 2012 9:38 am |
|
|
This is exactly what the STAMP's do.
Basically you are not running Arduino code, or PIC code, but code written in the language that the code in the host processor then understands.
Yes, you can do this. I'd say something like a couple of months careful work for a reasonable programmer would give a working program in the PIC, plus then the same again, or a bit more, to write the PC code to generate the byte patterns to store in the memory. In all, possibly about six months work.
Alternatively, buy the STAMP code which already exists.
Understand that with this flexibility comes a speed cost.
Best Wishes |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Sun Jun 03, 2012 10:10 am |
|
|
yup all it takes is time or money.
time..T's right MINIMUN of 6 months..10-12 hour days, 7 days a week....
money..buy product off the shelf that someone else has created.
Your choice...I've done both...have decided to cut CCS C code as it's easier,faster and FAR easier to debug...
J |
|
|
|