View previous topic :: View next topic |
Author |
Message |
avatarengineer
Joined: 13 May 2013 Posts: 51 Location: Arizona
|
16F1782 thru 16F1789 Setup internal Osc at 32MHz not obvious |
Posted: Tue Jul 23, 2013 12:16 pm |
|
|
Looking at the 16F1782,83, etc and wishing to utilize is at spec'd 32MHz with internal oscillator & 4XPLL seems funky.
There is no setup "OSC_32MHz" in the header file,
but,
If I look at the hardware, I'd expect to enter this:
Code: | setup_oscillator(OSC_8MHZ|OSC_INTRC|OSC_PLL_ON); |
Can anyone confirm this is proper?
ALSO
#FUSES PLL_SW ? what exactly does this do? there is no reference of this in the CCS 5.010 help file.
Cheers! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Jul 24, 2013 12:23 pm |
|
|
I don't have one of this PIC family to test, but I compiled the following
program with vs. 5.010 (and vs. 4.141) and I think it should work,
according to the ASM code that I saw in the .LST files.
Note that the main point is that "internal" is specified in the #use delay()
statement:
Code: |
#include <16F1782.h>
#fuses INTRC_IO, NOWDT, BROWNOUT, BORV25
#use delay(internal=32M)
//==========================================
void main()
{
while(1);
} |
|
|
|
|