ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

Listing 12-Data read under GetReal less than or equal to 0x7E bytes out of the CS8900A-CQ buffer is retained. All of the rest is trashed.

;******************************************************************
;*	Receive a Frame
;*
;*
;******************************************************************
RECEIVE_DATA
banksel TRISC
movlw 0FF 
movwf TRISC 
banksel	PORTC
bcf	bitbucket
RpppH	pageport_RxTxData0 
RpppL	pageport_RxTxData0 
movlw	packetstart+2 
movwf	FSR 
RpppH	pageport_RxTxData0 
movwf	packetstart+enetpacketLenH 
movwf	len_H 
movwf	data_H 
RpppL	pageport_RxTxData0 
movwf	packetstart+enetpacketLenL 
movwf	len_L 
movwf	data_L 
GetFrameData
btfss	bitbucket
goto	GetReal
RpppL	pageport_RxTxData0 
movwf	scratch_L 
RpppH	pageport_RxTxData0 
movwf	scratch_H 
goto	DecDataCnt_0 
GetReal
RpppL	pageport_RxTxData0 
movwf	INDF 
incf	FSR,F 
RpppH	pageport_RxTxData0 
movwf	INDF 
incf	FSR,F 
movlw	80
xorwf	FSR,W
bnz	DecDataCnt_0
bsf	bitbucket
goto	GetFrameData
DecDataCnt_0 
decfsz	len_L,F
goto	DecDataCnt_1 
tstf	len_H
bz	FrameIn
DecDataCnt_1
movlw	0FF
xorwf	len_L,W
bnz	DecDataCnt_2
decf	len_H,F
DecDataCnt_2
decfsz	len_L,F
goto	DecDataCnt_3
tstf	len_H
bz	FrameIn
DecDataCnt_3
movlw	0FF
xorwf	len_L,W
bnz	GetFrameData
decf	len_H,F
goto	GetFrameData
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