PDA

View Full Version : CONFIGURE & OSCCON & meProg configure



SUNFLOWER
- 19th February 2011, 17:37
This is my first post and am totally new to PIC. I wish to configure 18F4620 to internal oscillator at 4 MHz.

INCLUDE "P18F4620.INC" ; MPASM Header
__CONFIG _CONFIG1H, _OSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H

I changed OSC_HS to OSC_INTOSC2 but that was undefined so what is the label? More information on .inc definitions?

I used INTRC (INTIO2) in meProg which seemed to work (how to make that the default) but the speed was 1MHz.

OSCCON = %01100000
DEFINE OSC 4

No help, still at 1MHz.

SUNFLOWER
- 19th February 2011, 20:46
OK, I found _OSC_INTIO67_1H and that sets programmer default, but still struggle with OSCCON = %01100000 not setting 4 MHz. Is there a register bit I am missing somewhere?

SUNFLOWER
- 19th February 2011, 21:25
Bug found, working, --Dug.