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

16F819 setting frequency for internal oscillator

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







16F819 setting frequency for internal oscillator
PostPosted: Wed Jun 04, 2003 12:18 pm     Reply with quote

I am tring to set the oscillator frequency when using the fuse INTRC_IO for the 16F819. I am not sure how to write to OSCCON to set the frequency. Another question is when I am running in stand-alone am I able to use RB4 as an I/O?
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515034
allen_m
Guest







Re: 16F819 setting frequency for internal oscillator
PostPosted: Wed Jun 04, 2003 1:54 pm     Reply with quote

:=I am tring to set the oscillator frequency when using the fuse INTRC_IO for the 16F819. I am not sure how to write to OSCCON to set the frequency. Another question is when I am running in stand-alone am I able to use RB4 as an I/O?

To set OSCTUNE do the following in the definition / preamble area

#byte OSCCON = 0x8F; // set the address

Then early in main set it to the frequency you wish ...

OSCCON = 0x70; // 8MHz operation

Re RB4, yes you can use it as IO (by standalone I assume you mean no I2c or SPI).

Allen M.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515037
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