I want the MCU to run on one of its internal oscillators and am trying to get it to run specifically at 7.75KHz (31KHz / 4). I wrote a routine that simply toggles a couple of bits on PORT A just to make sure that the MPU is alive. It is.

I can tell that the MCU is running pretty slowly because the bits are toggling very slowly. However, I need to know what the system clock speed actually is. My problem is that I cannot get the CLKOUT signal to appear on the RA6 bit (pin 7 on my 28-pin QFN).

I have of course set the /CLKOUTEN bit to ZERO and I set FEXTOSC<2:0> to "NOT ENABLED".

So my question is: Can the CLKOUT bit be enabled when using the 32KHz internal oscillator? According to what I quoted above the answer would seem to be YES. So if that is indeed the case, what am I missing?

I have pasted my configuration file and my test main() file below. I will appreciate any help I can get.Thanks,Ray RussellHouston, TX

Update: I think I have the answer. In looking at figure 7-1 of the data sheet it shows that CLKOUT may simply be a "wrap-around" of the CLKIN signal like XOs use. It does not seem to be anything special. However, the good news is that I was able to get the CLKR signal running at the frequency I want. I am going to try and route it over to the CLKIN pin and see if I can use it as an improvised EXTOSC.

Not your problem bu NEVER set the 'DEBUG' option. The IDE will do that for you and you can get into all sorts of problems if you try to set this yourself and it ends up being wrong.Is that your real code? There is no 'main' function and I'm surprised it ever compiles.Susan