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

Oscillator question (12F683)

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







Oscillator question (12F683)
PostPosted: Thu Dec 23, 2004 3:45 am     Reply with quote

I want to use 8Mhz internal oscillator (HFINTOSC), then it is suposed I would have a 2Mhz signal in OSC2/GP4 output pin (8Mhz/4). But I have a 1.14Mhz in OSC2/GP4 pin. I have not touched the calibration word in 0x2008 and I think the fuses are programed Ok. What is happening?

Code:

#include <12F683.h>

#device adc=8
#use delay(clock=8000000)

#fuses WDT,INTRC, CPD, PROTECT, MCLR, NOPUT, NOBROWNOUT, NOIESO, NOFCMEN

void main(void)
{
   setup_oscillator(OSC_8MHZ|OSC_INTRC|OSC_STATE_STABLE);
   ....



Thanks in advance!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Dec 23, 2004 1:40 pm     Reply with quote

Can you:

1. Post a complete test program. Even if there's nothing else in main(),
then post that. (Also, please compile the revised test program and
run it on hardware before posting it.) Also, please disable the
watchdog timer in your revised test program. Use NOWDT to do this.

2. Post the version of your compiler.
Guest
Guest







PostPosted: Tue Dec 28, 2004 1:45 am     Reply with quote

I think my programmer software overwrites the oscillator calibration word located in position 2008h.

While I wait for my ICD 2 and programming module to come, could anybody test this program?

Is there a 2Mhz signal in OSC2/GP4 output pin?

Compiler V3.203

Code:


#include <12F683.h>

#device adc=8
#use delay(clock=8000000)

#fuses NOWDT,INTRC, NOCPD, NOPROTECT, MCLR, NOPUT, NOBROWNOUT, NOIESO, NOFCMEN

void main(void)
{
  setup_oscillator(OSC_8MHZ|OSC_INTRC|OSC_STATE_STABLE);

  set_tris_a(0x0C);

  while(1) {
      delay_ms(1000);
  } //while

}//main

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