поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

CS4210 датащи(PDF) 32 Page - National Semiconductor (TI)

[Old version datasheet] Texas Instruments acquired National semiconductor.
номер детали CS4210
подробное описание детали  IEEE 1394 OHCI Controller
PDF  102 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  NSC [National Semiconductor (TI)]
домашняя страница  http://www.national.com
Logo NSC - National Semiconductor (TI)

CS4210 датащи(HTML) 32 Page - National Semiconductor (TI)

Back Button CS4210 Datasheet HTML 28Page - National Semiconductor (TI) CS4210 Datasheet HTML 29Page - National Semiconductor (TI) CS4210 Datasheet HTML 30Page - National Semiconductor (TI) CS4210 Datasheet HTML 31Page - National Semiconductor (TI) CS4210 Datasheet HTML 32Page - National Semiconductor (TI) CS4210 Datasheet HTML 33Page - National Semiconductor (TI) CS4210 Datasheet HTML 34Page - National Semiconductor (TI) CS4210 Datasheet HTML 35Page - National Semiconductor (TI) CS4210 Datasheet HTML 36Page - National Semiconductor (TI) Next Button
Zoom Inzoom in Zoom Outzoom out
 32 / 102 page
background image
www.national.com
32
Revision 1.0
Operational Description (Continued)
Figure 3-1. CRC1 and CRC2 Sample Code
ff ff ff ff ff ff ff ff -> CRC1 = feh, CRC2 = 70h
01 23 45 67 89 ab cd ef -> CRC1 = 19h, CRC2 = 07h
00 00 00 00 00 00 00 00 -> CRC1 = bfh, CRC2 = f4h
#include <stdio.h>
typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned long long_t;
ushort_t calc_crc(ushort_t r, uchar_t d);
ushort_t rev16(ushort_t src);
/* main routine */
int main(int argc, char *argv[])
{
ushort_t residual = 0xffff;
int din;
uchar_t byte;
uchar_t crc1, crc2;
while(scanf("%2x", &din ) != EOF ) {
byte = din;
printf("%2.2x ", byte);
residual = calc_crc(residual, byte);
};
printf("\n");
residual = rev16(residual);
crc1 = ~(residual & 0x00ff);
crc2 =
~(residual>>8);
printf("CRC1 = %2.2hxh\n", crc1);
printf("CRC2 = %2.2hxh\n", crc2);
return(0);
/* calc_crc - apply a byte of data to the 16-bit CRC */
}
ushort_t calc_crc(ushort_t r, uchar_t d)
{
ushort_t bit_in;
int i;
for(i=0;i<8;i++) {
bit_in = (d>>i) & 0x0001;
if((r>>15) ^ bit_in)
r = (((r<<1) & 0x7ffb) | ((r>>15 ^ ((r>>14)&0x0001) ^ bit_in) << 15) |
((r>>15 ^ ((r>>1)&0x0001) ^ bit_in) << 2) | 0x0001 );
else
r<<= 1;
}
return(r);
}
ushort_t rev16(ushort_t src)
{
return(
((src&0x0001)<<15) |
((src&0x0002)<<13) |
((src&0x0004)<<11) |
((src&0x0008)<<9) |
((src&0x0010)<<7) |
((src&0x0020)<<5) |
((src&0x0040)<<3) |
((src&0x0080)<<1) |
((src&0x0100)>>1) |
((src&0x0200)>>3) |
((src&0x0400)>>5) |
((src&0x0800)>>7) |
((src&0x1000)>>9) |
((src&0x2000)>>11) |
((src&0x4000)>>13) |
((src&0x8000)>>15);
}



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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