Specifications

31
}
/**************************************************************************/
/**************************************************************************/
/* Module : InitializeTNT() */
/* Parameters : NONE */
/* Return Type : void */
/* Created On : 05/04/95 */
/* Modified On : 05/24/95 */
/* Description : This is the Initialization routine. This routine should*/
/* be called during the start up sequence. */
/* */
/* InitializeTNT places the TNT in one chip mode. */
/* */
/* Reference : ESP-488TL Software Reference Manual for TNT4882 */
/**************************************************************************/
/**************************************************************************/
void InitializeTNT()
{
CMDR = SftRst; /*perform soft reset */
SPMR = E_S8; /*place the TNT in turbo mode */
AUXMR = AUXRA;
AUXMR = (E_BIN|E_XEOS|E_HLDA);
KEYREG = 0;
HSSEL = E_ONEC; /*place TNT in one chip mode */
AUXMR = RstChip; /*issue a chip reset */
AUXMR = HLDI; /*holdoff immediately command */
AUXMR = PON; /*issue power on */
}
/**************************************************************************/
/**************************************************************************/
/* Module : Test8BitRegister() */
/* Parameters : unsigned char* */
/* Return Type : char */
/* Created On : 05/04/95 */
/* Modified On : 05/04/95 */
/* Description : This routine tests the 8 bit registers. It writes all */
/* possible values (0-255). By doing so it tests the */
/* functionality of the TNT data bus. */
/**************************************************************************/
/**************************************************************************/
char Test8BitRegister(unsigned char *Register)
{
unsigned char StoredValue,Loop,NumOfBytes,result;
result = FALSE;
for (Loop=0;Loop<255;Loop+=15) /*writing all possible values... */
{ /*...15 at a time */
for (NumOfBytes=0;NumOfBytes<=15;++NumOfBytes)
*Register = Loop + NumOfBytes;
for (NumOfBytes=0;NumOfBytes<=15;++NumOfBytes)
{
StoredValue = *Register; /*read values from the 8 bit regs.*/
if (StoredValue != (Loop+NumOfBytes))
{ /*if values differ, generate error*/
DisplayErrorMessage(StoredValue,(Loop+NumOfBytes));
if (!(AskUser())) return ERROR; /*ask user to continue testing? */
result = ERROR;
}
}










