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

16F684 clk speed setup

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



Joined: 02 Jan 2006
Posts: 1

View user's profile Send private message

16F684 clk speed setup
PostPosted: Mon Jan 02, 2006 4:40 pm     Reply with quote

Hello all,
I have a question on setting up the clk for a 16F684. I need 4 MHz clk using internal RC but the pic wizard gave me some really slow clk. Do I need to use a special fuse to do this ? the following fuses are use:

#include <16F684.h>
#device adc=8

#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOPROTECT //Code not protected from reading
#FUSES BROWNOUT //Reset when brownout detected
#FUSES MCLR //Master Clear pin enabled
#FUSES NOCPD //No EE protection
#FUSES NOPUT //No Power Up Timer
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES NOFCMEN //Fail-safe clock monitor disabled

#use delay(clock=4000000)

The assem code seems to know about the delay_us function properly by generating like 5 NOP for a delay of 5 uS. However, on the scope, things are really really slow. it looks like it is running on 32 kHz clk !!!

Any suggestion ?

rc
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jan 02, 2006 5:19 pm     Reply with quote

1. Post a small test program. I need to see what code the Wizard
is inserting, with regard to oscillator setup.

2. Post your compiler version. This will be a number such as 3.191,
or 3.241, etc. It can be found at the start of the .LST file, which
will be in the project folder.
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