X9521 XICOR [Xicor Inc.], X9521 Datasheet - Page 23

no-image

X9521

Manufacturer Part Number
X9521
Description
Dual DCP, EEPROM Memory
Manufacturer
XICOR [Xicor Inc.]
Datasheet
X9521 – Preliminary Information
APPENDIX 2
DCP1 (100 Tap) tap position to Data Byte translation algorithm example. (Example 1)
REV 1.1.9 1/30/03
unsigned DCP1_TAP_Position(int tap_pos)
{
}
int block;
int i;
int offset;
int wcr_val;
offset= 0;
block = tap_pos / 25;
if (block < 0) return ((unsigned)0);
else if (block <= 3)
{
}
return((unsigned)01100000);
switch(block)
{
}
case (0): return ((unsigned)tap_pos) ;
case (1):
{
}
case (2):
{
}
case (3):
{
}
wcr_val = 56;
offset = tap_pos - 25;
for (i=0; i<= offset; i++) wcr_val-- ;
return ((unsigned)++wcr_val);
wcr_val = 64;
offset = tap_pos - 50;
for (i=0; i<= offset; i++) wcr_val++ ;
return ((unsigned)--wcr_val);
wcr_val = 120;
offset = tap_pos - 75;
for (i=0; i<= offset; i++) wcr_val-- ;
return ((unsigned)++wcr_val);
www.xicor.com
Characteristics subject to change without notice.
23 of 26

Related parts for X9521