Dragnovith
Junior Member level 1
Hi, this standard procedure is usually done to work with PIC16F877A in Mplab.
MPLAB
And in the PROTEUS:
I would like to apply the procedure below (performed in proteus) in mplab.
What was done in mplab
It doesn't seem to me to be the same thing, what would be the correct way to do this?
MPLAB
Code:
org 0x00 ; reset vector
goto Start ; after reset start
org 0x04 ; interruption vector
goto Start ; after interruption start
And in the PROTEUS:
Code:
RST code 0x0
GOTO Start ; After reset, start in main function
ORG 4
PGM code
Start
I would like to apply the procedure below (performed in proteus) in mplab.
Code:
RST code 0x0
GOTO Start ; After reset, start in main function
ORG 4
BTFSC INTCON,1 ; Check interruption by INT
GOTO InterrupcionINT ; If it is enabled. Interruption by INT
; It is not activated. Check another interrupt
BTFSS V_ESTADO_LAVACAR,7 ; Check if the washing machine's status is on
GOTO DescartarInterrupcao ; It is not activated. Other interruptions not performed
; If it is enabled. Compare other interruptions
BTFSC INTCON,0 ; Check Interruption by BI
GOTO InterrupcionRBI ; If it is enabled. Interruption by RBI
GOTO InterrupcionTMR0 ; It is not activated. Interruption by TMR0
DescartarInterrupcao
BTFSS PORTB,4 ; We eliminated the mismatch condition to be able to erase the RBI pin
nop
BCF INTCON, RBIF ; Erases the interruption by RBI
BCF INTCON, T0IF ; Erases the interruption by TMR0
RETFIE
PGM code
Start
What was done in mplab
Code:
org 0x00 ;vetor de reset
GOTO Start ; After reset, start in main function
org 0x04
BTFSC INTCON,1 ; Check interruption by INT
GOTO InterrupcionINT ; If it is enabled. Interruption by INT
; It is not activated. Check another interrupt
BTFSS V_ESTADO_LAVACAR,7 ; Check if the washing machine's status is on
GOTO DescartarInterrupcao ; It is not activated. Other interruptions not performed
; If it is enabled. Compare other interruptions
BTFSC INTCON,0 ; Check Interruption by BI
GOTO InterrupcionRBI ; If it is enabled. Interruption by RBI
GOTO InterrupcionTMR0 ; It is not activated. Interruption by TMR0
DescartarInterrupcao
BTFSS PORTB,4 ; We eliminated the mismatch condition to be able to erase the RBI pin
nop
BCF INTCON, RBIF ; Erases the interruption by RBI
BCF INTCON, T0IF ; Erases the interruption by TMR0
RETFIE
GOTO Start
Start
It doesn't seem to me to be the same thing, what would be the correct way to do this?