PDA

View Full Version : Code Executing Slow



Frozen001
- 5th September 2008, 19:19
Hi all....

I have taken over a project from someone else who was using a different programmer than me. Same code, but when I program it the code executes VERY...VERY slow... any thoughts??

The code works fine, just it is in like slow motion....

Thanks

Archangel
- 5th September 2008, 19:56
Hello Frozen001,
Without seeing the code, or knowing the PIC you are using . . .
Probably the main OSC is not working, and it is running on backup OSC I. E. FSCM
Fail Safe Clock Monitor, likely your friends code has no config fuses set and they did that manually in the programmer

Frozen001
- 5th September 2008, 20:01
Hello Frozen001,
Without seeing the code, or knowing the PIC you are using . . .
Probably the main OSC is not working, and it is running on backup OSC I. E. FSCM
Fail Safe Clock Monitor, likely your friends code has no config fuses set and they did that manually in the programmer

The PIC is an 18F8722, with a 20MHz external clock...

When I got the circuit card, the code was programmed on the PIC. I took the exact code on the chip, changed what was displayed on a display, adn programmed the PIC. Ever since then it is in slow motion...

Archangel
- 5th September 2008, 20:34
The PIC is an 18F8722, with a 20MHz external clock...

When I got the circuit card, the code was programmed on the PIC. I took the exact code on the chip, changed what was displayed on a display, adn programmed the PIC. Ever since then it is in slow motion... I don't think the config fuses are going to be recovered from the hex when you read a chip, though I might be wrong. In using ICPROG it has available the option to set the fuses in the programmer, if the chip doesn't know about the EXT. OSC, it will run on what it finds inside, again FSCM . . . , have you verified the ext. OSC is working ?

Frozen001
- 5th September 2008, 20:43
I don't think the config fuses are going to be recovered from the hex when you read a chip, though I might be wrong. In using ICPROG it has available the option to set the fuses in the programmer, if the chip doesn't know about the EXT. OSC, it will run on what it finds inside, again FSCM . . . , have you verified the ext. OSC is working ?

I figured it out, the oscilator type in the include file was set wrong on my end.

I thought it was using a copy of the file in the local directory instead of the one in the path...

Is there a way to ensure the compilier uses local copies rather than the ones in the path?

Archangel
- 5th September 2008, 21:09
I always put the Config settings in my source code, the compiler appends it to the hex and it is set for you when you open the file in the programmer.