Problem with A port on 18F2550


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Yes every 2 seconds

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


    Did you find this post helpful? Yes | No

    Default

    Out of curiosity, which PIC programmer do you use?

    could you post your compiled .HEX file?

    Make sure your MCLR pin is tied to Vcc via a resistor.

    Seems to work as design 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

    I'm using a ICD2 compiler.

    He're is the hex file
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    OK i got the same problem here. Are you using the same code as in POST #1 ???

    One thing is sure, if i disable the Watchdog timer, it works...
    Steve

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

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    OK i got the same problem here. Are you using the same code as in POST #1 ???

    One thing is sure, if i disable the Watchdog timer, it works...
    That's why I asked 'Does it show ">Start<" every 2 seconds out the serial port'...
    In the picture posted earlier with all the fuses shown, the WDT prescaler is set to 1:128 and Enabled.
    (Yesterday when I asked the question about the 2 seconds, I had the math worked out and it came up to about 2 seconds (give or take)...
    Tonight when I do the math, I only get 1/2 second...I musta been drunk or something )

  6. #6


    Did you find this post helpful? Yes | No

    Default

    So you guys say shut down the watchdog timer. How can i do this?
    Can this be the reason that a other microprocessor board with same config and same sort of simple program hangs after a few days.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by NL2TTL View Post
    So you guys say shut down the watchdog timer. How can i do this?
    Can this be the reason that a other microprocessor board with same config and same sort of simple program hangs after a few days.
    1 - Reopen the same program you opened in Post #5 (MPLAB IDE)
    2 - Left-Click on the 'Configure' menu
    3 - Further click on 'Configuration Bits'
    4 - Press the down arrow on your keyboard 10 times
    5 - By now you should have '300003 1F Watchdog Timer Enabled' selected
    6 - Left-Click on the line that is now highlighted
    7 - Left-Click on the drop-down menu that appears
    8 - Left-Click on the words 'Disabled-Controlled by SWDTEN bit'

    2nd question - it's possible...

    Or you could turn up your WDT post-scaler.
    Last edited by skimask; - 9th May 2007 at 08:50.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by NL2TTL View Post
    So you guys say shut down the watchdog timer. How can i do this?
    Can this be the reason that a other microprocessor board with same config and same sort of simple program hangs after a few days.
    Find your .lst file for this program. Search for the:

    Main:
    High Relais1
    Goto Main:

    block and see if there is a CLEARWDT in the middle of the loop. If not, then do like Paul said and add a CLEARWDT in the middle of the loop in your source file. That should fix it without having to mess with the config settings.
    And which version of PBP are you using? Maybe that's got something to do with the problem...

Similar Threads

  1. Array problem (18F2550)
    By Ronald123 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th January 2008, 18:47
  2. Setting up Port b for I2C on 18f2550
    By rjones2102 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd October 2007, 20:22
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. PWM problem CCP2 port
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 19th September 2006, 23:34
  5. COM port problem
    By andys280176 in forum Serial
    Replies: 0
    Last Post: - 19th January 2006, 16:42

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