+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2005
    Location
    Cocoa, Florida
    Posts
    34

    Default Cannot compile 16F15345

    Can't find anything on forum.

    The default config doesn't work, nor any of my attempts to fix it.
    Latest IDE, latest PBP Gold 3.1. Current Microchip everything.
    This board worked fine with a 18F13K22 but someone insisted we go to 16F15345.
    It has a 16Meg external oscillator and needs 4x PLL.

    #CONFIG
    __config _CONFIG1, _FEXTOSC_OFF & _RSTOSC_HFINT32 & _CLKOUTEN_OFF & _CSWEN_ON & _FCMEN_ON
    __config _CONFIG2, _MCLRE_ON & _PWRTE_ON & _LPBOREN_OFF & _BOREN_ON & _BORV_LO & _ZCD_OFF & _PPS1WAY_OFF & _STVREN_ON
    __config _CONFIG3, _WDTCPS_WDTCPS_11 & _WDTE_ON & _WDTCWS_WDTCWS_6 & _WDTCCS_HFINTOSC
    __config _CONFIG4, _BBSIZE_BB512 & _BBEN_OFF & _SAFEN_OFF & _WRTAPP_OFF & _WRTB_OFF & _WRTC_OFF & _WRTSAF_OFF & _LVP_OFF
    __config _CONFIG5, _CP_OFF
    #ENDCONFIG

    It doesn't like the other type of config, either, returning: (Processor "16F15345" is invalid for CONFIG directive.)

    Thanks in anticipation, Ken.

    Name:  16F15345.PNG
Views: 67
Size:  14.6 KB

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    1,341

    Default Re: Cannot compile 16F15345

    ASM ERROR] (Invalid OSC Define.) (0) : Error[101]
    ASM ERROR] Symbol not previously defined (PAUSEUSL) (0) : Error[113]
    is not a config error , the problem lies in the code not posted , somewhere an
    invalid OSC define exists
    This is more entertaining than Free to Air TV

  3. #3
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    203

    Default Re: Cannot compile 16F15345

    What jumps out for me is you say you are using a 16 MHz external oscillator, yet in your CONFIG statement you list:

    Code:
    _FEXTOSC_OFF & _RSTOSC_HFINT32
    Your CONFIG should have _FEXTOSC_EHC & _RSTOSC_EXT1X.

    Also, since you didn't post the rest of your code, I am taking a guess here. The 16F15345 has an SFR called OSCEN that allows you to turn ON different oscillators. Bit 7 enables your EXTernal OSCillator (EXTOSC), bit 6 enables your HFINTOSC you are using for your Watch Dog Timer (_WDTCCS_HFINTOSC in your CONFIG3).

    In my experience, the Compiler will generate totally non-related Errors at times. I would start here.

  4. #4
    Join Date
    Mar 2005
    Location
    Cocoa, Florida
    Posts
    34

    Default Re: Cannot compile 16F15345

    You guys are right as usual. It had define OSC 64 for historical reasons.
    Here's the story: This is the guts for a lung ventilator.
    I designed all the boards, and do firmware everywhere else, but another programmer does this one board.
    It originally had 18F13K22 with 16Meg PLL to 64, worked great. The other programmer insisted he had to have another UART for debug because he doesn't like to bitbash (even for debug?), and picked this chip as a replacement. I now need to change the simple routine that tests the hardware.
    It doesn't run at 64M, max 32, but no one bothers to tell me, and it still has a 16M oscillator

  5. #5
    Join Date
    Mar 2005
    Location
    Cocoa, Florida
    Posts
    34

    Default Re: Cannot compile 16F15345

    Yes, I posted the default. I tried lots of combinations but was trying to get this chip to run at 64 MHZ, when the max is 32.

Similar Threads

  1. Conditional compile
    By pedja089 in forum PBP3
    Replies: 2
    Last Post: - 16th January 2014, 21:25
  2. E8 will not compile
    By l_gaminde in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st May 2013, 20:36
  3. will not compile
    By l_gaminde in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th September 2010, 19:37
  4. Cannot get pbp to compile
    By Tom@Nottingham in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 2nd April 2009, 16:24
  5. Can't compile
    By Lilmanmgf in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd October 2006, 19:17

Members who have read this thread : 20

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