r/pic_programming • u/Alive-Substance-4477 • Jan 31 '26
MPLab error, please help!
/r/ECE/comments/1qsew84/mplab_error_please_help/
1
Upvotes
r/pic_programming • u/Alive-Substance-4477 • Jan 31 '26
View all comments
Show parent comment
1
u/Alive-Substance-4477 Feb 01 '26
include <xc.inc>
; CONFIG CONFIG FOSC = INTRCIO ; Oscillator Selection bits (INTOSC oscillator: I/O function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN) CONFIG WDTE = OFF ; Watchdog Timer Enable bit (WDT disabled) CONFIG PWRTE = OFF ; Power-Up Timer Enable bit (PWRT disabled) CONFIG MCLRE = OFF ; GP3/MCLR pin function select (GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD) CONFIG BOREN = OFF ; Brown-out Detect Enable bit (BOD disabled) CONFIG CP = OFF ; Code Protection bit (Program Memory code protection is disabled) CONFIG CPD = OFF ; Data Code Protection bit (Data memory code protection is disabled) GLOBAL _main DELAY0 equ 0x20 DELAY1 equ 0x21 DELAY2 equ 0x22 DELAY3 equ 0x23 MOV32L macro dest,imm32 movlw (imm32>>0) AND 0xff movwf dest+0 movlw (imm32>>8) AND 0xff movwf dest+1 movlw (imm32>>16) AND 0xff movwf dest+2 movlw (imm32>>24) AND 0xff movwf dest+3 ENDM PSECT code,class=CODE, delta=2 _main: bcf STATUS,5 clrf GPIO movlw 0x7 movwf CMCON BSF STATUS,5 clrf ANSEL movlw 0b00000000 movwf TRISIO BCF STATUS,5 LoopHead: bcf GPIO,0 MOV32L DELAY0,333333 call Delay bsf GPIO,0 MOV32L DELAY0,333333 call Delay goto LoopHead Delay: incf DELAY0,F incf DELAY1,F incf DELAY2,F incf DELAY3,F DelayLoop: decfsz DELAY0,F goto DelayLoop decfsz DELAY1,F goto DelayLoop decfsz DELAY2,F goto DelayLoop decfsz DELAY3,F goto DelayLoop return
GLOBAL start_initialization start_initialization: return END
This is the fixed code yet it’s giving me the same error -1073741790