Hi list, Starting to use a PIC18F45J10 for the first time. I have been searching the web for a couple of days but can not seem to find any "C" code showing how to do the following. Could anyone please show me how to write the required code in order to configure the clock oscillator and or PLL for maximum performance given that I have a external 20Mhz crystal as the clock input and wish to run the device at its maximum speed of 40Mhz The compiler I am using is the MPLab C18 compiler Also do I have the following configuration bits set correctly #pragma config DEBUG = ON #pragma config XINST = ON #pragma config WDTEN = OFF #pragma config CP0 = OFF #pragma config FOSC2 = OFF #pragma config IESO = ON #pragma config FOSC = HS Please note that I intend to make use of the SPI, I2C and UART modules on the chip if that makes any difference to the above. Many thanks in advance. -- Kind Regards Grant Brown -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist