jazzyflymc
New Member
I first started a project using PIc 16F77 and it was going ok, but than I had to change to 18F448 and I keep getting this weird error:
"Error - section '.org_1' can not fit the absolute section. Section '.org_1' start=0x00000008, length=0x00000024"
It has something to do with clearing variables ADRESH and ADRESL, because if I erase the ADRESL command line and end the program, the error is gone:
.
.
.
MEMH equ 0x20
MEML equ 0x21
Temp equ 0x22
org 0x00
goto start
org 0x08
init
clrf PORTA
clrf PORTB
clrf PORTE
clrf PORTC
movlw b'00111111'
movwf TRISA ;PORTA=input
movlw b'00000000'
movwf TRISB ;PORTB=output
movlw b'00000000'
movwf TRISC ;PORTC=output
movlw b'00000111'
movwf TRISE ;PORTE=input
movlw b'00000000'
movwf ADCON1
clrf ADRESH
;clrf ADRESL
start
call init
end
N.B> I've read all the memory banks facts in the data sheet and even in the erata (with the bank 15 and access mamory), but it still doesn't make sense to me why this happens..
Any suggestions ?
Thanks !
"Error - section '.org_1' can not fit the absolute section. Section '.org_1' start=0x00000008, length=0x00000024"
It has something to do with clearing variables ADRESH and ADRESL, because if I erase the ADRESL command line and end the program, the error is gone:
.
.
.
MEMH equ 0x20
MEML equ 0x21
Temp equ 0x22
org 0x00
goto start
org 0x08
init
clrf PORTA
clrf PORTB
clrf PORTE
clrf PORTC
movlw b'00111111'
movwf TRISA ;PORTA=input
movlw b'00000000'
movwf TRISB ;PORTB=output
movlw b'00000000'
movwf TRISC ;PORTC=output
movlw b'00000111'
movwf TRISE ;PORTE=input
movlw b'00000000'
movwf ADCON1
clrf ADRESH
;clrf ADRESL
start
call init
end
N.B> I've read all the memory banks facts in the data sheet and even in the erata (with the bank 15 and access mamory), but it still doesn't make sense to me why this happens..
Any suggestions ?
Thanks !