'DEFINE OSC 8' seems to be ignored by PBP ?


Results 1 to 19 of 19

Threaded View

  1. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Could you try those lines ???

    Code:
     
     
    @ Errorlevel -306
     
    '-----------------------
    ' PIC Defines
    ' ===========
     'Config bits 
     
    @    __CONFIG  _CONFIG1H, _IESO_OFF_1H & _FSCM_OFF_1H & _INTIO2_OSC_1H
    @    __CONFIG  _CONFIG2L, _PWRT_ON_2L & _BOR_ON_2L & _BORV_27_2L
    @    __CONFIG  _CONFIG2H, _WDT_ON_2H & _WDTPS_32K_2H
    @    __CONFIG  _CONFIG3H, _MCLRE_OFF_3H
    @    __CONFIG  _CONFIG4L, _DEBUG_OFF_4L & _LVP_OFF_4L & _STVR_OFF_4L
    @    __CONFIG  _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L
    @    __CONFIG  _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
    @    __CONFIG  _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L
    @    __CONFIG  _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
    @    __CONFIG  _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L
    @    __CONFIG  _CONFIG7H, _EBTRB_OFF_7H    
     
    '    Include "modedefs.bas"          ' Include serial modes
    '   DEFINE OSC 8 '8Mhz clock used. Note - Set PIC config fuses on programmer to use Internal RC OSC
    ' Define some constants if needed
     
     ....
    ....
     
     
    ' Initialise Processor - check for each PIC type 
    ' --------------------
        ADCON1 = %11111111              'Turn off all AD's     
        OSCCON =  %01100111     'set INTRC to 4 MHZ    <<<  I Think the error was here : define directly bits without ANY ORing ...
    '    OSCCON = %01110111     'set INTRC to 8 MHZ
    '    OSCTUNE = 0                      'OSC trim set to Null
    and comment your configs ... ( I cut and pasted from an old 1320 program of mine ... as you see I never believe in defaults !!! )

    your OSCCON settings ... mmmhhhh, how to say, ... I do not like them !!!!

    Alain
    Last edited by Acetronics2; - 25th May 2010 at 12:52.
    ************************************************** ***********************
    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 " !!!
    *****************************************

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