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 CCS Technical Support

16F87 Internal Frequency setting

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



Joined: 26 Nov 2003
Posts: 151
Location: Grayson, GA

View user's profile Send private message

16F87 Internal Frequency setting
PostPosted: Sat Dec 20, 2003 1:29 pm     Reply with quote

CCS version 3.178, I am having difficulty changing the internal clock source from INTRC (31.25KHz) to INTOSC (variable up to 8MHz). I can't update for free to the newest version so I believe I need to write to the OSCCON register (ox8F) in my code to change the frequency selection. I need some help writing to this register. What write function should I use and how does the 0x8F register address translate? Thanks for any help.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Sat Dec 20, 2003 1:38 pm     Reply with quote

Use the #byte statement

#byte OSCCON = 0x8F

Now OSCCON can be treated as a variable.

OSCCON = 0;
bit_set(OSCCON,0);
bit_clear(OSCCON,0);
bwhiten



Joined: 26 Nov 2003
Posts: 151
Location: Grayson, GA

View user's profile Send private message

PostPosted: Sat Dec 20, 2003 1:54 pm     Reply with quote

Thanks again Mark. The 16F87 is now running at 8MHz with the internal clock. Very Happy
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