Hmmm.. I have tried with:
DEFINE OSC 4 'I want to use 4 mhz?
OSCCON=%01101000
and with setting these to 8Mhz ..
DEFINE OSC 8
OSCCON=%01111000 '8 Mhz
Both work about the same - 'some' plain text comes through, but the code is resetting because I am getting the initialization routine, which does not happen usually.
I am not doing any interrupts or anything, no jumps to assmbly code - pretty straightforward.
I did change the INC files:
changed the "XT_OSC" for "INTRC_OSC_NOCLKOUT" - It looks like this now:
;************************************************* ***************
;* 16F88.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2003 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 08/13/03 *
;* Version : 2.45 beta *
;* Notes : *
;************************************************* ***************
; Modified by THG - changed clock settin from XT_OSC
NOLIST
ifdef PM_USED
LIST
include 'M16F88.INC' ; PM header
device pic16F88, INTRC_OSC_NOCLKOUT, wdt_on, pwrt_on, lvp_off, protect_off
XALL
NOLIST
else
LIST
LIST p = 16F88, r = dec, w = -302
INCLUDE "P16F88.INC" ; MPASM Header
__config _CONFIG1, INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
NOLIST
endif
LIST
The strangest thing is that the program appears to be restarting when it should not. It should be looping through the main routine, but on the F88, it is picking up the initialization routine every few seconds.
scratching head....
Bookmarks