Hesam Kamalan
New Member
Hi,
I have a problem with PORTE of PIC16F877A. In MPLAB i write following code:
ORG 0X00
BANK1
MOVLW 0X00
MOVWF TRISE
BANK0
MAIN:
MOVLW 0X07
MOVWF PORTE
MOVLW 0X00
MOVWF PORTE
GOTO MAIN
END
After simulation, PORTE register have not affect and it is 0 for all times. But if I change E (PORTE) with B (PORTB), simulation becomes correct. For macro of banks, I write this code:
BANK0 MACRO
BCF STATUS, RP0 ; Select memory bank 0
ENDM
BANK1 MACRO
BSF STATUS, RP0 ; Select memory bank 1
ENDM
If you find my problem, tell me please.
I have a problem with PORTE of PIC16F877A. In MPLAB i write following code:
ORG 0X00
BANK1
MOVLW 0X00
MOVWF TRISE
BANK0
MAIN:
MOVLW 0X07
MOVWF PORTE
MOVLW 0X00
MOVWF PORTE
GOTO MAIN
END
After simulation, PORTE register have not affect and it is 0 for all times. But if I change E (PORTE) with B (PORTB), simulation becomes correct. For macro of banks, I write this code:
BANK0 MACRO
BCF STATUS, RP0 ; Select memory bank 0
ENDM
BANK1 MACRO
BSF STATUS, RP0 ; Select memory bank 1
ENDM
If you find my problem, tell me please.