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

Use OSC pin as an input when using internal oscillator

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



Joined: 17 Apr 2007
Posts: 22
Location: france

View user's profile Send private message

Use OSC pin as an input when using internal oscillator
PostPosted: Fri Jun 19, 2009 3:10 am     Reply with quote

He gents, i'm using an PIC18LF4520, configured with the internal oscillator, i want to use the osc1 and osc2 pins as inputs, but it's not working.

i'm using the following fuse :
#FUSES NOWDT
#FUSES INTRC
#FUSES HS
#FUSES NOIESO
#FUSES NOFCMEN
#FUSES NOBROWNOUT
#FUSES NOPUT
#FUSES STVREN
#FUSES NODEBUG
#FUSES NOLVP
#FUSES NOPBADEN
#FUSES MCLR
#FUSES LPT1OSC
#FUSES NOXINST
#FUSES NOWRTC
#FUSES NOWRTB
#FUSES NOEBTR
#FUSES NOEBTRB
#FUSES NOCPB
#FUSES NOWRT
#FUSES NOWRTD
#FUSES NOCPD
#FUSES NOPROTECT

thanks

Bruno
Ttelmah
Guest







PostPosted: Fri Jun 19, 2009 3:27 am     Reply with quote

Change two fuses.
First get rid of 'HS'. You must only ever have _one_ oscillator selection fuse.
Then change the INTRC fuse, to INTRC_IO. This says to use the internal RC oscillator, and configure the oscillator pins for I/O.
All done.

Best Wishes
globalsys



Joined: 17 Apr 2007
Posts: 22
Location: france

View user's profile Send private message

PostPosted: Fri Jun 19, 2009 4:05 am     Reply with quote

Hi Ttelmah thanks for your help, i modify the two fuses but it's still not working... maybe because i'm using a bootloader who is configuring my PIC, and the settings done in the C file are not taking in account.
Ttelmah
Guest







PostPosted: Fri Jun 19, 2009 9:49 am     Reply with quote

Amost certainly.
many bootloaders don't update the fuses, because they _must_ retain the set that works for their operational configuration (oscillator and protection in particular). You need to check whether your bootloader does handle the configuration fuses or not.

Best Wishes
globalsys



Joined: 17 Apr 2007
Posts: 22
Location: france

View user's profile Send private message

PostPosted: Mon Jun 29, 2009 7:12 am     Reply with quote

Hello Ttelmah,
I've checked the fuses on my bootloader they look ok, even when I’m programming the PIC without bootloader through MPLab, it's not working, I keep trying if you have any suggest...
Thanks
Bruno
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