Ok guys, thanks for all your help! i have made some very important changes to the code, and i am now getting consistent garbage. however i am still getting garbage. i am sure it is something simple now! any further help would still be greatly appreciated. the new code is at the bottom. - Mauricio Jancic-3, thank you i did find this out about the clocking, right before i read the post, but it was not explained as well. what do you mean by an "OEM reader"? -Tamas Rudnai, i was rotating the W reg, it was part of a tip i someone gave me on reading these cards. i have changed it to a temp buffer.(and cleared it at the right point)i have never seen your method of serial reads simple and sweet! by the way, no such luck with the open collector outputs. -Bob Ammerman, although my data sheet is pretty clear about clock being on the falling edge(and that is about the only thing it is clear about) i might try to sample on the rising edge, if i cannot find a solution. code: Loop btfsc CARDPORT,crdin ;test to see when card is incerted goto $-1 L1 movlw carddata movwf FSR movlw 0x18 movwf bytecount call Sync Scan movlw 0x04 movwf bitcount clrf cardtemp ;if card is in, get temp register ready S1 btfsc CARDPORT,clk ;wate for clock line to go low goto $-1 bcf cardtemp,3 ;if high, make 0 btfss CARDPORT,dat ;see what state data is in bsf cardtemp,3 ;if low, make 1 rrf cardtemp,f ;rotate right one bit btfss CARDPORT,clk ;wate for clock so settle goto $-1 decfsz bitcount,f ;check if byte is 4 bits goto S1 ;if not go back to scan btfsc CARDPORT,clk ;ignore pairity goto $-1 ;ignore pairity btfss CARDPORT,clk ;ignore pairity goto $-1 ;ignore pairity Nextbyte movfw cardtemp ;get temp byte movwf INDF ;load byte into indirect reister incf FSR,f ;point indirect reister to next location decfsz bytecount,f ;see if 24 bytes ave been read goto Scan ;if not, get next byte movlw carddata ;if they are, point indirect register to first byte of card data movwf FSR movlw 0x18 ;load byte count into register movwf bytecount LCD movfw INDF ;load byte from indirect register call LCD_CharD ;send it to lcd incf FSR,f ;load next location into indirect register decfsz bytecount,f ;see if all 24 bytes have been loaded goto LCD ;if not, than send next byte Stop nop goto $-1 Sync ;wate for first 1 on data btfss CARDPORT,clk ;when clock goes high... goto $-1 btfsc CARDPORT,clk ;wate for it to go low goto $-1 btfsc CARDPORT,dat ;than read for first 1 on data goto Sync ;if not there, read next clock cycle movlw 0x04 ;if it is a 1 wate for next 4 cycles movwf bitcount S0 ;waste next 4 bits btfss CARDPORT,clk ;see if clock is high goto $-1 btfsc CARDPORT,clk ;wate to fall decfsz bitcount,f ;do it again goto S1 ;untill 4 bits plus pairity are wasted retlw 0x00 -- View this message in context: http://www.nabble.com/Simple-Magnetic-Card-reader-tp18304492p18348949.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist