Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Error - section 'MAIN_PROG' can not fit the section. Section 'MAIN_PROG' length=0x000

Status
Not open for further replies.

JohnJohn20

Advanced Member level 4
Joined
Feb 2, 2012
Messages
111
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,377
Hi. I am building a project using the PIC16F818 and when I try to build the asm code I get this error:

Code:
Error - section 'MAIN_PROG' can not fit the section. Section 'MAIN_PROG' length=0x00000462
My script contains tables and when I trim them down a bit (about 40 lines) the script builds OK so it looks like my main program is too big.

However, when it does build OK and I check the memory usage it is using less than half.

So, is it possible to put parts of the program in other memory blocks or do I just need to trim it down a bit for this chip.

I have attached a copy of the asm file.

Thanks Chris
 

Attachments

  • HeatControl2.txt
    26.3 KB · Views: 64

A came across a similar issue a long time ago programming in C, and had to turn around by splitting a big array into several smaller ones. In assembly everything becomes even more difficult to manage.
 

Thanks Andre. I guess what I am really asking is how should I know if it is a matter of my script being too long.

The 16F818 datasheet says it has a program flash memory of 1k x 14. How does that relate to the number of lines in my asm script?

And splitting the table into doesn't help.
 

The attached file seems to compile without errors.
Upload the problematic file.

Code:
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'F:/tmp/dropbox1/4sch/eda7.X'
make  -f nbproject/Makefile-default.mk dist/default/production/eda7.X.production.hex
make[2]: Entering directory 'F:/tmp/dropbox1/4sch/eda7.X'
"F:\Program Files\Microchip\MPLABX\mpasmx\mpasmx.exe" -q -p16f818 -l"build/default/production/main7.lst" -e"build/default/production/main7.err" -o"build/default/production/main7.o" "main7.asm" 
"F:\Program Files\Microchip\MPLABX\mpasmx\mplink.exe"    -p16f818  -w  -m"dist/default/production/eda7.X.production.map"   -z__MPLAB_BUILD=1  -odist/default/production/eda7.X.production.cof  build/default/production/main7.o     
MPLINK 5.07, LINKER
Device Database Version 1.24
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

MP2HEX 5.07, COFF to HEX File Converter
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

make[2]: Leaving directory 'F:/tmp/dropbox1/4sch/eda7.X'
make[1]: Leaving directory 'F:/tmp/dropbox1/4sch/eda7.X'

BUILD SUCCESSFUL (total time: 4s)
Loading code from F:/tmp/dropbox1/4sch/eda7.X/dist/default/production/eda7.X.production.hex...
Loading completed
 

That is the problematic file, but here it is copied and pasted straight out of the MPLAB application:

Code:
    list      p=16F818           ; list directive to define processor
    #include <p16F818.inc>        ; processor specific variable definitions

    errorlevel  -302              ; suppress message 302 from list file

    __CONFIG   _CP_ON & _WRT_ENABLE_OFF & _CPD_OFF & _CCP1_RB2 & _DEBUG_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _WDT_OFF & _PWRTE_ON & _INTRC_IO 

;***** VARIABLE DEFINITIONS (examples)

; example of using Shared Uninitialized Data Section
INT_VAR     UDATA_SHR    
DeltaRoomTemperature				RES	1
TemperatureHysteresis				RES	1
FanTachMidRange						RES	1
DialTemperature						RES	1
DownTemperature						RES	1
UpTemperature						RES	1
TemperatureDifference				RES	1
LoopCount							RES	1
PulseCount							RES	1
PulseCount1							RES	1
TempertureDifference				RES	1
FanDutyCycle						RES	1
MaxLoopCountBeforeGivingFanError	RES	1
FanStatusBits						RES 1
			; 0: FanTachTemporary
			; 1: FanTach
			; 2: FanTachLast
			; 3: FanStatus
			; 4: FanAlert
ByteToTransmit						RES	1
;**********************************************************************
RESET_VECTOR    CODE    0x0000    ; processor reset vector
        goto    START             ; go to beginning of program

INT_VECTOR      CODE    0x0004    ; interrupt vector location

INTERRUPT


; isr code can go here or be located as a call subroutine elsewhere


MAIN_PROG       CODE

START
;*********************** Header *********************************************
	bcf		STATUS, RP1
 	bcf		STATUS, RP0		; select bank 0
	clrf	PORTA 	; Initialize PORTA by clearing output data latches
	clrf	PORTB 	; Initialize PORTB by clearing output data latches
DeclarePins
	bsf		STATUS, RP1		; select bank 1
					; A0 I 	Analogue	FanTach
					; A1 O 				Fan+
					; A2 I 	Analogue	Tup
					; A3 I	Analogue	Dial
					; A4 I	Analogue	Tdown
					; A5 I	NC
					; A6 O 				LED
					; A7 O	NC
					; B0 O	NC
					; B1 O 	NC
					; B2 O				FanControl PWM
					; B3 O	NC
					; B4 O				TRX
					; B5 O	NC
					; B6 O	NC			Unused
					; B7 O	NC			Unused
	movlw	B'00111101'
	movwf	TRISA

	movlw	B'00000000'
	movwf	TRISB

	movlw   b'01000000'    		;
	movwf   OSCCON         		; select 1-MHz INTOSC clock (1 MHz is max for ad to achieve accuracy)

CheckStable
	btfss   OSCCON,IOFS    		; INTOSC frequency stable?
	goto    CheckStable   		

SetUpADconverter
	movlw	B'10000000'
	movwf	ADCON1			; <7> = 0 =>	data is left justified. I.e ADRESL<6,0> = 0
					; <6> = 0 =>	A/D clock source divide by 2 disabled
					; <5,4> unused
					; <3,0> = 0000 => AN0,AN!,AN2,AN4,AN3 anologue inputs, Vref+ = Vdd, Vref- = Vss

	bcf		STATUS, RP1		; select bank 0
SetUpPWM
	bsf	CCP1CON, 3
	bsf	CCP1CON, 2

ConstantValues
	movlw		B'00000101'					; 5 degree
	movwf		DeltaRoomTemperature		; Up room will always be colder than down roon by this temperature
	movlw		B'00000011'					; 3 degree
	movwf		TemperatureHysteresis		; Tdown < Tup - TempHysteresis --> off & Tdown > Tup --> on
											; DeltaRoomTemperature MUST be >= Temperature Hysteresis
	movlw		B'01111101'					;
	movwf		FanTachMidRange				; = 125;
	movlw		B'01111101'					;
	movwf		MaxLoopCountBeforeGivingFanError	;= 125;
	clrf	LoopCount
	clrf	TempertureDifference
	clrf	FanDutyCycle
	bcf		FanStatusBits, 2				; FanTachLast = 0
	bcf		FanStatusBits, 3				;FanStatus = 0
	bcf		FanStatusBits, 4				;FanAlert = 0
TurnEverythingOff
	bcf		PORTA,1			; Fan+ LOW
	bcf		PORTA,6			; 
	bcf		PORTA,7			; 
	bcf		PORTB,0			; 
	bcf		PORTB,1			; 
	clrf	CCPR1L			; Set PWM MSBs = 0 
	bcf		CCP1CON, 5		
	bcf		CCP1CON, 4		; Set PWM LSB = 0 --> FanControl NotConnected
	bcf		PORTB,3			; 
	bsf		PORTB,4			; Idle state for serial transmission
	bcf		PORTB,6			; LED LOW
	bcf		PORTB,7

;************************ PROGRAM START *************************************

LoopBegin
ReadDial ; AN3
	movlw	B'11011001'
	movwf	ADCON0		; ADCON0<7:6> = 11 --> ADC clock derived from the internal A/D module RC oscillator),  
							; ADCON0<0> = 1 --> turn on AD module, 
							; ADCON0<5:3> Select analog channel. 011 = AN3 
	call 	PulseDelay
	bsf		ADCON0,2				; start taking measurement
	call	CheckMeasuementDone
	bcf		ADCON0,0				; turn off AD converter
	movf	ADRESH, w
	movwf	DialTemperature
CheckIfOnStandby			; if DialTemperature < 85 (255/3)
	movlw	B'01010101'		;movf	85,W
	subwf   DialTemperature,W
	btfss   STATUS,C		
	goto	SystemOnStandby	; reset everything
							; else system not on standby so next we 
CheckIfFanAlert				; check if fan is jammed ie FanAlert (FanStatusBits, 4) = 1
	btfsc	FanStatusBits, 4		; if fanalert is on
	goto	FanAlertIsOn
							; else
ConvertDialTemperature
	call	PlaceConvertedDialTemperatureInW
	movwf	DialTemperature
ReadUpSensor	;AN2
	movlw	B'11010001'
	movwf	ADCON0
	call 	PulseDelay
	bsf		ADCON0,2				; start taking measurement
	call	CheckMeasuementDone
	bcf		ADCON0,0				; turn off AD converter
	call 	PlaceSensorTemperatureInW
	movwf	UpTemperature
ReadDownSensor	;AN4
	movlw	B'11100001'
	movwf	ADCON0
	call 	PulseDelay
	bsf		ADCON0,2				; start taking measurement
	call	CheckMeasuementDone
	bcf		ADCON0,0				; turn off AD converter
	call 	PlaceSensorTemperatureInW
	movwf	DownTemperature
UpdateFanStatus
CheckIfUpTemperatureWarmEnough
	; if UpTemperature >= DialTemperature then goto RoomWarmEnough else goto RoomNotWarmEnough
	movf	DialTemperature, W		;movf	B,W
	subwf	UpTemperature, W		;subwf   A,W
	btfsc	STATUS, C				;btfsc   STATUS,C;
	goto 	RoomIsWarmEnough		;call	EQ_OR_GR
RoomIsNotWarmEnough					; else RoomIsNotWarmEnough
CompareRoomTemperatures						; See if fan needs to be on

SeeIfFanIsOn						; See if fan is on
	btfsc	FanStatusBits, 3		; if FanStatus = 1
	goto	FanIsOn		; goto FanIsOn
FanIsOff				; else FanIsOff
	; if (downTemperature < upTemperature + deltaRoomTemperature) goto ControlFan (ie leave fan off)
	movf	UpTemperature, W
	addwf	DeltaRoomTemperature, W	; mof	B,W
	subwf	DownTemperature, W		; subwf	A,W
	btfss	STATUS, C				; if A < B
	goto	ControlFan				; Leave FanStatus = 0 and goto FanControl
	bsf		FanStatusBits, 3		; else set FanStatus = 1
	clrf	LoopCount				; reeset LoopCount
	goto	ControlFan				; and goto FanContrpol
FanIsOn
	; if (downTemperature - deltaRoomTemperature + temperatureHysteresis <= upTemperature) then FanStatus = 0
	movf	DeltaRoomTemperature, W	;; movf	A,W
	subwf	DownTemperature, W
	addwf	TemperatureHysteresis, W
	subwf	UpTemperature, W		;subwf   B,W
	btfsc   STATUS,C
	bcf		FanStatusBits, 3		;set FanStatus = 0
	goto	ControlFan
RoomIsWarmEnough
	bcf		FanStatusBits, 3		; set FanStatus = 0
	goto	ControlFan

ControlFan
	btfsc	FanStatusBits, 3		; If FanStatus = 1
	goto	TurnFanOn					; goto FanIsOn
TurnFanOff							; else FanIsOff
	bcf		PORTA,1			; Fan+ LOW
	clrf	CCPR1L			; Set PWM control = 0 -->			; FanControl NotConnected
	goto	TransmitData
TurnFanOn
	bsf		PORTA,1			; Fan+ HIGH
	; get duty cycle		dutyCycle = 
	movlw	B'00110010'				;TemperatureDifference = 50 + downTemperature - upTemperature - deltaRoomTemperature;
	addwf	DownTemperature, W
	subwf	UpTemperature, W
	subwf	DeltaRoomTemperature, W
	movwf	TemperatureDifference
	movlw	B'00110011'				; if TemperatureDifference < 51 TemperatureDifference = 0
	subwf	TemperatureDifference, W
	btfss	STATUS, C
	goto	TemperatureDifferenceIs0
	movlw	B'00111100'				;elseif 60 <= TemperatureDifference TemperatureDifference = 10
	subwf	TemperatureDifference, W
	btfsc	STATUS, C
	goto	TemperatureDifferenceIs10
	movlw	B'00110010'
	subwf	TemperatureDifference, 1	; else TemperatureDifference = TempertureDifference - 50
	goto	RecallDutyCycle
TemperatureDifferenceIs0
	clrf	TemperatureDifference
	goto	RecallDutyCycle
TemperatureDifferenceIs10
	movlw	B'00001010'
	movwf	TemperatureDifference
	goto	RecallDutyCycle
RecallDutyCycle
	call	PutDutyCycleInW
	movwf	CCPR1L
CheckFanIsTurning
	incf	LoopCount, 1					; LoopCount ++
	call	GetFanTach
	btfss	FanStatusBits, 1			; if FanTach = 0
	goto	FanTachIs0					; goto FanTachIs0
FanTachIs1								; else
	btfsc	FanStatusBits, 2			; IfFanTachLast = 1
	goto	FanTachEqualsFanTachLast	; Goto FanTachEqualsFanTachLast
	bsf		FanStatusBits, 2			; else FanTachDoesNotEqualFanTAchLast --> Fan has moved --> SetFanTachLast = FanTach
	clrf	LoopCount					; and resetLoopCounter
	bcf		FanStatusBits, 4			; Set FanAlert = 0
	goto	TransmitData
FanTachIs0
	btfss	FanStatusBits, 2			; IfFanTachLast = 0
	goto	FanTachEqualsFanTachLast
	bcf		FanStatusBits, 2			; else FanTachDoesNotEqualFanTAchLast --> Fan has moved --> SetFanTachLast = FanTach
	clrf	LoopCount					; and resetLoopCounter
	bcf		FanStatusBits, 4			; Set FanAlert = 0
	goto	TransmitData
FanTachEqualsFanTachLast
	movf	MaxLoopCountBeforeGivingFanError, W  ; If LoopCount < MaxLoopCountBeforeGivingFanError 
	subwf	LoopCount, W
	btfss	STATUS, C
	goto	TransmitData								; goto TransmitData
	bsf		FanStatusBits, 4					; else FanTach has = FanTAchLast for last MaxLoopCountBeforeGivingFanError Loops --> FanA FanAlert = 1
	goto	TransmitData								; and goto TransmitData

TransmitData
	movf	DialTemperature, W
	movwf	ByteToTransmit
	call	TransmitByte
	movf	UpTemperature, W
	movwf	ByteToTransmit
	call	TransmitByte
	movf	DownTemperature, W
	movwf	ByteToTransmit
	call	TransmitByte
	movf	FanStatusBits, W
	movwf	ByteToTransmit
	call	TransmitByte

LoopEnd
	goto LoopBegin


TransmitByte
	bsf 	PORTB, 4
	nop						; each bit needs to take 4 instruction cycles plus PulseDelay
	nop						; ie PulseDelay = 104us - 4 instruction cycles (= 104 - 4 X 4 clock frequency) for 9600bps baud rate
	nop
	call 	PulseDelay		; start bit
	btfss	ByteToTransmit, 0
	bsf		PORTB, 4
	btfsc	ByteToTransmit, 0
	bcf		PORTB, 4
	call 	PulseDelay		; LSB
	btfss	ByteToTransmit, 1
	bsf		PORTB, 4
	btfsc	ByteToTransmit, 1
	bcf		PORTB, 4
	call 	PulseDelay		; 
	btfss	ByteToTransmit, 2
	bsf		PORTB, 4
	btfsc	ByteToTransmit, 2
	bcf		PORTB, 4
	call 	PulseDelay		; 
	btfss	ByteToTransmit, 3
	bsf		PORTB, 4
	btfsc	ByteToTransmit, 3
	bcf		PORTB, 4
	call 	PulseDelay		; 
	btfss	ByteToTransmit, 4
	bsf		PORTB, 4
	btfsc	ByteToTransmit, 4
	bcf		PORTB, 4
	call 	PulseDelay		; 
	btfss	ByteToTransmit, 5
	bsf		PORTB, 4
	btfsc	ByteToTransmit, 5
	bcf		PORTB, 4
	call 	PulseDelay		; 
	btfss	ByteToTransmit, 6
	bsf		PORTB, 4
	btfsc	ByteToTransmit, 6
	bcf		PORTB, 4
	call 	PulseDelay		; 
	btfss	ByteToTransmit, 7
	bsf		PORTB, 4
	btfsc	ByteToTransmit, 7
	bcf		PORTB, 4
	call 	PulseDelay		; MSB
	bcf 	PORTB, 4
	nop						; each bit needs to take 4 instruction cycles plus PulseDelay
	nop						; ie PulseDelay = 104us - 4 instruction cycles (= 104 - 4 X 4 clock frequency) for 9600bps baud rate
	nop
	call 	PulseDelay		; stop bit
	return

GetFanTach
	movlw	B'11000001'
	movwf	ADCON0
	call 	PulseDelay
	bsf		ADCON0,2				; start taking measurement
	call	CheckMeasuementDone
	bcf		ADCON0,0				; turn off AD converter
	movf	ADRESH, w
									; if ADRESH < FanTachMidValue Then FanTach = 0 Else FanTach = 1
	movf	FanTachMidRange, W		;movf	B,W
	subwf	ADRESH, W				;subwf   A,W
	btfss	STATUS, C				;btfss   STATUS,C
	goto	FanTachIsZero				;call	LESS_THAN
	bsf		FanStatusBits, 1		; else FanTach = 1
	return
FanTachIsZero
	bcf		FanStatusBits, 1		; set FanTach = 0
	return
FanAlertIsOn
	bcf		PORTA,1			; Fan+ LOW
	bcf		PORTB,2			; FanControl NotConnected
FlashLED
	incf	LoopCount, 1
	btfss	LoopCount, 7	; if LoopCount < 128
	goto	TurnLEDoff		; goto TurnLEDoff
	bsf		PORTA, 6		; else turn on LED
	goto	TransmitData			; 
TurnLEDoff
	bcf		PORTA, 6		;   
	goto	TransmitData
SystemOnStandby
	bcf		PORTA,1			; Fan+ LOW
	bcf		PORTB,2			; FanControl NotConnected
	bcf		PORTB,6			; LED LOW
	clrf	LoopCount
	clrf	TempertureDifference
	clrf	FanDutyCycle
	clrf	FanStatusBits	; FanTachTemp = 0, FanTach = 0, FanTachLast = 0, FanStatus = 0, FanAlert = 0
	goto	TransmitData
PulseDelay					; 1 PulseDelay ~ 0.10s
	movlw	0x10;10
	movwf	PulseCount
	movlw	0x04;03
	movwf	PulseCount1
PulseDelayLoop
	decfsz	PulseCount,1
	goto	PulseDelayLoop
	decfsz	PulseCount1,1
	goto	PulseDelayLoop
	return
CheckMeasuementDone
	btfsc	ADCON0,2
	goto	CheckMeasuementDone
	return
PutDutyCycleInW
	movf	TemperatureDifference,w
	addwf	PCL,1
	retlw	0xFF	;255
	retlw	0xE6	;230
	retlw	0xCD	;205
	retlw	0xB4	;180
	retlw	0x9B	;155
	retlw	0x82	;130
	retlw	0x69	;105
	retlw	0x50	;80
	retlw	0x37	;55
	retlw	0x1E	;30
	retlw	0x00	;0
PlaceConvertedDialTemperatureInW
								;85<=DialTemperature<=255	
	movlw	B'01010101'
	subwf	DialTemperature, 1	;0<=DialTemperature<=170	0, 10101010
	bcf		DialTemperature, 1
	rrf		DialTemperature, 1	; 0<=DialTemperature<=85	0, 1010101
	bcf		DialTemperature, 1
	rrf		DialTemperature, 1	; 0<=DialTemperature<=42	0, 101010
	bcf		DialTemperature, 1
	rrf		DialTemperature, 1	; 0<=DialTemperature<=21	0, 10101
	movf	DialTemperature,w	
	addwf	PCL,1
	retlw	0x3C	;60
	retlw	0x3D
	retlw	0x3E
	retlw	0x3F
	retlw	0x40
	retlw	0x41	; 65
	retlw	0x42
	retlw	0x43
	retlw	0x44
	retlw	0x45
	retlw	0x46	; 70
	retlw	0x47
	retlw	0x48
	retlw	0x49
	retlw	0x4A
	retlw	0x4B	; 75
	retlw	0x4C
	retlw	0x4D
	retlw	0x4E
	retlw	0x4F
	retlw	0x50	; 80
	retlw	0x51	; 81

PlaceSensorTemperatureInW
	movf	ADRESH,w
	addwf	PCL,1
	retlw	0xCA ; returns 200 (= T + 50) at location 0
	retlw	0xCA ; returns 200 (= T + 50) at location 1
	retlw	0xCA ; returns 200 (= T + 50) at location 3
	retlw	0xCA ; returns 200 (= T + 50) at location 4
	retlw	0xCA ; returns 200 (= T + 50) at location 4
	retlw	0xB1 ; returns 191 (= T + 50) at location 5
	retlw	0xBA ; returns 184 (= T + 50) at location 6
	retlw	0xB4 ; returns 178 (= T + 50) at location 7
	retlw	0xAF ; returns 173 (= T + 50) at location 8
	retlw	0xAA ; returns 168 (= T + 50) at location 9
	retlw	0xA6 ; returns 164 (= T + 50) at location 10
	retlw	0xA3 ; returns 161 (= T + 50) at location 11
	retlw	0x90 ; returns 158 (= T + 50) at location 12
	retlw	0x9D ; returns 155 (= T + 50) at location 13
	retlw	0x9A ; returns 152 (= T + 50) at location 14
	retlw	0x98 ; returns 150 (= T + 50) at location 15
	retlw	0x96 ; returns 148 (= T + 50) at location 16
	retlw	0x94 ; returns 146 (= T + 50) at location 17
	retlw	0x92 ; returns 144 (= T + 50) at location 18
	retlw	0x80 ; returns 142 (= T + 50) at location 19
	retlw	0x8E ; returns 140 (= T + 50) at location 20
	retlw	0x8D ; returns 139 (= T + 50) at location 21
	retlw	0x8B ; returns 137 (= T + 50) at location 22
	retlw	0x89 ; returns 135 (= T + 50) at location 23
	retlw	0x88 ; returns 134 (= T + 50) at location 24
	retlw	0x87 ; returns 133 (= T + 50) at location 25
	retlw	0x85 ; returns 131 (= T + 50) at location 26
	retlw	0x84 ; returns 130 (= T + 50) at location 27
	retlw	0x83 ; returns 129 (= T + 50) at location 28
	retlw	0x82 ; returns 128 (= T + 50) at location 29
	retlw	0x71 ; returns 127 (= T + 50) at location 30
	retlw	0x7F ; returns 125 (= T + 50) at location 31
	retlw	0x7E ; returns 124 (= T + 50) at location 32
	retlw	0x7D ; returns 123 (= T + 50) at location 33
	retlw	0x7D ; returns 123 (= T + 50) at location 34
	retlw	0x7C ; returns 122 (= T + 50) at location 35
	retlw	0x7B ; returns 121 (= T + 50) at location 36
	retlw	0x7A ; returns 120 (= T + 50) at location 37
	retlw	0x79 ; returns 119 (= T + 50) at location 38
	retlw	0x78 ; returns 118 (= T + 50) at location 39
	retlw	0x77 ; returns 117 (= T + 50) at location 40
	retlw	0x76 ; returns 116 (= T + 50) at location 41
	retlw	0x75 ; returns 115 (= T + 50) at location 42
	retlw	0x75 ; returns 115 (= T + 50) at location 43
	retlw	0x74 ; returns 114 (= T + 50) at location 44
	retlw	0x73 ; returns 113 (= T + 50) at location 45
	retlw	0x73 ; returns 113 (= T + 50) at location 46
	retlw	0x72 ; returns 112 (= T + 50) at location 47
	retlw	0x61 ; returns 111 (= T + 50) at location 48
	retlw	0x60 ; returns 110 (= T + 50) at location 49
	retlw	0x60 ; returns 110 (= T + 50) at location 50
	retlw	0x6F ; returns 109 (= T + 50) at location 51
	retlw	0x6E ; returns 108 (= T + 50) at location 52
	retlw	0x6E ; returns 108 (= T + 50) at location 53
	retlw	0x6D ; returns 107 (= T + 50) at location 54
	retlw	0x6D ; returns 107 (= T + 50) at location 55
	retlw	0x6C ; returns 106 (= T + 50) at location 56
	retlw	0x6B ; returns 105 (= T + 50) at location 57
	retlw	0x6B ; returns 105 (= T + 50) at location 58
	retlw	0x6A ; returns 104 (= T + 50) at location 59
	retlw	0x6A ; returns 104 (= T + 50) at location 60
	retlw	0x69 ; returns 103 (= T + 50) at location 61
	retlw	0x69 ; returns 103 (= T + 50) at location 62
	retlw	0x68 ; returns 102 (= T + 50) at location 63
	retlw	0x67 ; returns 101 (= T + 50) at location 64
	retlw	0x67 ; returns 101 (= T + 50) at location 65
	retlw	0x66 ; returns 100 (= T + 50) at location 66
	retlw	0x66 ; returns 100 (= T + 50) at location 67
	retlw	0x65 ; returns 99 (= T + 50) at location 68
	retlw	0x65 ; returns 99 (= T + 50) at location 69
	retlw	0x64 ; returns 98 (= T + 50) at location 70
	retlw	0x64 ; returns 98 (= T + 50) at location 71
	retlw	0x63 ; returns 97 (= T + 50) at location 72
	retlw	0x63 ; returns 97 (= T + 50) at location 73
	retlw	0x62 ; returns 96 (= T + 50) at location 74
	retlw	0x62 ; returns 96 (= T + 50) at location 75
	retlw	0x51 ; returns 95 (= T + 50) at location 76
	retlw	0x51 ; returns 95 (= T + 50) at location 77
	retlw	0x50 ; returns 94 (= T + 50) at location 78
	retlw	0x50 ; returns 94 (= T + 50) at location 79
	retlw	0x50 ; returns 94 (= T + 50) at location 80
	retlw	0x5F ; returns 93 (= T + 50) at location 81
	retlw	0x5F ; returns 93 (= T + 50) at location 82
	retlw	0x5E ; returns 92 (= T + 50) at location 83
	retlw	0x5E ; returns 92 (= T + 50) at location 84
	retlw	0x5D ; returns 91 (= T + 50) at location 85
	retlw	0x5D ; returns 91 (= T + 50) at location 86
	retlw	0x5D ; returns 91 (= T + 50) at location 87
	retlw	0x5C ; returns 90 (= T + 50) at location 88
	retlw	0x5C ; returns 90 (= T + 50) at location 89
	retlw	0x5B ; returns 89 (= T + 50) at location 90
	retlw	0x5B ; returns 89 (= T + 50) at location 91
	retlw	0x5B ; returns 89 (= T + 50) at location 92
	retlw	0x5A ; returns 88 (= T + 50) at location 93
	retlw	0x5A ; returns 88 (= T + 50) at location 94
	retlw	0x59 ; returns 87 (= T + 50) at location 95
	retlw	0x59 ; returns 87 (= T + 50) at location 96
	retlw	0x58 ; returns 86 (= T + 50) at location 97
	retlw	0x58 ; returns 86 (= T + 50) at location 98
	retlw	0x58 ; returns 86 (= T + 50) at location 99
	retlw	0x57 ; returns 85 (= T + 50) at location 100
	retlw	0x57 ; returns 85 (= T + 50) at location 101
	retlw	0x56 ; returns 84 (= T + 50) at location 102
	retlw	0x56 ; returns 84 (= T + 50) at location 103
	retlw	0x56 ; returns 84 (= T + 50) at location 104
	retlw	0x55 ; returns 83 (= T + 50) at location 105
	retlw	0x55 ; returns 83 (= T + 50) at location 106
	retlw	0x55 ; returns 83 (= T + 50) at location 107
	retlw	0x54 ; returns 82 (= T + 50) at location 108
	retlw	0x54 ; returns 82 (= T + 50) at location 109
	retlw	0x54 ; returns 82 (= T + 50) at location 110
	retlw	0x53 ; returns 81 (= T + 50) at location 111
	retlw	0x53 ; returns 81 (= T + 50) at location 112
	retlw	0x52 ; returns 80 (= T + 50) at location 113
	retlw	0x52 ; returns 80 (= T + 50) at location 114
	retlw	0x52 ; returns 80 (= T + 50) at location 115
	retlw	0x41 ; returns 79 (= T + 50) at location 116
	retlw	0x41 ; returns 79 (= T + 50) at location 117
	retlw	0x41 ; returns 79 (= T + 50) at location 118
	retlw	0x40 ; returns 78 (= T + 50) at location 119
	retlw	0x40 ; returns 78 (= T + 50) at location 120
	retlw	0x40 ; returns 78 (= T + 50) at location 121
	retlw	0x4F ; returns 77 (= T + 50) at location 122
	retlw	0x4F ; returns 77 (= T + 50) at location 123
	retlw	0x4F ; returns 77 (= T + 50) at location 124
	retlw	0x4E ; returns 76 (= T + 50) at location 125
	retlw	0x4E ; returns 76 (= T + 50) at location 126
	retlw	0x4D ; returns 75 (= T + 50) at location 127
	retlw	0x4D ; returns 75 (= T + 50) at location 128
	retlw	0x4D ; returns 75 (= T + 50) at location 129
	retlw	0x4C ; returns 74 (= T + 50) at location 130
	retlw	0x4C ; returns 74 (= T + 50) at location 131
	retlw	0x4C ; returns 74 (= T + 50) at location 132
	retlw	0x4B ; returns 73 (= T + 50) at location 133
	retlw	0x4B ; returns 73 (= T + 50) at location 134
	retlw	0x4B ; returns 73 (= T + 50) at location 135
	retlw	0x4A ; returns 72 (= T + 50) at location 136
	retlw	0x4A ; returns 72 (= T + 50) at location 137
	retlw	0x4A ; returns 72 (= T + 50) at location 138
	retlw	0x49 ; returns 71 (= T + 50) at location 139
	retlw	0x49 ; returns 71 (= T + 50) at location 140
	retlw	0x49 ; returns 71 (= T + 50) at location 141
	retlw	0x48 ; returns 70 (= T + 50) at location 142
	retlw	0x48 ; returns 70 (= T + 50) at location 143
	retlw	0x48 ; returns 70 (= T + 50) at location 144
	retlw	0x47 ; returns 69 (= T + 50) at location 145
	retlw	0x47 ; returns 69 (= T + 50) at location 146
	retlw	0x47 ; returns 69 (= T + 50) at location 147
	retlw	0x46 ; returns 68 (= T + 50) at location 148
	retlw	0x46 ; returns 68 (= T + 50) at location 149
	retlw	0x46 ; returns 68 (= T + 50) at location 150
	retlw	0x45 ; returns 67 (= T + 50) at location 151
	retlw	0x45 ; returns 67 (= T + 50) at location 152
	retlw	0x45 ; returns 67 (= T + 50) at location 153
	retlw	0x44 ; returns 66 (= T + 50) at location 154
	retlw	0x44 ; returns 66 (= T + 50) at location 155
	retlw	0x43 ; returns 65 (= T + 50) at location 156
	retlw	0x43 ; returns 65 (= T + 50) at location 157
	retlw	0x43 ; returns 65 (= T + 50) at location 158
	retlw	0x42 ; returns 64 (= T + 50) at location 159
	retlw	0x42 ; returns 64 (= T + 50) at location 160
	retlw	0x42 ; returns 64 (= T + 50) at location 161
	retlw	0x31 ; returns 63 (= T + 50) at location 162
	retlw	0x31 ; returns 63 (= T + 50) at location 163
	retlw	0x31 ; returns 63 (= T + 50) at location 164
	retlw	0x30 ; returns 62 (= T + 50) at location 165
	retlw	0x30 ; returns 62 (= T + 50) at location 166
	retlw	0x30 ; returns 62 (= T + 50) at location 167
	retlw	0x3F ; returns 61 (= T + 50) at location 168
	retlw	0x3F ; returns 61 (= T + 50) at location 169
	retlw	0x3E ; returns 60 (= T + 50) at location 170
	retlw	0x3E ; returns 60 (= T + 50) at location 171
	retlw	0x3E ; returns 60 (= T + 50) at location 172
	retlw	0x3D ; returns 59 (= T + 50) at location 173
	retlw	0x3D ; returns 59 (= T + 50) at location 174
	retlw	0x3D ; returns 59 (= T + 50) at location 175
	retlw	0x3C ; returns 58 (= T + 50) at location 176
	retlw	0x3C ; returns 58 (= T + 50) at location 177
	retlw	0x3C ; returns 58 (= T + 50) at location 178
	retlw	0x3B ; returns 57 (= T + 50) at location 179
	retlw	0x3B ; returns 57 (= T + 50) at location 180
	retlw	0x3A ; returns 56 (= T + 50) at location 181
	retlw	0x3A ; returns 56 (= T + 50) at location 182
	retlw	0x3A ; returns 56 (= T + 50) at location 183
	retlw	0x39 ; returns 55 (= T + 50) at location 184
	retlw	0x39 ; returns 55 (= T + 50) at location 185
	retlw	0x38 ; returns 54 (= T + 50) at location 186
	retlw	0x38 ; returns 54 (= T + 50) at location 187
	retlw	0x38 ; returns 54 (= T + 50) at location 188
	retlw	0x37 ; returns 53 (= T + 50) at location 189
	retlw	0x37 ; returns 53 (= T + 50) at location 190
	retlw	0x37 ; returns 53 (= T + 50) at location 191
	retlw	0x36 ; returns 52 (= T + 50) at location 192
	retlw	0x36 ; returns 52 (= T + 50) at location 193
	retlw	0x35 ; returns 51 (= T + 50) at location 194
	retlw	0x35 ; returns 51 (= T + 50) at location 195
	retlw	0x34 ; returns 50 (= T + 50) at location 196
	retlw	0x34 ; returns 50 (= T + 50) at location 197
	retlw	0x34 ; returns 50 (= T + 50) at location 198
	retlw	0x33 ; returns 49 (= T + 50) at location 199
	retlw	0x33 ; returns 49 (= T + 50) at location 200
	retlw	0x32 ; returns 48 (= T + 50) at location 201
	retlw	0x32 ; returns 48 (= T + 50) at location 202
	retlw	0x21 ; returns 47 (= T + 50) at location 203
	retlw	0x21 ; returns 47 (= T + 50) at location 204
	retlw	0x21 ; returns 47 (= T + 50) at location 205
	retlw	0x20 ; returns 46 (= T + 50) at location 206
	retlw	0x20 ; returns 46 (= T + 50) at location 207
	retlw	0x2F ; returns 45 (= T + 50) at location 208
	retlw	0x2F ; returns 45 (= T + 50) at location 209
	retlw	0x2E ; returns 44 (= T + 50) at location 210
	retlw	0x2E ; returns 44 (= T + 50) at location 211
	retlw	0x2D ; returns 43 (= T + 50) at location 212
	retlw	0x2D ; returns 43 (= T + 50) at location 213
	retlw	0x2C ; returns 42 (= T + 50) at location 214
	retlw	0x2C ; returns 42 (= T + 50) at location 215
	retlw	0x2B ; returns 41 (= T + 50) at location 216
	retlw	0x2A ; returns 40 (= T + 50) at location 217
	retlw	0x2A ; returns 40 (= T + 50) at location 218
	retlw	0x29 ; returns 39 (= T + 50) at location 219
	retlw	0x29 ; returns 39 (= T + 50) at location 220
	retlw	0x28 ; returns 38 (= T + 50) at location 221
	retlw	0x28 ; returns 38 (= T + 50) at location 222
	retlw	0x27 ; returns 37 (= T + 50) at location 223
	retlw	0x26 ; returns 36 (= T + 50) at location 224
	retlw	0x26 ; returns 36 (= T + 50) at location 225
	retlw	0x25 ; returns 35 (= T + 50) at location 226
	retlw	0x24 ; returns 34 (= T + 50) at location 227
	retlw	0x24 ; returns 34 (= T + 50) at location 228
	retlw	0x23 ; returns 33 (= T + 50) at location 229
	retlw	0x22 ; returns 32 (= T + 50) at location 230
	retlw	0x11 ; returns 31 (= T + 50) at location 231
	retlw	0x11 ; returns 31 (= T + 50) at location 232
	retlw	0x10 ; returns 30 (= T + 50) at location 233
	retlw	0x1F ; returns 29 (= T + 50) at location 234
	retlw	0x1E ; returns 28 (= T + 50) at location 235
	retlw	0x1D ; returns 27 (= T + 50) at location 236
	retlw	0x1C ; returns 26 (= T + 50) at location 237
	retlw	0x1B ; returns 25 (= T + 50) at location 238
	retlw	0x1A ; returns 24 (= T + 50) at location 239
	retlw	0x19 ; returns 23 (= T + 50) at location 240
	retlw	0x18 ; returns 22 (= T + 50) at location 241
	retlw	0x17 ; returns 21 (= T + 50) at location 242
	retlw	0x16 ; returns 20 (= T + 50) at location 243
	retlw	0x14 ; returns 18 (= T + 50) at location 244
	retlw	0x13 ; returns 17 (= T + 50) at location 245
	retlw	0x01 ; returns 15 (= T + 50) at location 246
	retlw	0x00 ; returns 14 (= T + 50) at location 247
	retlw	0x0E ; returns 12 (= T + 50) at location 248
	retlw	0x0C ; returns 10 (= T + 50) at location 249
	retlw	0x09 ; returns 7 (= T + 50) at location 250
	retlw	0x06 ; returns 4 (= T + 50) at location 251
	retlw	0x03 ; returns 1 (= T + 50) at location 252
	retlw	0x00 ; returns 0 (= T + 50) at location 253
	retlw	0x00 ; returns 0 (= T + 50) at location 254
	retlw	0x00 ; returns 0 (= T + 50) at location 255



ProgramEnd

        END                       ; directive 'end of program'

And when I try to build it I getthis result in the output window:

----------------------------------------------------------------------
Debug build of project `D:\PIC\Projects\HeatControl2\HeatControl2.mcp' started.
Language tool versions: MPASMWIN.exe v5.47, mplink.exe v4.45, mplib.exe v4.45
Preprocessor symbol `__DEBUG' is defined.
Mon May 16 11:42:33 2016
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "D:\PIC\Projects\HeatControl2\HeatControl2.o".
Clean: Deleted file "D:\PIC\Projects\HeatControl2\HeatControl2.err".
Clean: Deleted file "D:\PIC\Projects\HeatControl2\HeatControl2.lst".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F818 "HeatControl2.ASM" /l"HeatControl2.lst" /e"HeatControl2.err" /o"HeatControl2.o" /d__DEBUG=1
Executing: "C:\Program Files\Microchip\MPASM Suite\mplink.exe" /p16F818 "HeatControl2.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"HeatControl2.cof" /M"HeatControl2.map" /W
MPLINK 4.45, Linker
Device Database Version 1.10
Copyright (c) 1998-2011 Microchip Technology Inc.
Error - section 'MAIN_PROG' can not fit the section. Section 'MAIN_PROG' length=0x00000462
Errors    : 1

Link step failed.
----------------------------------------------------------------------
Debug build of project `D:\PIC\Projects\HeatControl2\HeatControl2.mcp' failed.
Language tool versions: MPASMWIN.exe v5.47, mplink.exe v4.45, mplib.exe v4.45
Preprocessor symbol `__DEBUG' is defined.
Mon May 16 11:42:34 2016
----------------------------------------------------------------------
BUILD FAILED
- - - Updated - - -

And as I said, if I delete 40 lines out of the last table it builds OK.

I am using MPLAB IDE ver 8.88

Whys doesn't it build for me?
 
Last edited by a moderator:

I have selected Relocatable code during project make.
Results:
Code:
----------------------------------------------------------------------
Debug build of project `T:\dropbox1\pic\eda7m8.mcp' started.
Language tool versions: MPASMWIN.exe v5.43, mplink.exe v4.41, mplib.exe v4.41
Preprocessor symbol `__DEBUG' is defined.
Mon May 16 15:10:39 2016
----------------------------------------------------------------------
Make: The target "T:\dropbox1\pic\main7e.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F818 "main7e.asm" /l"main7e.lst" /e"main7e.err" /o"main7e.o" /d__DEBUG=1
Make: The target "T:\dropbox1\pic\eda7m8.cof" is out of date.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\mplink.exe" /p16F818 "main7e.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /m"eda7m8.map" /w /o"eda7m8.cof"
MPLINK 4.41, Linker
Device Database Version 1.5
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

