
Originally Posted by
Darrel Taylor
But it doesn't explain the ODD number of bytes. I've tried Configs, EEPROM, DATA, DB, DW, DA and no matter what, I can't make it come up ODD.
When you use the code above, does it give even or odd numbers. (in a program by itself)
<br>
Ok, now that is weird...I can't get it to come up EVEN!
If I use the above code, using 33000, obviously I get maximum address errors, but it still gives me 66015 bytes used. If I use 32000, I get 64015.
Not that it'll matter much, but this is the include file I use. I haven't modified any other files, PBP or MPLAB types...
Code:
;****************************************************************
;* 18F4620.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2006 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 06/05/06 *
;* Version : 2.47 *
;* Notes : *
;****************************************************************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
;original listing below
; LIST
; LIST p = 18F4620, r = dec, w = -311, w = -230, f = inhx32
; INCLUDE "P18F4620.INC" ; MPASM Header
; __CONFIG _CONFIG1H, _OSC_XT_1H
; __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
; __CONFIG _CONFIG3H, _PBADEN_OFF_3H
; __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
; NOLIST
LIST
LIST p = 18F4620, r = dec, w = -311, w = -230, f = inhx32
INCLUDE "P18F4620.INC" ; MPASM Header
CONFIG OSC = HSPLL, FCMEN = ON, IESO = ON, PWRT = ON
CONFIG BOREN = OFF, BORV = 0, WDT = OFF, WDTPS = 32768
CONFIG MCLRE = ON, LPT1OSC = OFF, PBADEN = OFF
CONFIG CCP2MX = portc, STVREN = OFF, LVP = OFF
CONFIG XINST = OFF, DEBUG = OFF, CP0 = OFF, CP1 = OFF
CONFIG CP2 = OFF, CP3 = OFF, CPB = OFF, CPD = OFF
CONFIG WRT0 = OFF, WRT1 = OFF, WRT2 = OFF, WRT3 = OFF
CONFIG WRTB = OFF, WRTC = OFF, WRTD = OFF, EBTR0 = OFF
CONFIG EBTR1 = OFF, EBTR2 = OFF, EBTR3 = OFF, EBTRB = OFF
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 64
Which PIC are you using for your testing?
EDIT/UPDATE: I just tried an 18F4680 for grins...used 32000 for the code, got 64012 bytes used, 3 less than when using the '4620. Different formats in the PBP .INC file methinks...
Bookmarks