|
|
View previous topic :: View next topic |
Author |
Message |
DerWolf
Joined: 30 Jan 2010 Posts: 8
|
No internal OSC |
Posted: Wed Jan 15, 2014 3:08 am |
|
|
Hello,
i just tried to work with the PIC24FV16KA304. Therefore I used the PC24 wizard and told to use the internal OSC (20MHz as used automatically).
Unfortunately after trying to compile this code with no other changes the compiler results in a Error99 telling: "Option invalid No internal OSC".
What is going wrong with this as the PIC24 has a internal osc.
I am using the ccs PCWHD compiler Version IDE 5.016 and PCD 5.016. And the file #include <24FV16KA304.h> was included.
Thanks
A. Wolf |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Wed Jan 15, 2014 4:04 am |
|
|
A couple of bits to this.
The first is a 'confusion' in the labelling of this oscillator. For some reason Microchip, elect to call this particular oscillator the 'Fast RC oscillator', not the 'internal oscillator'. CCS carry this forward, and won't accept the keyword 'internal'. Select the fuse FRC_PLL, and just say 'clock', rather than internal.
Then though, unlike the oscillators on a lot of the DSPIC's that have a programmable divider in the PLL, allowing a huge range of frequencies to be selected, from the RC source, these ones only support a 4*PLL, fed from 8MHz, or 4MHz. So clock=16MHz, or clock=32MHz only. Default is 16MHz. 20MHz can't be generated from this oscillator.
As a general comment, the 'wizard', is thick. It'll generate invalid code on most chips, and should be treated as something that is more likely to create problems, than solve them....
Best Wishes |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1345
|
|
Posted: Wed Jan 15, 2014 10:38 am |
|
|
Just a tip:
Even though the data sheet specifies higher frequencies, I found a lot of chips in that particular series (the PIC24 F/FV xx KA xxx series) seem to have trouble at and above 20MHz (works fine at 11MHz, haven't tried 19Mhz). Simple Hello World programs would fail in some configurations. When I last checked the errata, it didn't mention any problems like that, but I experienced it on 4 different lots of chips from that series.
If you run into problems, try dialing down the clock speed and see if they go away. |
|
|
mcr1981
Joined: 27 Oct 2010 Posts: 28
|
|
Posted: Fri Jan 17, 2014 6:23 pm |
|
|
Ttelmah wrote: | A couple of bits to this.
The first is a 'confusion' in the labelling of this oscillator. For some reason Microchip, elect to call this particular oscillator the 'Fast RC oscillator', not the 'internal oscillator'. CCS carry this forward, and won't accept the keyword 'internal'. Select the fuse FRC_PLL, and just say 'clock', rather than internal.
Best Wishes |
That's strange.
I have code with 24FV32KA302 using that expression (internal = 32 MHZ) and the code works with an LED and LCD, also with OC (PWM).
I'm not using the CCS IDE, I'm using MPLAB X and PCD (5.016).
EDIT:
Probably is what has been said, the compiler cannot produce 20 MHz from the internal oscillator (no INTRC that can generate that Fosc). |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|