gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
PLL with INTRC |
Posted: Mon Jan 30, 2017 6:36 pm |
|
|
My email to CCS regarding PLL:
Quote: | CCS PCH C Compiler, Version 5.059, 31220
#device PIC18F26K22
#FUSES INTRC_IO
#FUSES PLLEN
#use delay(internal=32MHz)
The LST file Configuration Fuses:
Word 1: 2800 INTRC_IO NOPLLEN PRIMARY NOFCMEN NOIESO
Shows PLL not enabled but the controllers works at 32MHz, tested with a blinking LED
#FUSES ECM_IO
#FUSES PLLEN
#use delay(clock=32MHz)
The LST file configuration Fuses:
Word 1: 3B00 ECM_IO PLLEN PRIMARY NOFCMEN NOIESO
The controller works correct at 32MHz
|
CCS answer
Quote: | When you use #use delay(internal=xx) the compiler set the clock
related configuration fuses, in this case it's setting the INTRC_IO
and NOPLLEN fuses and then enables the PLL in software by setting
the PLLEN bit in the OSCTUNE register.
We do this so it's possible to switch to the 8 MHz and 16 MHz
internal oscillator in software using the setup_oscillator() function.
|
Just in case that somebody faces the same issue
Best wishes
Joe |
|