Menu

Q family

Help
Zio Fanale
2022-01-21
2022-01-25
  • Zio Fanale

    Zio Fanale - 2022-01-21

    Hello all
    I just need to configure 18FxxQxx devices with 16 MHz external xtal module, and PLL 4x to run at 64 Mhz clock... that's all !
    Any advice ?
    Thank you !

     

    Last edit: Zio Fanale 2022-01-21
  • Anobium

    Anobium - 2022-01-21

    Add this to your program. If you are using the latest compiler.

    #chip 18FxxQxx, 64  'whatever your chip is...
    
    // CONFIG1
    #pragma config FEXTOSC = HS    // External Oscillator Selection->HS (crystal oscillator) above 8 MHz
    #pragma config RSTOSC = EXTOSC_4PLL    // Reset Oscillator Selection->EXTOSC with 4x PLL, with EXTOSC operating per FEXTOSC bits
    
    // CONFIG2
    #pragma config CLKOUTEN = OFF    // Clock out Enable bit->CLKOUT function is disabled
    
     
  • William Roth

    William Roth - 2022-01-25

    Does #pragma work when pic-as is NOT selected as the assembler ?

     
    • Anobium

      Anobium - 2022-01-25

      Yes.

       
  • William Roth

    William Roth - 2022-01-25

    OK,

    However it appears that both #pragma and config are case sensitive.

    #pragma config FEXTOSC = HS   //  This works
    
    #Pragma config FEXTOSC = HS   //  This  does not
    
    #pragma Config FEXTOSC = HS  //  This does not
    
     
  • Anobium

    Anobium - 2022-01-25

    Oh yes. Not the intent.

    Fixed in build 1069.

    Evan

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.