|
|
View previous topic :: View next topic |
Author |
Message |
Guest Guest
|
Oscillator question (12F683) |
Posted: Thu Dec 23, 2004 3:45 am |
|
|
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
|
|
Posted: Thu Dec 23, 2004 1:40 pm |
|
|
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
|
|
Posted: Tue Dec 28, 2004 1:45 am |
|
|
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
|
|
|
|
|
|
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
|