CAn't get PLL to work on 18LF4620


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Give this a shot
    Code:
    @ __CONFIG    _CONFIG1H, _OSC_INTIO67_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
    @ __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    @ __CONFIG    _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
    @ __CONFIG    _CONFIG4L,  _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L
    
    DEFINE OSC 32
    
    OSCCON = %01110000
    OSCTUNE = %01000000
    Dave
    Always wear safety glasses while programming.

  2. #2


    Did you find this post helpful? Yes | No

    Default ERROR Overwriting previous address contents

    Thanks Dave,
    I pasted your lines of code into my program but now I get a slew of
    "ERROR Overwriting previous address contents" messages. Not sure how to handle this.

    Cheers
    BrianT

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    When setting the configs in code space you need to modify the *.inc file for the chip in the PBP directory. Comment out the configs there. Or just modify the *.inc with the new configs.
    http://www.picbasic.co.uk/forum/cont...o-your-Program
    Dave
    Always wear safety glasses while programming.

  4. #4


    Did you find this post helpful? Yes | No

    Default Will stick with USB Programmer fuse settings

    Thanks Dave but changing the .inc file is more pain than gain.

    This little project has three 18F4620. One uses IntIO2 at 4 MHz which is where I want to activate the PLL, another uses HS with a crystal at 20 MHz and the third uses XT with a crystal at 4 MHz. It is easier to just change the Config fuses on the MeLabs USB serial programmer.

    Cheers
    Brian

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Thanks Dave but changing the .inc file is more pain than gain.
    That is why I comment the *.inc and set the fuses in code space.

    But did you get it working like you want?
    Dave
    Always wear safety glasses while programming.

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