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

Turn off SCSO

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



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

Turn off SCSO
PostPosted: Wed Jun 08, 2011 11:33 am     Reply with quote

Hi There,

I'm trying to use PIN_C0 as an output but seem not to be able to do so. Looking at the datasheet, I see that it can be a SSCO or a SCKLI as well. I don't need nor want this functionality. How do I switch this off best to be able to use it as a normal ouput?
Thank you,

My little test program:
Code:
#include <18F86K22.h>
#case
#device adc=16 HIGH_INTS=TRUE

#fuses NOWDT                         //Watch Dog Timer uses 1:65536 Postscale
#fuses HSH                          //Hi-Speed crystal oscillator
#fuses NOBROWNOUT                  //No brownout reset
#fuses NOPLLEN                  //No PLL enabled
#fuses BBSIZ1K                     //1K words Boot Block size
#fuses NOXINST                     //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#fuses PROTECT

#use delay(clock=20000000)

void main (void)
{
   output_high(PIN_C0);
   output_high(PIN_A4);
   while(1);
}
Fusillade



Joined: 02 Aug 2007
Posts: 31

View user's profile Send private message

PostPosted: Thu Jun 09, 2011 3:14 pm     Reply with quote

Have you tried the following?

#fuses SOSC_DIG
_________________
New:

Compiler Version: 5.078
IDE Version: MPLAB X V4.15
Devices: PIC18LF****

Old:

Compiler Version: 4.121
IDE Version: MPLAB IDE V8.63
Devices: PIC18LF****
cerr



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

PostPosted: Thu Jun 09, 2011 3:15 pm     Reply with quote

Oh Hi Fusillade,

Sorry my second post just coincided with your post.
I haven't tried #fuses SOSC_DIG yet, will do that right now!
Thanks for your reply!
Ron

I thought I might have a bad chip, got a second one but same result. My code, again:
Code:
#include <18F86K22.h>
#case
#device adc=16 HIGH_INTS=TRUE

#fuses NOWDT                         //Watch Dog Timer uses 1:65536 Postscale
#fuses HSH                          //Hi-Speed crystal oscillator
#fuses NOBROWNOUT                  //No brownout reset
#fuses NOPLLEN                  //No PLL enabled
#fuses BBSIZ1K                     //1K words Boot Block size
#fuses NOXINST                     //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#fuses NOPROTECT

#use delay(clock=20000000)

void main (void)
{
   while(1) {
   output_high(PIN_C0);
   output_high(PIN_A4);
   delay_ms(10);
   output_low(PIN_C0);
   output_low(PIN_A4);   
   delay_ms(10);
   }
}

Result: RA4 toggles just fine but RC0 stays low all the time... how can I get that to toggle as well?
Thanks!
Ron
Help would be greatly appreciated
cerr



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

PostPosted: Thu Jun 09, 2011 3:21 pm     Reply with quote

Yes, great!

Thank you very much!!!
#fuses SOSC_DIG did it! Nice, awesome!
Fusillade



Joined: 02 Aug 2007
Posts: 31

View user's profile Send private message

PostPosted: Thu Jun 09, 2011 3:23 pm     Reply with quote

cerr wrote:
Yes, great!

Thank you very much!!!
#fuses SOSC_DIG did it! Nice, awesome!


At least I did one thing right today. Laughing
_________________
New:

Compiler Version: 5.078
IDE Version: MPLAB X V4.15
Devices: PIC18LF****

Old:

Compiler Version: 4.121
IDE Version: MPLAB IDE V8.63
Devices: PIC18LF****
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