Angus Anderson, Could you please send the statements for the configurations you are trying to set? I'm sure it will shed some light on the problem.
Dave Purola,
N8NTA
Angus Anderson, Could you please send the statements for the configurations you are trying to set? I'm sure it will shed some light on the problem.
Dave Purola,
N8NTA
Hi Dave- As you requested, here are the 2 files:
This is the source file config statements (at present commented out)
'--------------------------- Set Processor options. THIS IS MPASM -----------------------
'ASM
' CONFIG OSCS=OFF, OSC=HS
' ; Oscillator switchover disabled, HS Osc enabled
' CONFIG BOR=ON, PWRT=ON, BORV=27
' ; BOR on, BOR acts at 2.7v
' CONFIG WDT=ON, WDTPS=128
' ; WDT off
' CONFIG STVR=ON, LVP=OFF, DEBUG=OFF
' ; Stack over/underflow reset enabled
' ; LVP disabled
' ; Background debugger disabled
'endasm
This is the 18f452.inc file which, as mentioned, works
;************************************************* ***************
;* 18F452.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2004 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 01/27/04 *
;* Version : 2.45 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F452, r = dec, w = -311, f = inhx32
INCLUDE "P18F452.INC" ; MPASM Header
;__CONFIG _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
;__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
;__CONFIG _CONFIG4L, _LVP_OFF_4L
CONFIG OSCS=OFF, OSC=HS
CONFIG BOR=ON, PWRT=ON, BORV=27
CONFIG WDT=ON, WDTPS=128
CONFIG STVR=ON, LVP=OFF, DEBUG=OFF
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 8
Any insight into the problem would be a help.
BTW, PBPv2.46
regards
Angus
The new 18F config directive without the double underscore only works if you use it in the .inc file. They will not work when inserted directly in your code.
If you comment out 18F config settings in the default PBP .inc file, then insert them directly in your code, you'll have to use the older __config directive.
Newer versions of PBP include files now have the w = -230 option to suppress the deprecated warning message MPASM spits out when it sees the older __config directive, but it still doesn't allow inserting the new directives inline.
Hey Bruce-
Wow! Thanks for solving the problem. Reliable as ever!
Just wish that it was easier to find documented answers to problems such as this.
Regards
Angus Anderson
Bookmarks