• AVR Freaks

Hot!Conceptual lagoon on configuration of secondary oscillator

Author
vra
Junior Member
  • Total Posts : 93
  • Reward points : 0
  • Joined: 2014/07/14 18:35:19
  • Location: 0
  • Status: offline
2019/09/05 14:10:14 (permalink)
0

Conceptual lagoon on configuration of secondary oscillator

Hi all, how are you?. I've a doubt here, to use the internal RTCC of a PIC24 I need to enable the timer 1 with clock source from the SOSC0 and SOSC1 pins but initially I've configured the FNOSC to work with the fast internal RC oscillator and this is the normal behavior (I think) the PIC uses when is powered on, then I need to know: if I change FNOSC to work with the SOSC then the PIC will start with the SOSC instead of the FRC?.
#1

6 Replies Related Threads

    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11284
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Conceptual lagoon on configuration of secondary oscillator 2019/09/05 15:15:09 (permalink)
    5 (1)
    if I change FNOSC to work with the SOSC then the PIC will start with the SOSC instead of the FRC?

     
    You haven't told us which PIC you're using so we can only guess, but why would you expect  the PIC to not start with SOSC if you had configured it for SOSC?
    #2
    NorthGuy
    Super Member
    • Total Posts : 5573
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Conceptual lagoon on configuration of secondary oscillator 2019/09/05 16:03:22 (permalink)
    0
    Many 16-bit PIC devices have a configuration bit which specify whether you want to start PIC with FRC then switch to the external oscillator when it's ready, or should it wait for the main oscillator to start and then start the PIC. This bit is usually called IESO.
    #3
    vra
    Junior Member
    • Total Posts : 93
    • Reward points : 0
    • Joined: 2014/07/14 18:35:19
    • Location: 0
    • Status: offline
    Re: Conceptual lagoon on configuration of secondary oscillator 2019/09/06 14:59:16 (permalink)
    0
    jtemples
    if I change FNOSC to work with the SOSC then the PIC will start with the SOSC instead of the FRC?

     
    You haven't told us which PIC you're using so we can only guess, but why would you expect  the PIC to not start with SOSC if you had configured it for SOSC?


    Only asking because it wasn't clear for me, I'm  using a PIC24EP512GU806
    #4
    vra
    Junior Member
    • Total Posts : 93
    • Reward points : 0
    • Joined: 2014/07/14 18:35:19
    • Location: 0
    • Status: offline
    Re: Conceptual lagoon on configuration of secondary oscillator 2019/09/06 15:01:24 (permalink)
    0
    NorthGuy
    Many 16-bit PIC devices have a configuration bit which specify whether you want to start PIC with FRC then switch to the external oscillator when it's ready, or should it wait for the main oscillator to start and then start the PIC. This bit is usually called IESO.


    Thanks but right know I don't want to switch oscillator (that comes soon), what I wanna do is use the timer 1 for clock source for RTCC and simply leave the PIC in idle mode.
    #5
    dan1138
    Super Member
    • Total Posts : 3189
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Conceptual lagoon on configuration of secondary oscillator 2019/09/08 16:50:08 (permalink)
    5 (1)
    Valery post #1
    I've a doubt here, to use the internal RTCC of a PIC24 I need to enable the timer 1 with clock source from the SOSC0 and SOSC1 pins but

    initially I've configured the FNOSC to work with the fast internal RC oscillator and

    this is the normal behavior (I think) the PIC uses when is powered on,

    then I need to know: if I change FNOSC to work with the SOSC then the PIC will start with the SOSC instead of the FRC?.

    When you configure the PIC this way the secondary oscillation amplifier will shutdown when the system oscillator is switched to the FRC.

    Valery post #4
    Only asking because it wasn't clear for me, I'm  using a PIC24EP512GU806

    Microchip does not offer the  PIC24EP512GUxxx in a 64-pin package.

    The data sheet does describe a PIC24EP512GP806 device in a 64-pin package. This controller does not include the USB module.

    Valery post #5
    I don't want to switch oscillator (that comes soon), what I wanna do is use the timer 1 for clock source for RTCC and simply leave the PIC in idle mode.

    For the PIC24EP512GP806 the RTCC can ONLY be clocked from the secondary oscillator. For RTCC the low power oscillation amplifier must be enabled by setting the LPOSCEN bit in the OSCCON register. This is tricky to do because writes to the OSCCON register require a special instruction sequence. This sequence is invoked by the __builtin_write_OSCCONL() function of the XC16 compiler. See attached example code.

    Here is code that should do the configuration and clock switching you may need:
    /*
     * File:   main.c
     * Target: PIC24EP512GP806
     * Compiler: XC16 v1.36
     * IDE: MPLABX v5.25
     *
     * Description:
     *
     *  The primary oscillator is enabled and expects an 8 MHz crystal
     *  connected to the oscillator pins (39,40).
     *
     *  The secondary oscillator is enabled and expects a 32.768 KHz crystal
     *  connected to the oscillator pins (47,48).
     *
     *  The FRC (7.3728 MHz) internal oscillator is used at power start
     *  then the PLL is configured for 96MHz operation using an 8 MHz external
     *  crystal connected to the primary oscillation amplifier.
     *
     *  Next TIMER1 is initialized to assert an interrupt once per second.
     *
     *  Finally the RTCC is initialized to assert an interrupt once per second.
     *
     * Created on September 8, 2019, 11:46 AM
     */

    // FGS
    #pragma config GWRP = OFF               // General Segment Write-Protect bit (General Segment may be written)
    #pragma config GSS = OFF                // General Segment Code-Protect bit (General Segment Code protect is disabled)
    #pragma config GSSK = OFF               // General Segment Key bits (General Segment Write Protection and Code Protection is Disabled)

    // FOSCSEL
    #pragma config FNOSC = FRC              // Initial Oscillator Source Selection bits (Internal Fast RC (FRC))
    #pragma config IESO = OFF               // Two-speed Oscillator Start-up Enable bit (Start up with user-selected oscillator source)

    // FOSC
    #pragma config POSCMD = XT              // Primary Oscillator Mode Select bits (XT Crystal Oscillator Mode)
    #pragma config OSCIOFNC = ON            // OSC2 Pin Function bit (OSC2 is general purpose digital I/O pin)
    #pragma config IOL1WAY = OFF            // Peripheral pin select configuration (Allow multiple reconfigurations)
    #pragma config FCKSM = CSECMD           // Clock Switching Mode bits (Clock switching is enabled,Fail-safe Clock Monitor is disabled)

    // FWDT
    #pragma config WDTPOST = PS32768        // Watchdog Timer Postscaler bits (1:32,768)
    #pragma config WDTPRE = PR128           // Watchdog Timer Prescaler bit (1:128)
    #pragma config PLLKEN = ON              // PLL Lock Wait Enable bit (Clock switch to PLL source will wait until the PLL lock signal is valid.)
    #pragma config WINDIS = OFF             // Watchdog Timer Window Enable bit (Watchdog Timer in Non-Window mode)
    #pragma config FWDTEN = OFF             // Watchdog Timer Enable bit (Watchdog timer enabled/disabled by user software)

    // FPOR
    #pragma config FPWRT = PWR128           // Power-on Reset Timer Value Select bits (128ms)
    #pragma config BOREN = OFF              // Brown-out Reset (BOR) Detection Enable bit (BOR is disabled)
    #pragma config ALTI2C1 = OFF            // Alternate I2C pins for I2C1 (SDA1/SCK1 pins are selected as the I/O pins for I2C1)

    // FICD
    #pragma config ICS = PGD1               // ICD Communication Channel Select bits (Communicate on PGEC1 and PGED1)
    #pragma config RSTPRI = PF              // Reset Target Vector Select bit (Device will obtain reset instruction from Primary flash)
    #pragma config JTAGEN = OFF             // JTAG Enable bit (JTAG is disabled)

    // FAS
    #pragma config AWRP = OFF               // Auxiliary Segment Write-protect bit (Aux Flash may be written)
    #pragma config APL = OFF                // Auxiliary Segment Code-protect bit (Aux Flash Code protect is disabled)
    #pragma config APLK = OFF               // Auxiliary Segment Key bits (Aux Flash Write Protection and Code Protection is Disabled)

    #include "xc.h"

    /*
     * Define the target system clock frequency.
     *
     * The initialization code MUST set the system clock to
     * support the choices made in the configuration words.
     *
     */

    /* WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
     *
     * The PIC24EP512GP806 does not support the auxiliary PLL module
     *
     * WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
     */
    #ifdef ENABLE_ALTERNATE_PLL
    /* Setup the clock to run at about 60 MIPS (60,000,000Hz) */
    #define FPRI  (8000000L)    /* Primary oscillator frequency */
    #define PLL_N1 (2L)         /* PLLPRE  CLKDIV<4:0> range 2 to 33 */
    #define PLL_M  (60)         /* PLLDIV  PLLFBD<8:0> range 2 to 513 */
    #define PLL_N2 (2L)         /* PLLPOST CLKDIV<7:6> range 2, 4 or 8 */
    #define FSYS (FPRI*PLL_M/(PLL_N1*PLL_N2))
    #define FCYC (FSYS/2L)
    #define APLL_N1 (2L)        /* APLLPRE  ACLKCON3<2:0> range 1,2,3,4,5,6,10 or 12    */
    #define APLL_M  (24L)       /* APLLDIV  ACLKDIV3<2:0> range 15,16,17,18,19,20,21 or 24 */
    #define APLL_N2 (2L)        /* APLLPOST ACLKCON3<7:5> range 256,64,32,16,8,4,2 or 1 */
    #define FUSB (FPRI*APLL_M/(APLL_N1*APLL_N2))
    #else
    /* Setup the clock to run at about 48 MIPS (48,000,000Hz) */
    #define FPRI  (8000000L)    /* Primary oscillator frequency */
    #define PLL_N1 (2L)         /* PLLPRE  CLKDIV<4:0> range 2 to 33 */
    #define PLL_M  (48)         /* PLLDIV  PLLFBD<8:0> range 2 to 513 */
    #define PLL_N2 (2L)         /* PLLPOST CLKDIV<7:6> range 2, 4 or 8 */
    #define FSYS (FPRI*PLL_M/(PLL_N1*PLL_N2))
    #define FCYC (FSYS/2L)
    #define APLL_N2 (2L)        /* APLLPOST ACLKCON3<7:5> range 256,64,32,16,8,4,2 or 1 */
    #define FUSB (FSYS/APLL_N2)
    #endif
    /*
     *  Global types
     */
    typedef union {
        struct {
            unsigned int YY;
            unsigned int MMDD;
            unsigned int WWHH;
            unsigned int MMSS;
        };
        struct {
            unsigned char BCD_Year;
            unsigned char BCD_reserved;
            unsigned char BCD_Day;
            unsigned char BCD_Month;
            unsigned char BCD_Hours;
            unsigned char BCD_DayOfWeek;
            unsigned char BCD_Seconds;
            unsigned char BCD_Minutes;
        };
    } RTCC_TimeOfDay_t;
    /*
     * Global constant data
     */
    const unsigned long gInstructionCyclesPerSecond = FCYC;
    const unsigned long gUsbClockCyclesPerSecond = FUSB;

    /* Initialize this PIC */
    void Init_PIC(void)
    {   
        unsigned int ClockSwitchTimeout;

        /*
        ** Disable all interrupt sources
        */
        __builtin_disi(0x3FFF); /* disable interrupts for 16383 cycles */
        IEC0 = 0;
        IEC1 = 0;
        IEC2 = 0;
        IEC3 = 0;
        IEC4 = 0;
        IEC5 = 0;
        IEC6 = 0;
        IEC7 = 0;
        IEC8 = 0;
        __builtin_disi(0x0000); /* enable interrupts */
        
        /*
         * At Power On Reset the configuration words set the system clock
         * to use the FRC oscillator. At this point we need to enable the
         * PLL to get the system clock running at 96MHz.
         *
         * Clock switching on the 24EP family with the PLL can be a bit tricky.
         *
         * First we need to check if the configuration words enabled clock
         * switching at all, then turn off the PLL, then setup the PLL and
         * finally enable it. Sounds simple, I know. Make sure you verify this
         * clock setup on the real hardware.
         */
        if(!OSCCONbits.CLKLOCK) /* if primary oscillator switching is unlocked */
        {
            /* Initiate Clock Switch to FRC oscillator (NOSC=0b000) */
            __builtin_write_OSCCONH(0x00);

            /* start clock switch */
            __builtin_write_OSCCONL(OSCCON | _OSCCON_OSWEN_MASK);
            
            /* wait, with timeout, for clock switch to complete */
            for(ClockSwitchTimeout=60000; --ClockSwitchTimeout && OSCCONbits.OSWEN;);

            /* Configure PLL prescaler, PLL postscaler, PLL divisor */
            PLLFBD=PLL_M-2;
    #if   PLL_N2==2
            CLKDIVbits.PLLPOST=0; /* N2=2 */
    #elif PLL_N2==4
            CLKDIVbits.PLLPOST=1; /* N2=4 */
    #elif PLL_N2==8
            CLKDIVbits.PLLPOST=3; /* N2=8 */
    #else
    #error invalid PLL_N2 paramenter
    #endif
            CLKDIVbits.PLLPRE=PLL_N1-2; /* N1=2 */

            /* Initiate Clock Switch to PRI oscillator with PLL (NOSC=0b011) */
            __builtin_write_OSCCONH(0x03);

            /* start clock switch */
            __builtin_write_OSCCONL(OSCCON | _OSCCON_OSWEN_MASK);

            /* wait, with timeout, for clock switch to complete */
            for(ClockSwitchTimeout=60000; --ClockSwitchTimeout && OSCCONbits.OSWEN;);

            /* wait, with timeout, for the PLL to lock */
            for(ClockSwitchTimeout=60000; --ClockSwitchTimeout && !OSCCONbits.LOCK;);
        }
        /*
         * Setup the alternate PLL to generate the USB clock
         */
        ACLKCON3 = 0;   /* Stop alternate PLL */
        ACLKCON3bits.AOSCMD  = 0; /* Auxiliary Oscillator disabled */
        ACLKCON3bits.ASRCSEL = 1; /* Primary Oscillator is the clock source for APLL */
        ACLKCON3bits.FRCSEL  = 0; /* Auxiliary Oscillator or Primary Oscillator is the clock source for APLL */

    #ifdef ENABLE_ALTERNATE_PLL
      #if   APLL_N1==1
        ACLKCON3bits.APLLPRE = 0b000;
      #elif APLL_N1==2
        ACLKCON3bits.APLLPRE = 0b001;
      #elif APLL_N1==3
        ACLKCON3bits.APLLPRE = 0b010;
      #elif APLL_N1==4
        ACLKCON3bits.APLLPRE = 0b011;
      #elif APLL_N1==5
        ACLKCON3bits.APLLPRE = 0b100;
      #elif APLL_N1==6
        ACLKCON3bits.APLLPRE = 0b101;
      #elif APLL_N1==10
        ACLKCON3bits.APLLPRE = 0b110;
      #elif APLL_N1==12
        ACLKCON3bits.APLLPRE = 0b111;
      #else
      #error invalid APLL_N1 paramenter
      #endif
     
      #if   APLL_M==15
        ACLKDIV3bits.APLLDIV = 0b000;
      #elif APLL_M==16
        ACLKDIV3bits.APLLDIV = 0b001;
      #elif APLL_M==17
        ACLKDIV3bits.APLLDIV = 0b010;
      #elif APLL_M==18
        ACLKDIV3bits.APLLDIV = 0b011;
      #elif APLL_M==19
        ACLKDIV3bits.APLLDIV = 0b100;
      #elif APLL_M==20
        ACLKDIV3bits.APLLDIV = 0b101;
      #elif APLL_M==21
        ACLKDIV3bits.APLLDIV = 0b110;
      #elif APLL_M==24
        ACLKDIV3bits.APLLDIV = 0b111;
      #else
      #error invalid APLL_M paramenter
      #endif
     
      #if   APLL_N2==256
        ACLKCON3bits.APLLPOST = 0b000;
      #elif APLL_N2==64
        ACLKCON3bits.APLLPOST = 0b001;
      #elif APLL_N2==32
        ACLKCON3bits.APLLPOST = 0b010;
      #elif APLL_N2==16
        ACLKCON3bits.APLLPOST = 0b010;
      #elif APLL_N2==8
        ACLKCON3bits.APLLPOST = 0b100;
      #elif APLL_N2==4
        ACLKCON3bits.APLLPOST = 0b101;
      #elif APLL_N2==2
        ACLKCON3bits.APLLPOST = 0b110;
      #elif APLL_N2==1
        ACLKCON3bits.APLLPOST = 0b111;
      #else
      #error invalid APLL_N2 paramenter
      #endif
        ACLKCON3bits.SELACLK = 1; /* Auxiliary PLL or oscillator provides the source clock for auxiliary clock divider */
        ACLKCON3bits.ENAPLL  = 1; /* APLL is enabled, the USB clock source is the APLL output */
        for(ClockSwitchTimeout=60000; --ClockSwitchTimeout && !ACLKCON3bits.APLLCK;);
    #else
        ACLKCON3bits.SELACLK = 0; /* Primary PLL provides the source clock for auxiliary clock divider */
        ACLKCON3bits.ENAPLL  = 0; /* APLL is disabled, the USB clock source is the input clock to the APLL */
    #endif

        /* make all inputs digital I/O */
        ANSELB   =  0x0000; /* Set for digital I/O */
        ANSELC   =  0x0000; /* Set for digital I/O */
        ANSELD   =  0x0000; /* Set for digital I/O */
        ANSELE   =  0x0000; /* Set for digital I/O */
        ANSELG   =  0x0000; /* Set for digital I/O */
        
        CM1CON  = 0x0000;
        CM2CON  = 0x0000;
        CM3CON  = 0x0000;
        
        _NSTDIS = 1;    /* disable interrupt nesting */
            
        TRISB   = 0xFFFF;
        TRISC   = 0xFFFF;
        TRISD   = 0xFFFF;
        TRISE   = 0xFFFF;
        TRISF   = 0xFFFF;
        TRISG   = 0xFFFF;
        
    }

    /* warning non-portable function */
    /*
     * This function waits for the at least the
     * specified number milliseconds then returns.
     */
    void delay( unsigned long wait_ms )
    {
        asm("L_wait:              \n"
            "    ior     %0,%1,w3 \n"
            "    BRA  Z, L_exit   \n"
            "    sub     #1,%0    \n"
            "    subb    #0,%1    \n"
            "    repeat  %2       \n"
            "    clrwdt           \n"
            "    repeat  %2       \n"
            "    clrwdt           \n"
            "    BRA     L_wait   \n" /* PIC24E takes 4 clocks */
            "L_exit:              \n"
            : /* no outputs */
            : /* inputs */
              "r" ((unsigned short)(wait_ms)),
              "r" ((unsigned short)(wait_ms>>16)),
              "r" ((unsigned short)(FCYC/2/1000-6))
            : /* registers clobered */
              "w3"
            );
    }
    /*
     *  Initialize Real Time Clock Calender module
     */
    void Init_RTCC(const RTCC_TimeOfDay_t *Current, const RTCC_TimeOfDay_t *Alarm)
    {
        /*
         * There is a potential conflict with Auxiliary Clock Generation.
         *
         * The Auxiliary Clock Generation must use another clock
         * source when RTCC uses the the secondary oscillator
         * as the low power oscillator oscillator.
         */
        _RTCIE = 0;         /* Disable RTCC alarm interrupt */
        _RTCIP = 4;         /* Set RTCC alarm interrupt priority */
        /* Turn on Low Power Oscillator connected to RC13,RC14 (PGD2,PGC2) */
        __builtin_write_OSCCONL(OSCCON | _OSCCON_LPOSCEN_MASK);

        /* This is a replacement for the __builtin_write_RTCWREN() function that was giving me trouble */
        /* enable write to the RTCC */
        asm volatile(
            " disi #5\n"             /* disable interrupts for 5 cycles */
            " mov  #0x55, w0\n"      /* write first step of unlock sequence */
            " mov  w0,_NVMKEY\n"
            " mov  #0xAA, w1\n"      /* write second step of unlock sequence */
            " mov  w1,_NVMKEY\n"
            " bset %[REG],#%[BIT]\n" /* set the RTCWREN bit to unlock writes ro the RTCC */
            : /* no outputs */
            :  [REG]"U"(RCFGCAL),[BIT]"i"(_RCFGCAL_RTCWREN_POSITION)
            : "w0", "w1"    /* clobbers these working registers */
            );
        _RTCEN = 1;         /* enable the RTCC module */
        if(Current)
        {
            _RTCPTR = 0b11;     /* set the RTCC Value register window to Year */
            RTCVAL  = Current->YY & 0x00FF;
            RTCVAL  = Current->MMDD;
            RTCVAL  = Current->WWHH;
            RTCVAL  = Current->MMSS;
        }

        if(Alarm)
        {
            /* disable alarm and set alarm register pointer to Month and Day */
            ALCFGRPT = (0b10<<_ALCFGRPT_ALRMPTR_POSITION);
            ALRMVAL  = Alarm->MMDD;
            ALRMVAL  = Alarm->WWHH;
            ALRMVAL  = Alarm->MMSS;
        }

        /* enable and alarm every one second */
        ALCFGRPT = ALCFGRPT | (0b0001<<_ALCFGRPT_AMASK_POSITION)
                            | (1<<_ALCFGRPT_CHIME_POSITION)
                            | (1<<_ALCFGRPT_ALRMEN_POSITION);

        _RTCWREN = 0;       /* lock the RTCC, no more writes */

        _RTCIF = 0;         /* Clear RTCC alarm interrupt assertion */
        _RTCIE = 1;         /* Enable RTCC alarm interrupt */
    }
    /*
     * Initialize TIMER1
     */
    void Init_TIMER1( void )
    {
        /*
         * There is a potential conflict with Auxiliary Clock Generation.
         *
         * The Auxiliary Clock Generation must use another clock
         * source when TIMER1 uses the the secondary oscillator
         * as the low power oscillator oscillator.
         */
        /* Turn in Low Power Oscillator connected to RC13,RC14 (PGD2,PGC2) */
        __builtin_write_OSCCONL(OSCCON | _OSCCON_LPOSCEN_MASK);

        T1CONbits.TON = 0;      /* Disable Timer */
        T1CONbits.TCS = 1;      /* External clock from TxCK pin */
        T1CONbits.TGATE = 0;    /* Disable Gated Timer mode */
        T1CONbits.TCKPS = 0b00; /* Select 1:1 Prescaler */
        T1CONbits.TSYNC = 0;    /* Do not synchronize external clock input */
        TMR1 = 0;               /* Clear timer register */
        PR1 = 32767;            /* Load the timer reset count value */
        IPC0bits.T1IP = 0x04;   /* Set Timer1 Interrupt Priority Level */
        IFS0bits.T1IF = 0;      /* Clear Timer1 Interrupt Flag */
        IEC0bits.T1IE = 1;      /* Enable Timer1 interrupt */
        T1CONbits.TON = 1;      /* Start Timer */
    }
    /*
     * Power on rest values for RTCC
     */
    const RTCC_TimeOfDay_t Datum_TOD   = {{0x0019, 0x0908, 0x0000, 0x0000}};
    const RTCC_TimeOfDay_t Datum_Alarm = {{0x0000, 0x0000, 0x0000, 0x0000}};
    /*
     * Application start
     */
    int main(void)
    {
        Init_PIC();

        Init_TIMER1();
        Init_RTCC(&Datum_TOD, &Datum_Alarm);

        /* Application loop */
        for(;;)
        {
        }
        return 0;
    }
    /*
     * Handle TIMER1 interrupt
     */
    void __attribute__((__interrupt__, no_auto_psv)) _T1Interrupt(void)
    {
        IFS0bits.T1IF = 0;  /* Clear Timer1 Interrupt Flag */
    }
    /*
     * Handle RTCC interrupt
     */
    void __attribute__((__interrupt__, no_auto_psv)) _RTCCInterrupt(void)
    {
        _RTCIF = 0;  /* Clear RTCC Interrupt Flag */
    }

    #6
    vra
    Junior Member
    • Total Posts : 93
    • Reward points : 0
    • Joined: 2014/07/14 18:35:19
    • Location: 0
    • Status: offline
    Re: Conceptual lagoon on configuration of secondary oscillator 2019/09/10 16:57:31 (permalink)
    0
    dan1138
    Microchip does not offer the  PIC24EP512GUxxx in a 64-pin package.
    The data sheet does describe a PIC24EP512GP806 device in a 64-pin package. This controller does not include the USB module.

     
    Hey Dan, thanks for the correction, the U was an error and yes, I'm using the functions providede by XC16 compiler to write to OSCCON
    #7
    Jump to:
    © 2019 APG vNext Commercial Version 4.5