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

Run code outside the flash

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



Joined: 24 Apr 2010
Posts: 75
Location: Islamabad

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

Run code outside the flash
PostPosted: Sat Jun 02, 2012 7:45 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jun 02, 2012 8:32 am     Reply with quote

get a bigger PIC.

;)
_________________
CCS PCM 5.078 & CCS PCH 5.093
temtronic



Joined: 01 Jul 2010
Posts: 9225
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jun 02, 2012 12:25 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jun 02, 2012 1:55 pm     Reply with quote

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

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

PostPosted: Sun Jun 03, 2012 9:24 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jun 03, 2012 9:38 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Jun 03, 2012 10:10 am     Reply with quote

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
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