View previous topic :: View next topic |
Author |
Message |
globalsys
Joined: 17 Apr 2007 Posts: 22 Location: france
|
Use OSC pin as an input when using internal oscillator |
Posted: Fri Jun 19, 2009 3:10 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Fri Jun 19, 2009 3:27 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
globalsys
Joined: 17 Apr 2007 Posts: 22 Location: france
|
|
Posted: Fri Jun 19, 2009 4:05 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Fri Jun 19, 2009 9:49 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
globalsys
Joined: 17 Apr 2007 Posts: 22 Location: france
|
|
Posted: Mon Jun 29, 2009 7:12 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|