Motorola Pro FLX Manuel d'utilisateur Page 60

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 74
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 59
Design and Implementation of a Practical FLEX Paging Decoder
Grayson Wireless 52
//bit location 0 - 20 is data 21 is check bit
working ^= polynominal;
}
working &= 0x3FF; //save only last 10 bits
data &= 0x1FFFFFl; //save only last 21 bits
}
// printf("data is %lX and parity is %lX\n",savedata,working);
savedata = ((savedata << 11) & 0xFFFFF800l) | ((working << 1) & 0x7FE);
//parity is in LSB of save data and it is 0
for (i=1; i<32; i++) {
if ((savedata >> i) & 1) { // if bit at ith posistion is set
savedata ^= 1; //complement the lsb
}
}
return savedata;
}
/*****************************************************************************/
/* function invert
/*
/* Purpose: Given a 32 unsigned long int. Invert data bits bit 31 to bit 0,
/* bit 30 to bit 1, etc.
/*****************************************************************************/
unsigned long invert(unsigned long data)
{
unsigned long invertedData=0;
for (int i=0;i<32;i++) {
invertedData |= ((data >> (31 - i)) & 1) << i;
}
return invertedData;
}
/*****************************************************************************/
/* function sendHpib
/*
/* Purpose: Send string to hp6448a (if defined) and write to file (if defined).
/*****************************************************************************/
void sendHpib(char *hpibStr)
{
#ifdef WRITEHPIBFILE
FILE *hpib;
#endif
#ifdef SENDTOHPIB
hp8648a.Send(hpibStr);
#endif
#ifdef WRITEHPIBFILE
if ( (hpib=fopen("flexhpib.dat","a+t")) == NULL) {
printf("Error output file not created.\n");
exit(-1);
}
fprintf(hpib,"%s\n",hpibStr);
fclose(hpib);
#endif
}
/*****************************************************************************/
/* function initializeHP8648A
/*
/* Purpose: initialize the HP8648A with the following
/* FREQUENCY: 930.0000 MHZ
/* FM DEVIATION: 4.80 KHz
/* AUTOMATC ATTENUATOR: ON
/* AMPLITUDE: -80 dBM
/* RF: ON
/* DIGITAL MODULATION: ON
/* FORMAT: FLEX
/* POLARITY: NORMAL
/* FILTER: ON
/* MESSAGE NUMBER: 0
/* START FRAME: 0
/* STOP FRAME: 127
/* MODE: CONT
/* IMMEDIATE STOP: ON
/*
/*****************************************************************************/
void initializeHP8648A(void)
{
Vue de la page 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 73 74

Commentaires sur ces manuels

Pas de commentaire