循环冗余校验(CRC)
CRCisoneofthemostversatileerrorchecking
algorithmusedinvariousdigitalcommunication
systems.CRCstandsforCyclicRedundancyCode
CheckorsimplyCyclicRedundancyCheck.
Mostofthepopularcommunicationprotocols,like
CAN,USB,IrDA
Æ
,SDLC,HDLCandEthernet,employ
CRCforerrordetection.
Normally,fortheerrordetectionindigital
communicationsystems,achecksumiscomputedon
themessagethatneedstobetransmitted.Thecom-
putedchecksumisthenappendedattheendofthe
messagestreamandistransmitted.Atthereceiving
end,themessagestreamíschecksumiscomputedand
comparedwiththetransmittedchecksum.Ifbothare
equal,thenthemessagereceivedistreatedaserror
free.
CRCworksinasimilarway,butithasgreater
capabilitiesforerrordetectionthantheconventional
forms.DifferentCRCpolynomialsareemployedfor
errordetection.ThesizeofCRCdependsuponthe
polynomialchosen.
ThisapplicationnotedescribestheCRCoperationand
itsimplementationusingadedicatedhardwaremodule.AN1148CyclicRedundancyCheck(CRC)Author:SudhirBommenaConsideramessageof‘M’of‘k’bitsandgeneratorMicrochipTechnologyInc.polynomial‘G’of‘n+1’bits.Dividingthemessagebythegeneratorwillyieldaremainder‘R’of‘n’bits.There-fore,M=GQ+R;whereQisthequotientobtainedINTRODUCTIONwhenMisdividedbyG.CRCisoneofthemostversatileerrorchecking