18F2510 help


Closed Thread
Results 1 to 8 of 8

Thread: 18F2510 help

Hybrid View

  1. #1

    Default 18F2510 help

    Hello Everyone. I recently added code to a program compiled for a 16F76 and it wouldn't fit in the PIC. So I compiled it for a 18F2510 and the timing seems to be off. Certain sections of the code seem to run slower while other sections run a little too fast. Does anyone have any suggestions? I changed adcon1 = 7 to adcon1 = 15 for the 18F PIC. I also had to remove my @device line to compile without errors. I then set the config bits within MPLAB before programming. Thank you.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Just make sure that all register match from one to another. Sometimes, some specific bits on a device are not located at the same place on another one.

    If you don't mind, post your code here.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thanks Steve. One interesting thing is the beginning of the program runs slow - delays that are supposed to last only 1/2 second take 2 seconds to complete. I was able to eliminate this by changing the Watchdog Postscaler from it's default of 1:128 to 1:8. However, later in the program there are delays that are supposed to last up to 6 seconds but finish in about 4-1/2 seconds. Any ideas?? - Thank you.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I didn't check the datasheet but, are you using the internal OSC (if there's) ?

    try the eternal Led Blink first and post your observations here.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Hi Steve. The circuit uses a 4MHZ ceramic resonator. Again, the 16F76 worked perfectly until I compiled it for 18F2510. I must be missing something???

  6. #6
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by peterdeco1 View Post
    Hi Steve. The circuit uses a 4MHZ ceramic resonator. Again, the 16F76 worked perfectly until I compiled it for 18F2510. I must be missing something???

    How are you implementing the delays?

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Weird,
    your ADCON setting is good, the comparator are off at POR... so...

    Any way to post your config fuses setting here?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

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