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

18f67k22 port c (c0 c1) io setup

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



Joined: 27 Apr 2012
Posts: 15
Location: TURKEY

View user's profile Send private message

18f67k22 port c (c0 c1) io setup
PostPosted: Sat May 05, 2012 5:55 am     Reply with quote

hi, I don't control 18f67k22 rc0 and rc1 pins.
"If a secondary oscillator is not desired and digital I/O on
port pins, RC0 and RC1, is needed, the SOSCSEL bits
must be set to Digital mode.", write on datasheet.
I want to use RC1 for pwm. I use CCS C. How can I do this?
Ttelmah



Joined: 11 Mar 2010
Posts: 19361

View user's profile Send private message

PostPosted: Sat May 05, 2012 7:05 am     Reply with quote

Same story for this type of thing all the time.

Start by opening the .h file for the processor. At the top, there is a list of supported fuses.
Look at this, for 'SOSC'.

You then find three entries:

"SOSC_LOW,SOSC_DIG,SOSC_HIGH"

If you look at the data sheet, the three settings for the SOSCSEL bits are:

Code:

bit 4-3 SOSCSEL<1:0>: SOSC Power Selection and Mode Configuration bits
    11 = High-power SOSC circuit is selected
    10 = Digital (SCLKI) mode; I/O port functionality of RC0 and RC1 is enabled
    01 = Low-power SOSC circuit is selected
    00 = Reserved


Only three possibilities, and three CCS settings - makes sense.
Also (hopefully) fairly obvious which one you need.

Best Wishes
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