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

Issues with setting IO on SOSC

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



Joined: 21 Feb 2008
Posts: 31

View user's profile Send private message

Issues with setting IO on SOSC
PostPosted: Sat Dec 12, 2020 3:30 am     Reply with quote

I can not set the IO SOSC pins RB4/RA4 on 24FJ64GA004, compiler 5.093.
I have tried different fuses configurations but no luck. In the lst file there is always SOSC_SEC fuse set. I have a LED on RA8 just to prove the chip is working, which it does. Can anyone spot anything wrong? Thanks.
Code:

#include <24fj64ga004.h>
#device ICSP=1
#use delay(int=8MHz, clock=32MHz)
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOJTAG //JTAG disabled
#FUSES OSCIO //OSC2 is general purpose output

void main(void)
{   
 
   while(1)
   {
        output_high(PIN_A8);
        output_high(PIN_B4);
        output_high(PIN_A4);
        delay_ms(50);
        output_low(PIN_A8);
        output_low(PIN_B4);
        output_low(PIN_A4);
        delay_ms(50);
   
}
}
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Sat Dec 12, 2020 9:08 am     Reply with quote

SOSC_SEC does not select the secondary oscillator. It sets the power level
for the driver on these pins. The only choices are SOSC_SEC and
SOSC_SEC_LP.
The oscillator is controlled by the OSCEN bit internally. With the internal
oscillator selected and everything else that uses this disabled, it should default
to off. Have checked and it does.
However you are trying to do something impossible. The SOSCI pin is
only available as an _input_ pin. It has no output driver. THE SOSCO pin
should work. If you check the data sheet, in Table 1-2, you will find the
SOSCI pin listed as 'I' for input, not I/O. The same is true of the OSCI pin.
adcor



Joined: 21 Feb 2008
Posts: 31

View user's profile Send private message

PostPosted: Sat Dec 12, 2020 1:57 pm     Reply with quote

Thank you, I was hoping to use the entire 16-bit PortB structure ...looks like I have to chnge the processor.
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