Hello,
I hope someone can point out where I am going wrong with this....
I'm trying to develop a product containing a PIC18F67J60-I/PTPIC18F67J60-I/PT processor, using MPLAB and C18.
I am supply a 25MHz clock from an external source, connected to OSC1 (Pin 39)
The config bits are set like this:
#pragma config FOSC = EC, FOSC2 = ON, FCMEN = OFF, IESO = OFF, DEBUG=OFF
#pragma config WDT = OFF, WDTPS = 32768
#pragma config STVR = ON, XINST=ON
#pragma config CP0 = OFF
#pragma config ETHLED = OFF
and my main function is this simple test routine (it's not the final use!)
void main(void)
{
// Board specific setup
// tbd
OSCCON = 0X02;
TRISA = 0x00;
while(1)
{
PORTA = 0;
PORTA = 0xff;
}
}
I believe I should be getting clk/4 out on the OSC2 (pin 40) - but it is idle, and the pins on PORTA are not toggling, so I don't think the clock config is correct.
Can anyone see why this simple project isn't working ?
I have the required capacitors on the VDDCORE pin and ENVREG is tied to VDD (3.3v)
For the curious, here is a screen dump of the clock on pin OSC1

