I don't understand my mistake


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Posts
    13

    Question I don't understand my mistake

    hello everybody,

    before format my PC, my code worked well and the compilator too
    after I installed all my programs (same programs) on my fresh windows, I got a error that I don't understand why...

    this is my code simplified :
    Code:
    #CONFIG
        CONFIG PLLSEL = PLL3X	    ;3x clock multiplier
        CONFIG CFGPLLEN = ON      ;PLL Disabled (firmware controlled)
        CONFIG CPUDIV = NOCLKDIV	    ;CPU uses system clock (no divide)
        CONFIG LS48MHZ = SYS48X8            ;System clock at 48 MHz, USB clock divider is set to 8
        CONFIG FOSC = INTOSCIO                      ;HS oscillator, high power 16MHz to 25MHz
        CONFIG PCLKEN = OFF          ;Primary oscillator enabled
        CONFIG FCMEN = OFF	    ;Fail-Safe Clock Monitor disabled
        CONFIG IESO = OFF	    ;Oscillator Switchover mode disabled
        CONFIG nPWRTEN = OFF	    ;Power up timer enabled
        CONFIG BOREN = OFF	    ;BOR controlled by firmware (SBOREN is enabled)
        CONFIG BORV = 285	    ;BOR set to 1.9V nominal
        CONFIG nLPBOR = OFF	    ;Low-Power Brown-out Reset disabled
        CONFIG WDTEN = ON	    ;WDT enabled in hardware (SWDTEN ignored)
        CONFIG WDTPS = 512	    ;1:512
        CONFIG CCP2MX = RC1	    ;CCP2 input/output is multiplexed with RC1
        CONFIG PBADEN = OFF	    ;PORTB<5:0> pins are configured as digital I/O on Reset
        CONFIG T3CMX = RC0	    ;T3CKI function is on RC0
        CONFIG SDOMX = RB3	    ;SDO function is on RB3
        CONFIG MCLRE = ON	    ;MCLR pin enabled; RE3 input disabled
        CONFIG STVREN = ON	    ;Stack full/underflow will cause Reset
        CONFIG LVP = OFF	    ;Single-Supply ICSP disabled
        CONFIG XINST = OFF	    ;Instruction set extension and Indexed Addressing mode disabled
    #ENDCONFIG
    
    DEFINE OSC          48
    
    OSCCON  = %01110000     'OSCint = 16Mhz
    OSCCON2 = %00010000
    ACTCON  = %10010000
    
    ProgramStart: 
        clearwdt
        goto programstart
    with this code, I got a config directive error




    and the error file :



    someboby can help me to resolve this error?

    thanks

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: I don't understand my mistake

    Hi,
    CONFIG nPWRTEN = OFF
    CONFIG nLPBOR = OFF

    I don't the n's should be there. I don't have the config files on this computer but verify that 285 is indeed a valid setting for the brownout, message says it's not....

    Are you compiling for the correct chip?

    /Henrik.

  3. #3
    Join Date
    Mar 2011
    Posts
    13


    Did you find this post helpful? Yes | No

    Default Re: I don't understand my mistake

    hi,

    this was my first idea, but the n's is correct, it is the same in pic18f45k50.pbpinc file
    and the 285 value for BORV is correct too

    may be I don't check an option in editor option? I really don't know because this code work well before format and install the computer...

  4. #4
    Join Date
    Mar 2011
    Posts
    13


    Did you find this post helpful? Yes | No

    Default Re: I don't understand my mistake

    hi,

    I find my mistake :-)
    I uninstall mplab 8.85 for the last mplab version : 8.92...

    and now all my code is compiled without error ... really crazy :-)

Similar Threads

  1. Please help me understand this code
    By lilimike in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 3rd May 2010, 19:50
  2. Does anyone understand descriptors ?
    By Bonxy in forum USB
    Replies: 1
    Last Post: - 18th March 2010, 03:35
  3. I don't understand this code!
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 13th February 2008, 03:55
  4. SERIN2 – SEROUT2 and Manchester mistake.
    By RCtech in forum Serial
    Replies: 8
    Last Post: - 4th September 2007, 23:55
  5. I don't understand
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th March 2007, 03:56

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