go away spammer

Author Topic: Clock Source Not Working  (Read 2465 times)

0 Members and 1 Guest are viewing this topic.

Offline frank26080115Topic starter

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Clock Source Not Working
« on: July 02, 2007, 08:38:25 PM »
I'm trying to use a 4.5mHz ceramic resonator (with center ground pin) as a clock source for my PIC16F877A.

When the first pin is connected to the CLKI and the last pin is connected to CLKO, the center pin is connected to the ground, it does not work with any oscillator configuration (I tried all 4, RC, LP, XT, HS). Flipping the resonator does not help, neither does adding some 0.1uF capacitors from both pins to the ground.

I also tried the first pin to Vdd, middle to ground and last to CLKI, nothing happens. I also tried to not use the ground pin like you would with a crystal, nothing happens.

The program works when I use a RC clock source.

How do I resolve this?

Offline KambeiX

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 0
Re: Clock Source Not Working
« Reply #1 on: July 02, 2007, 09:18:22 PM »
Make sure configuration bits are being programmed. If the program works with RC then it must be that or the resonator isn't working.


Offline frank26080115Topic starter

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Re: Clock Source Not Working
« Reply #2 on: July 02, 2007, 10:06:05 PM »
If the configuration bits are missing then PICkit will tell me they are missing, my PICkit 2 is awesome

This is what I put in C

// configuration
#pragma DATA 0x2007, _CP_OFF & _BODEN_ON & _PWRTE_OFF & _WDT_OFF & _(change me)_OSC

This is how it's always been done and so far it has worked for microcontrollers with internal oscillators, this is the first time I've used an external clock.
Should I enable the 2 timers?

 


Get Your Ad Here

data_list