View previous topic :: View next topic |
Author |
Message |
KentR
Joined: 21 Jun 2010 Posts: 11
|
PIC18F67J10 - Code is making a non-requested jump? |
Posted: Sat Aug 28, 2010 7:34 am |
|
|
Ok, I have a really strange problem. I have a project with multiple C modules. Two of the modules are very similar (MotorA and MotorB). The MotorB routine seems to be functioning correctly, but MotorA is not. Using the debugger, I am able to step through the code, and a really strange thing is happening.
It executes the first couple statements of the MotorA routine correctly. Then it enters a select-case statement. It jumps to the correct case, BUT IN THE MotorB ROUTINE! I don't understand why it is jumping to the other module. Could this be some kind of linking error? Everything has distinct naming (variables, function names, ...), so I don't know what could be making it jump. Has anyone seen this happen to them?
I am using a PIC18F67J10 device. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Aug 28, 2010 2:14 pm |
|
|
Do you have the XINST fuse set ? If so, change it to NOXINST.
Using XINST can cause erratic operation (it's not supported by CCS). |
|
|
KentR
Joined: 21 Jun 2010 Posts: 11
|
|
Posted: Sun Aug 29, 2010 5:47 pm |
|
|
Thanks! I'll try that first thing Monday! |
|
|
|