Hi all, after reading a thread about using a F84 as SPI frontend, I wanted to roll such a thing my own. as I'm very new to PICs, it is not easy for me to figure out, where the problem lies in my code. Could anyone help me? The SPI frontend is just a small part of our robot project containing a 68HC812A4 with 1 Mbyte RAM and 1 Mbyte FLASH, so I'm not willing to spend days on this problem (and I did spend a week so far...). Here is the code: ;***** VARIABLE DEFINITIONS ScratchPadRam EQU 0x20 a EQU ScratchPadRam+0 byte EQU ScratchPadRam+1 ;********************************************************************** ORG 0x000 ; processor reset vector goto main ; go to beginning of program main bsf STATUS,5 ; Set I/O movlw 0 ; Set all pins to outputs (conserve power) movwf TRISA movwf TRISB bsf TRISA,2 ; Set PA1 and PA2 as inputs bsf TRISA,1 CLRF PORTB start MOVLW 8 MOVWF a looping BTFSS PORTA,2 ;Skip if Set GOTO looping BTFSC PORTA,1 ;Skip if Clear BSF byte,0 RLF byte,1 ;Rotate Left wait BTFSC PORTA,2 ;Skip if Clear GOTO wait DECFSZ a,1 ;Decr a, skip if 0 GOTO looping BSF PORTA,3 BCF PORTA,3 MOVF byte,0 MOVWF PORTB ;write received byte to PORTB CLRF byte GOTO start CU, by Seb im Web