I have to use an external oscillator after all, because the internal is just not stable enough. I've got everything configured correctly (I think), but the first thing the program does, is turn on a LED. It's taking 25 SECONDS for this LED to come on!!
I've checked the datasheet, and power-on delays can be because of PWRTEN being set to 0, (which it isn't), or OST, but that isn't suppose to apply with external oscillators. So... what could be the problem?
My PBP 18F2520.INC file is below.
Code:
;****************************************************************
;* 18F2520.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2010 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 05/21/10 *
;* Version : 2.60a *
;* Notes : *
;****************************************************************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F2520, r = dec, w = -311, w = -230, f = inhx32
INCLUDE "P18F2520.INC" ; MPASM Header
__CONFIG _CONFIG1H, _OSC_ECIO6_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2L, _PWRT_OFF_2L & _BOREN_ON_2L & _BORV_0_2L
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 32
Thanks for any pointers.
Len
Bookmarks