![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
bolubeyi
Joined: 27 Apr 2012 Posts: 15 Location: TURKEY
|
18f67k22 port c (c0 c1) io setup |
Posted: Sat May 05, 2012 5:55 am |
|
|
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? |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19360
|
|
Posted: Sat May 05, 2012 7:05 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|