Hallo Anubisbot!
Das Problem habe ich auch gehabt und mit einem Schieberegister 74xx166 gelöst. Im Code ist ein Schaltplan und dazugehöriges Unterprogramm (DataRec) für PIC´s. Die 8 Bits werden zuerst mit Load parallel in den Schieberegister geladen, mit dem Clock vom PIC seriell in DTmp7 eingelesen und danach in A6 kopiert. Es werden 3 I/O Pins vom PIC benötigt: _PLE (Load), _CKI (Clock) und _DTI (Data).
MfG
Code:D D D D D D D D 7 6 5 4 3 2 1 0 V V V V V V V V | | | | | | | | | | | | | | | | | | | | | | | | .-----------------. | 1 1 1 1 5 4 3 2 | | 4 2 1 0 15|-------> _PLE zum PIC | 7|-------> _CKI | 74xx166 6 13|-------> _DTI '-----------------' | === GND DataRec call DatLoad call DatRec movf DTmp7,0 movwf A6 return DatLoad bcf _CKI bcf _PLE bsf _CKI bcf _CKI bsf _PLE return DatRec movlw 7 movwf DTmp1 SRec call CopyDTI rlf DTmp7,1 bsf _CKI bcf _CKI decfsz DTmp1,1 goto SRec call CopyDTI return CopyDTI bcf DTmp7,0 btfsc _DTI bsf DTmp7,0 return







 
			
			 
					
					
					
						 Zitieren
Zitieren

Lesezeichen