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

Switch oscillators with PIC18F252

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



Joined: 15 Nov 2004
Posts: 18

View user's profile Send private message

Switch oscillators with PIC18F252
PostPosted: Wed May 03, 2006 10:58 am     Reply with quote

Hello,

I'm working on a datalogger with the PIC18F252. For speed during datatransfer I need a 20 MHz crystal, for low power consumption when logging I want to use a 32kHz crystal.

I found the OSCSEN fuse to enable swithing and I studied the relevant parts of sections 2, 11 and 19 of the datasheet but I can't do the trick until now.

Is there somebody here who can help me a step further with this?

Thanks in advance,

Klaus
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed May 03, 2006 11:33 am     Reply with quote

Look in the CCS manual at the setup_oscillator() function.
Download the manual from this page:
http://www.ccsinfo.com/downloads.php

Look in the 18F252.H file, in the section titled:
"Constants used in setup_oscillator()"
It lists the constants that you can use with the setup_oscillator()
function with the 18F252.
klausdejong



Joined: 15 Nov 2004
Posts: 18

View user's profile Send private message

Switch oscillators with PIC18F252
PostPosted: Wed May 03, 2006 5:19 pm     Reply with quote

Thanks a lot, PCM programmer


It seems to work well now.

Klaus
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