| Electronic Components Datasheet Search |
|
TNETX3150A Datasheet(PDF) 52 Page - Texas Instruments |
|
|
|||||||||||||||||||||||||||||
TNETX3150A Datasheet(HTML) 52 Page - Texas Instruments |
|
52 / 78 page ![]() TNETX15AE ADDRESS-LOOKUP DEVICE SPWS041A – AUGUST 1997 – REVISED OCTOBER 1997 52 POST OFFICE BOX 655303 • DALLAS, TEXAS 75265 PRINCIPLES OF OPERATION EEPROM initialization/automatic loading (LOAD) (continued) The last four bytes read by the automatic loader correspond to a 32-bit CRC value for the information stored in the EEPROM. The CRC value is calculated by using the following callable C routine, which assumes that the data to be examined is loaded into an array eeprom_data [ ]: void ifexeeprom (char *cs) { long crc; int k; crc = 0xffffffffl; for (k=0;k<=38;k++) { crcbyt (eeprom_data[k], &crc); } crc ^= 0xffffffffl; eeprom_data[k++]=(int) ((crc >> 24) & 0x0ffl); eeprom_data[k++]=(int) ((crc >> 16) & 0x0ffl); eeprom_data[k++]=(int) ((crc >> 8) & 0x0ffl); eeprom_data[k++]=(int) ((crc ) & 0x0ffl); } crcbyt (dat,crc) int dat; long *crc; { int i; for (i=0;i<8;i++) { crcbit(dat>>7,crc); dat = dat <<1; } } crcbit (dat,crc) int dat; long *crc; { if ( (((*crc>>31) & 11)^((long)dat & 11)) ==1) { *crc ^= 0x02608edbl; *crc = *crc <<1; *crc |= 0x00000001l; } else { *crc = *crc <<1; *crc &= 0xfffffffel; } } In this example, the values for which the CRC is calculated are placed in the eeprom_data[] array from offset 0 to 38 (0x26). The routine crcbyt is called for each byte. The C routine then places the calculated CRC values in the eeprom_data[] array at locations 39 to 42 (0x27 to 0x2A). |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |