Hmmmm.....maybe what you want to do is run one of the newer PIC18F in the microprocessor mode, have external memory and overwrite the file. I've never looked .into this...can you have embedded code and run from external memory..ie...memory mapped of sorts? So your bootloader is resident, and just updates when required. Or.... Sometimes you gotta step back and think....is a PIC the best way? FPGA's can be reloaded on the fly. For example, the Xilinx Spartan 3E I am currently using can load code from either the top of the external memory, or the bottom. Might need something external to switch it. Run a pico-blaze or microblaze in the core, but it can get new code and write it out the the external flash and then reboot. dgdg ghhghg wrote: Hello, It is like a bootloader, I am trying to identify the main issues, if anyone can help then good, otherwise I shall check out the bootloader. Can anyone refer me to an explanation how to write, lets say, 1,2,3,4,5 into rom memory ? better still, how to write the contents of an array a[5] to rom (a[0],a[1]...) Next issue, I will have a "do nothing" function hard coded, e.g. void do_nothing(void) { ; } What do I do to change the contents, I need the rom location of the function to which I will write, changing the functionality from "do nothing" to "do something", but keeping the name "do_nothing" I also need to reserve bytes in "do_nothing" so that "do someting" doesn't extend into possible code which is after it. Also, my code needs to be address independant, assuming the compiler is unaware that I am actually sending the assembled code down a serial line. Thanks. dgdg ghhghg wrote: Is it possible to send a function to a 18fxxxx pic, what I mean is that I can send the function by rs232, then I want the pic to jump to it, so there is a need to write the ram data to rom so that I can jump into it, has anyone done something like that? Thanks. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist