Hi guys
I am sending data from 16C773 to 18f4580 using PSP.
I am posting part of code using PSP ,can you tell me what is wrong here.
I am sending data from 16C773 to 18f4580 using PSP.
I am posting part of code using PSP ,can you tell me what is wrong here.
Code:
org 0x0000
;************ initial *******************
goto start
;******************************
org 0x0018
goto int_serv
start
banksel ADCON1
movlw 0x0F
movwf ADCON1
movlw 0xff ; All Port D pins are inputs
movwf TRISD ;
CLRF PORTD
movlw 0x17
movwf TRISE
movlw 0x00 ; All Port C pins are outputs
movwf TRISC ;
CLRF PORTC
banksel INTCON
clrf INTCON
movlw 0x80
movwf PIE1 ;enable Parallel Slave Port
.....
....
.....Do some stuff here.
int_serv
banksel PIR1
btfss PIR1,PSPIF
goto nothing
bcf PIR1,PSPIF
banksel TRISE
btfss TRISE,IBF
goto nothing
movf PORTD,W
movwf PORTC
nothing
retfie
end