MP2HEX 4.41, COFF to HEX File Converter
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

Loaded T:\dropbox1\pic\eda7m8.cof.
----------------------------------------------------------------------
Debug build of project `T:\dropbox1\pic\eda7m8.mcp' succeeded.
Language tool versions: MPASMWIN.exe v5.43, mplink.exe v4.41, mplib.exe v4.41
Preprocessor symbol `__DEBUG' is defined.
Mon May 16 15:10:43 2016
----------------------------------------------------------------------
BUILD SUCCEEDED
I still don't get any errors.

Produced Hex file follows:
Code:
:020000040000FA
:020000000328D3
:040002000034003492
:0A000600031383128501860103171E
:100010003D3085000030860040308F000F1D0E28D7
:1000200080309F000313971517150530A00003308B
:10003000A1007D30A2007D30AC00A701AA01AB0178
:100040002D11AD112D128510051385130610861084
:100050009501971217128611061606138613D930CA
:100060009F00F9201F1502211F101E08A300553004
:100070002302031CF1282D1AE8281221A300D130F5
:100080009F00F9201F1502211F103221A500E13029
:100090009F00F9201F1502211F103221A400230800
:1000A000250203186428AD195D28250820072402BD
:1000B000031C6628AD15A701662820082402210725
:1000C00025020318AD116628AD116628AD196B28FD
:1000D00085109501992885143230240725022002C5
:1000E000A60033302602031C7C283C30260203186D
:1000F0007E283230A6028128A60181280A30A60077
:10010000812805219500A70AD920AD1C8D282D191D
:1001100093282D15A7012D1299282D1D93282D11F7
:10012000A7012D1299282C082702031C99282D16A7
:1001300099282308AE00A6202508AE00A620240892
:10014000AE00A6202D08AE00A6202F28061600001F
:1001500000000000F9202E1C06162E180612F920A9
:10016000AE1C0616AE180612F9202E1D06162E1904
:100170000612F920AE1D0616AE190612F9202E1E23
:1001800006162E1A0612F920AE1E0616AE1A061212
:10019000F9202E1F06162E1B0612F920AE1F06167A
:1001A000AE1B0612F9200612000000000000F92024
:1001B0000800C1309F00F9201F1502211F101E08E2
:1001C00022081E02031CE628AD140800AD1008002A
:1001D00085100611A70AA71FEF28051799280513F0
:1001E0009928851006110613A701AA01AB01AD01DC
:1001F00099281030A8000430A900A80BFD28A90BED
:10020000FD2808001F190229080026088207FF346C
:10021000E634CD34B4349B348234693450343734CA
:100220001E3400345530A302A310A30CA310A30C5A
:10023000A310A30C230882073C343D343E343F34E2
:1002400040344134423443344434453446344734F2
:10025000483449344A344B344C344D344E344F34A2
:10026000503451341E088207CA34CA34CA34CA34DE
:10027000CA34B134BA34B434AF34AA34A634A33453
:1002800090349D349A349834963494349234803433
:100290008E348D348B348934883487348534843477
:1002A0008334823471347F347E347D347D347C34C5
:1002B0007B347A34793478347734763475347534E1
:1002C00074347334733472346134603460346F3432
:1002D0006E346E346D346D346C346B346B346A341C
:1002E0006A34693469346834673467346634663430
:1002F0006534653464346434633463346234623442
:10030000513451345034503450345F345F345E349F
:100310005E345D345D345D345C345C345B345B345A
:100320005B345A345A345934593458345834583464
:10033000573457345634563456345534553455346E
:100340005434543454345334533452345234523475
:100350004134413441344034403440344F344F34DC
:100360004F344E344E344D344D344D344C344C3483
:100370004C344B344B344B344A344A344A34493489
:10038000493449344834483448344734473447348E
:100390004634463446344534453445344434443494
:1003A00043344334433442344234423431343134BC
:1003B00031343034303430343F343F343E343E34E2
:1003C0003E343D343D343D343C343C343C343B34A9
:1003D0003B343A343A343A343934393438343834B2
:1003E00038343734373437343634363435343534BA
:1003F00034343434343433343334323432342134D6
:1004000021342134203420342F342F342E342E3410
:100410002D342D342C342C342B342A342A342934E2
:1004200029342834283427342634263425342434F7
:100430002434233422341134113410341F341E3444
:100440001D341C341B341A34193418341734163440
:1004500014341334013400340E340C3409340634AB
:080460000334003400340034C1
:02400E00101F81
:00000001FF


Map file confirms the sizeof MAIN_PROG segment you posted:
Code:
MPLINK 4.41, Linker
Linker Map File - Created Mon May 16 15:10:42 2016

                                 Section Info
                  Section       Type    Address   Location Size(Bytes)
                ---------  ---------  ---------  ---------  ---------
             RESET_VECTOR       code   0x000000    program   0x000002
                   .cinit    romdata   0x000001    program   0x000004
                MAIN_PROG       code   0x000003    program   0x000462
               INT_VECTOR       code   0x000004    program   0x000000
    .config_2007_MAIN7E.O       code   0x002007    program   0x000002
                  INT_VAR      udata   0x000020       data   0x00000f



                              Program Memory Usage 
                               Start         End      
                           ---------   ---------      
                            0x000000    0x000233      
                            0x002007    0x002007      
            565 out of 1158 program addresses used, program memory utilization is 48%



                              Symbols - Sorted by Name
                     Name    Address   Location    Storage File                     
                ---------  ---------  ---------  --------- ---------                
        CheckFanIsTurning   0x000083    program     static T:\dropbox1\pic\main7e.asm
          CheckIfFanAlert   0x00003b    program     static T:\dropbox1\pic\main7e.asm
         CheckIfOnStandby   0x000037    program     static T:\dropbox1\pic\main7e.asm
