I've got some C source code here which was designed to run on the 16F648. Because i've only got the 16F887 handy, would this program run on that too? I've changed the header file and it seems to have compiled ok? Is there any way of checking intercompatibility between mcu's?
(Sorry, i'm new to this)
Many Thanks in Advance
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
Posted: Fri Apr 30, 2010 11:56 am
Intercompatibility
PIC's are pretty good in this regard. Now small featured MCU's can't be given big features with code. Typically if it compiles you are probably good to go.
newguy
Joined: 24 Jun 2004 Posts: 1909
Posted: Fri Apr 30, 2010 12:22 pm
If the code is "normal" - ordinary C code - you're fine. If the original code refers to registers within the processor, you might not be fine.
Look for things like:
Code:
#byte SOME_REGISTER = 0xc7
or
Code:
#org
If you see things like that, you'll have to make sure that the code refers to the same (or equivalent) register or memory location/range in the new processor as with the old.
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