Please help...


Closed Thread
Results 1 to 17 of 17

Thread: Please help...

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    A drink:P

    Is there any way of setting the OSC to HS in the program itself rather than having to change it on the programmer each time?

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Depends on the IDE you're using ...

    For MPLAB :

    Code:
     @    __config _HS_OSC
    For µCode Studio

    Code:
    @   DEVICE pic16F877a,HS_OSC
    Alain
    Last edited by Acetronics2; - 9th April 2008 at 14:40.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Depends on the IDE you're using ...
    MicroCode Studio

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink

    sooooo,

    For µCode Studio

    Code:
    @   DEVICE pic16F877a,HS_OSC
    Regards
    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Its really wierd...
    It wont accept that or any of the other suggestions, the only way I could get the HS_OSC in the code so it produced no errors was to use DEFINE pic16F877a,HS_OSC
    However, although this gives no errors when you compile it, when you try and program it using Picflash it still sets Oscillator to XT and not HS
    guess i'll just have to keep an eye on it and change it whenever I program it

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    DEFINE only sets PbP internal values ... doesn't deal with Pic Registers.

    I think there is a consistent thread about that on the Forum, Written by Melanie.

    A SEARCH will be welcome ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    From post 1 to 5

    Presetting Configuration Fuses (PIC Defines) into your Program
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    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