CheckIfUpTemperatureWarmEnough   0x00004f    program     static T:\dropbox1\pic\main7e.asm
      CheckMeasuementDone   0x000102    program     static T:\dropbox1\pic\main7e.asm
              CheckStable   0x00000e    program     static T:\dropbox1\pic\main7e.asm
  CompareRoomTemperatures   0x000053    program     static T:\dropbox1\pic\main7e.asm
           ConstantValues   0x000015    program     static T:\dropbox1\pic\main7e.asm
               ControlFan   0x000066    program     static T:\dropbox1\pic\main7e.asm
   ConvertDialTemperature   0x00003d    program     static T:\dropbox1\pic\main7e.asm
              DeclarePins   0x000007    program     static T:\dropbox1\pic\main7e.asm
             FanAlertIsOn   0x0000e8    program     static T:\dropbox1\pic\main7e.asm
                 FanIsOff   0x000055    program     static T:\dropbox1\pic\main7e.asm
                  FanIsOn   0x00005d    program     static T:\dropbox1\pic\main7e.asm
 FanTachEqualsFanTachLast   0x000093    program     static T:\dropbox1\pic\main7e.asm
               FanTachIs0   0x00008d    program     static T:\dropbox1\pic\main7e.asm
               FanTachIs1   0x000087    program     static T:\dropbox1\pic\main7e.asm
            FanTachIsZero   0x0000e6    program     static T:\dropbox1\pic\main7e.asm
                 FlashLED   0x0000ea    program     static T:\dropbox1\pic\main7e.asm
               GetFanTach   0x0000d9    program     static T:\dropbox1\pic\main7e.asm
                INTERRUPT   0x000004    program     static T:\dropbox1\pic\main7e.asm
                LoopBegin   0x00002f    program     static T:\dropbox1\pic\main7e.asm
                  LoopEnd   0x0000a5    program     static T:\dropbox1\pic\main7e.asm
PlaceConvertedDialTemperatureInW   0x000112    program     static T:\dropbox1\pic\main7e.asm
PlaceSensorTemperatureInW   0x000132    program     static T:\dropbox1\pic\main7e.asm
               ProgramEnd   0x000234    program     static T:\dropbox1\pic\main7e.asm
               PulseDelay   0x0000f9    program     static T:\dropbox1\pic\main7e.asm
           PulseDelayLoop   0x0000fd    program     static T:\dropbox1\pic\main7e.asm
          PutDutyCycleInW   0x000105    program     static T:\dropbox1\pic\main7e.asm
                 ReadDial   0x00002f    program     static T:\dropbox1\pic\main7e.asm
           ReadDownSensor   0x000047    program     static T:\dropbox1\pic\main7e.asm
             ReadUpSensor   0x00003f    program     static T:\dropbox1\pic\main7e.asm
          RecallDutyCycle   0x000081    program     static T:\dropbox1\pic\main7e.asm
      RoomIsNotWarmEnough   0x000053    program     static T:\dropbox1\pic\main7e.asm
         RoomIsWarmEnough   0x000064    program     static T:\dropbox1\pic\main7e.asm
                    START   0x000003    program     static T:\dropbox1\pic\main7e.asm
             SeeIfFanIsOn   0x000053    program     static T:\dropbox1\pic\main7e.asm
         SetUpADconverter   0x000010    program     static T:\dropbox1\pic\main7e.asm
                 SetUpPWM   0x000013    program     static T:\dropbox1\pic\main7e.asm
          SystemOnStandby   0x0000f1    program     static T:\dropbox1\pic\main7e.asm
 TemperatureDifferenceIs0   0x00007c    program     static T:\dropbox1\pic\main7e.asm
TemperatureDifferenceIs10   0x00007e    program     static T:\dropbox1\pic\main7e.asm
             TransmitByte   0x0000a6    program     static T:\dropbox1\pic\main7e.asm
             TransmitData   0x000099    program     static T:\dropbox1\pic\main7e.asm
        TurnEverythingOff   0x000023    program     static T:\dropbox1\pic\main7e.asm
               TurnFanOff   0x000068    program     static T:\dropbox1\pic\main7e.asm
                TurnFanOn   0x00006b    program     static T:\dropbox1\pic\main7e.asm
               TurnLEDoff   0x0000ef    program     static T:\dropbox1\pic\main7e.asm
          UpdateFanStatus   0x00004f    program     static T:\dropbox1\pic\main7e.asm
           ByteToTransmit   0x00002e       data     static T:\dropbox1\pic\main7e.asm
     DeltaRoomTemperature   0x000020       data     static T:\dropbox1\pic\main7e.asm
          DialTemperature   0x000023       data     static T:\dropbox1\pic\main7e.asm
          DownTemperature   0x000024       data     static T:\dropbox1\pic\main7e.asm
             FanDutyCycle   0x00002b       data     static T:\dropbox1\pic\main7e.asm
            FanStatusBits   0x00002d       data     static T:\dropbox1\pic\main7e.asm
          FanTachMidRange   0x000022       data     static T:\dropbox1\pic\main7e.asm
                LoopCount   0x000027       data     static T:\dropbox1\pic\main7e.asm
MaxLoopCountBeforeGivingFanError   0x00002c       data     static T:\dropbox1\pic\main7e.asm
               PulseCount   0x000028       data     static T:\dropbox1\pic\main7e.asm
              PulseCount1   0x000029       data     static T:\dropbox1\pic\main7e.asm
    TemperatureDifference   0x000026       data     static T:\dropbox1\pic\main7e.asm
    TemperatureHysteresis   0x000021       data     static T:\dropbox1\pic\main7e.asm
     TempertureDifference   0x00002a       data     static T:\dropbox1\pic\main7e.asm
            UpTemperature   0x000025       data     static T:\dropbox1\pic\main7e.asm
 

Thanks Xenos for doing all that, I am still not sure why it doesn't build. The program size is 0x462 bytes = 1122 bytes.

Mine will build when the program file is less than 1024 bytes. The 16F818 datasheet says that it has a program flash of 1k 14 bit words which must be enough to hold the 1024 bytes of program instructions.

But it is unclear to me why your MPLAB allows a program script size 0x462 (= 1122 bytes) to build.

Are you sure you are not building it for a 16F819 (which is the same as the 16F818 except it has a 2k program flash)?

Chris
 

Just a guess:

Are you running the code in Debug or Release mode ?
In general, debuggers take some part of the microcontroller's resources.
 

...Are you sure you are not building it for a 16F819 (which is the same as the 16F818 except it has a 2k program flash)?

Chris

of course, Check message #6 again, it's there:
Code:
Make: The target "T:\dropbox1\pic\eda7m8.cof" is out of date.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\mplink.exe" /[U][U][U][FONT=Arial Black][B]p16F818[/B][/FONT][/U][/U][/U] "main7e.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__[B]MPLAB_DEBUG=1[/B] /m"eda7m8.map" /w /o"eda7m8.cof"
Debug information is on.
Why don't you post the entire project in a .7z file?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top