Code Executing Slow


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2008
    Posts
    39

    Default Code Executing Slow

    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

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    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
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Aug 2008
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    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...

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Frozen001 View Post
    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 ?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Aug 2008
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    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?

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    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.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Slow code needs a tune up
    By Tobias in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th January 2010, 15:05
  2. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  3. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  4. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  5. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts