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

18f26k80 oscillator

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



Joined: 29 May 2009
Posts: 7

View user's profile Send private message

18f26k80 oscillator
PostPosted: Thu Feb 16, 2012 3:42 am     Reply with quote

hello,
whatever I do, the chip runs at about 7.97Mhz (internal RC)

I tried with #use delay (crystal=6.144M)
I tried with #fuses HSM or even HSH.


Any idea?
I feel very stupid and frustrated. In this condition the 4xPLL option is far away.

Paolo
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Feb 16, 2012 6:49 am     Reply with quote

It would help to see what you have so far.
_________________
Google and Forum Search are some of your best tools!!!!
paolope



Joined: 29 May 2009
Posts: 7

View user's profile Send private message

PostPosted: Thu Feb 16, 2012 8:40 am     Reply with quote

Here is adc.h:
Code:

#include <18f26k80.h>
#device icd=true
#device *=16
#device adc=16
#FUSES SOSC_DIG,HSM,PUT// PC0 PC1 I/O,MEDIUM PWR OSC
#use delay(crystal=6.144M)

nothing else
Ttelmah



Joined: 11 Mar 2010
Posts: 19329

View user's profile Send private message

PostPosted: Thu Feb 16, 2012 9:39 am     Reply with quote

Where is your crystal connected?. OSC1/2, or SOSCI/O?. You are enabling the secondary oscillator as the clock source. Unless your crystal is on the secondary pins, it won't run, so the system will drop back to the internal oscillator. Given you are talking about wanting to use the PLL (which is only available on the primary oscillator), I'd guess your crystal is on the primary pins.
Remember fuses 'or' together, so the '00' pattern selected by HSM or H to use the primary oscillator, 'ored' with SOSC_DIG, gives the pattern for SOSC_DIG....

HSM, PLLEN, NOFCMEN, NOIESO, PUT
#use delay(crystal=6.144M, clock=24.576M)

Best Wishes
paolope



Joined: 29 May 2009
Posts: 7

View user's profile Send private message

PostPosted: Thu Feb 16, 2012 10:43 am     Reply with quote

Mr Murphy states that 'things left alone go from bad to worse'...
in effect NOIESO crashes the debugger-ICDU64 which is then not able to control the PIC, so nothing new happens
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