| поискавой системы для электроныых деталей |
|
MAX17823BGCV датащи(PDF) 96 Page - Maxim Integrated Products |
|
|
|||||||||||||||||||||||||||||
MAX17823BGCV датащи(HTML) 96 Page - Maxim Integrated Products |
|
96 / 121 page ![]() ________________________________________________________________________________________________________________________________________________________________ MAX17823B 12-Channel High-Voltage Data Acquisition System www.maximintegrated.com Maxim Integrated | 96 Figure 69. PEC Calculation Psuedocode Function PEC_Calculation(ByteList(), NumberOfBytes, CRCByte) { // CRCByte is initialized to 0 for each ByteList in this implementation, where // ByteList contains all bytes of a single command. It is passed into the // function in case a partial ByteList calculation is needed. // Data is transmitted and calculated in LSb first format // Polynomial = x^8+x^6+x^3+x^2+1 POLY = &HB2 // 10110010b for LSb first //Loop once for each byte in the ByteList For ByteCounter = 0 to (NumberOfBytes – 1) ( //Bitwise XOR the current CRC value with the ByteList byte CRCByte = CRCByte XOR ByteList(Counter1) //Process each of the 8 CRCByte remainder bits For BitCounter = 1 To 8 ( // The LSb should be shifted toward the highest order polynomial // coefficient. This is a right shift for data stored LSb to the right // and POLY having high order coefficients stored to the right. // Determine if LSb = 1 prior to right shift If (CRCByte AND &H01) = 1 Then // When LSb = 1, right shift and XOR CRCByte value with 8 LSbs // of the polynomial coefficient constant. “/ 2” must be a true right // shift in the target CPU to avoid rounding problems. CRCByte = ((CRCByte / 2) XOR POLY) Else //When LSb = 0, right shift by 1 bit. “/ 2” must be a true right // shift in the target CPU to avoid rounding problems. CRCByte = (CRCByte / 2) End If //Truncate the CRC value to 8 bits if necessary CRCByte = CRCByte AND &HFF //Proceed to the next bit Next BitCounter ) //Operate on the next data byte in the ByteList Next ByteCounter ) // All calculations done; CRCByte value is the CRC byte for ByteList() and // the initial CRCByte value Return CRCByte } |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |