CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

16F1782 thru 16F1789 Setup internal Osc at 32MHz not obvious

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
avatarengineer



Joined: 13 May 2013
Posts: 51
Location: Arizona

View user's profile Send private message Visit poster's website

16F1782 thru 16F1789 Setup internal Osc at 32MHz not obvious
PostPosted: Tue Jul 23, 2013 12:16 pm     Reply with quote

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? Confused

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

View user's profile Send private message

PostPosted: Wed Jul 24, 2013 12:23 pm     Reply with quote

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);
}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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