2nd Set of Eyes - with my Config settings for PIC16F1825 - running internal 32mhz OSC


+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2007
    Posts
    69

    Default 2nd Set of Eyes - with my Config settings for PIC16F1825 - running internal 32mhz OSC

    Hello all,
    I've ordered a few PIC16F1825 - and I'm excited about the internal 32Mhz OSC in this chip.
    I've been looking at the Datasheet and the PBP3 config file for this device - and I think I understand the config settings in order to turn switch to the internal 32Mhz OSC. If I understand correctly - its running an 8Mhz clock with a 4x PLL to bump it up to 32Mhz

    Is anyone running this chip this way - and could you let me know if I have the config settings ok?
    Sincere thanks!

    #CONFIG
    __CONFIG _CONFIG1, _FCMEN_OFF & _IESO_OFF & _FOSC_INTOSC & _PLLEN_ON & _WDTE_SWDTEN & _MCLRE_OFF & _CP_OFF & _BOREN_OFF & _PWRTE_OFF
    __CONFIG _CONFIG2, _LVP_OFF

    #ENDCONFIG

    OSCCON = %11110100
    '----------------------------------------------------------------------------------------------------------------------
    ' OSCCON (FOSC and SCS Bits 2-0) set to 100 and FOSC_INTOSC set in #CONFIG above
    ' OSCCON (IRCF bits 3:0) set to 1110 - this sets the 8Mhz Clock - and the 4X PLL set above in #CONFIG will multiply to 32Mhz
    ' OSCCON (SPLLEN bit 7) PLL enable-bit enables 4xPLL


    DEFINE OSC 32 ' Tells PBP we are running at 32MHz

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

    Default Re: 2nd Set of Eyes - with my Config settings for PIC16F1825 - running internal 32mhz

    config looks ok while that osccon setting will work

    osccon bit 7 SPLLEN: Software PLL Enable bit
    If PLLEN in Configuration Word 2 = 1: ie & _PLLEN_ON
    SPLLEN bit is ignored. 4xPLL is always enabled (subject to oscillator requirements)

    and
    osccon bit 2 is Unimplemented: Read as 0

    so osccon = $70 ; is the way i do it %01110000

    you can also wait till OSCSTAT.6 is set [pll ready]
    before any functions are used that need clock stability

    while !OSCSTAT.6 : wend ;pll ready
    This is more entertaining than Free to Air TV

  3. #3
    Join Date
    Jan 2007
    Posts
    69

    Default Re: 2nd Set of Eyes - with my Config settings for PIC16F1825 - running internal 32mhz

    Thank you Richard!
    Much appreciate!


    Am I correct about the following also:
    16mhz internal clock: Set PLLEN off - and set IRCF = 1111
    8mhz internal clock: Set PLLEN off - and set IRCF = 1110

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    1,777

    Default Re: 2nd Set of Eyes - with my Config settings for PIC16F1825 - running internal 32mhz

    Am I correct about the following also:
    16mhz internal clock: Set PLLEN off - and set IRCF = 1111
    8mhz internal clock: Set PLLEN off - and set IRCF = 1110
    the x4pll only works for intosc = 8mhz or suitable ext osc
    with no pll intosc from datasheet :-
    Name:  osc.jpg
Views: 20
Size:  50.8 KB
    This is more entertaining than Free to Air TV

  5. #5
    Join Date
    Jan 2007
    Posts
    69

    Default Re: 2nd Set of Eyes - with my Config settings for PIC16F1825 - running internal 32mhz

    Thanks again - Richard!
    Much appreciate!

Similar Threads

  1. Replies: 6
    Last Post: - 25th November 2020, 09:59
  2. Bootloader pic16f1825 @32mhz pll
    By richard in forum General
    Replies: 10
    Last Post: - 13th July 2016, 13:42
  3. 16f54 stops running with RC OSC
    By tshaffer in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 26th February 2012, 16:48
  4. Noobie could use a second set of eyes pls
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th June 2009, 01:00
  5. Internal osc config PIC12F609
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 23rd April 2008, 17:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts