Dear !!!MONKEY!!!
Here is my port initialization:
INI_PORT
BANKSEL TRISA ;BANK1 VÁLTÁS
MOVLW B'00000110' ;DIGITÁLIS
MOVWF ADCON1
MOVLW B'00011110' ;PORTA IRÁNYÁNAK BEÁLLÍTÁSA
MOVWF TRISA
MOVLW B'11111111' ;PORTB MIND BEMENET
MOVWF TRISB
MOVLW B'10000000' ;PORTC IRÁNYÁNAK BEÁLLÍTÁSA
MOVWF TRISC
MOVLW B'00111111' ;PORTD IRÁNYÁNAK BEÁLLÍTÁSA
MOVWF TRISD
CLRF TRISE
BANKSEL PORTA ;BANK0 VÁLTÁS
CLRF PORTA ;PORTA TÖRLÉSE
CLRF PORTB ;PORTB TÖRLÉSE
CLRF PORTC ;PORTC TÖRLÉSE
CLRF PORTD ;PORTD TÖRLÉSE
CLRF PORTE ;PORTE MOTOROK ÁRAMÁNAK
I mean this is good.
The MOVF PORTB,0 is not moving one bit of portc
From the Datasheet of the PIC16F87X instructions descriptions:
MOVF f,d
d ={0,1}
The contents of register f are moved to a destination dependant upon the status of d. If d=0, destination is W register. If d=1, the destination is file register f itself. d=1 is useful to test a fileregister, since status flag Z is affected.