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

need help with crystal Fuses setting for 18f26k22

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



Joined: 02 Dec 2010
Posts: 22

View user's profile Send private message

need help with crystal Fuses setting for 18f26k22
PostPosted: Thu Feb 16, 2012 1:27 am     Reply with quote

Hi all,
I am stuck in a problem, I think problem arised due to wrong fuse setting or wrong crystal oscillator. I want to use 20Mhz or 25 Mhz crystal oscillator. When i compiled the program, and tested it, I found controller is not running at correct frequency.

Compiler version = 4.124

below is the code i used to test it.
Code:

#include <18F26k22.h>
#device adc=10
#FUSES NOWDT,HSH,PUT,NOLVP
#use delay(clock=20M)         
#use rs232(baud=38400,xmit=PIN_C6, rcv=PIN_C7)

void main(void)
{
     while(true)
     {
          output_toggle(pin_c0);
          delay_ms(100);
     }
}



so, what I found is the delay time between toggles is 25ms, instead of 100ms. Confused

Can any one tell me whats is going wrong.
Thank you & Best regards.
zeeshan ahmed



Joined: 02 Dec 2010
Posts: 22

View user's profile Send private message

Problem Solved
PostPosted: Thu Feb 16, 2012 2:08 am     Reply with quote

I use the fuse NOPLLEN ... And the problem solved. Very Happy
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