Intel 386 Manual do Utilizador Página 476

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 691
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 475
15-15
REFRESH CONTROL UNIT
Parameters:
Counter_Value Value of the refresh interval
Returns:
Error Codes:
E_BADVECTOR User input an invalid parameter
E_OK Executed correctly
Assumptions:
None
Syntax:
#define REFRESH_INTERVAL 0x186 //Counter value for DRAM with
// 1024 rows and a refresh period
// of 16 msec (25 MHz Processor Clock)
int error_code;
error_code = InitRCU(REFRESH_INTERVAL);
Real/Protected Mode:
No changes required
*****************************************************************************/
extern int InitRCU(WORD Counter_Value)
{
/* Check that Counter_Value is 10 bits in length */
if (Counter_Value != (Counter_Value & 0x03ff) )
return(E_BADVECTOR);
/* Clear lower 10 bits of RFSCIR */
_SetEXRegWord(RFSCIR, 0xfc00);
/* Set lower 10 bits of RFSCIR to Counter_Value */
_SetEXRegWord(RFSCIR, _GetEXRegWord(RFSCIR) | Counter_Value);
/* Enable Refresh Unit */
_SetEXRegWord(RFSCON, _GetEXRegWord(RFSCON) | 0x8000);
return(E_OK);
}/* InitRCU */
/*****************************************************************************
Get_RCUCounterValue:
Description:
This function returns the current value of the refresh interval timer.
Vista de página 475
1 2 ... 471 472 473 474 475 476 477 478 479 480 481 ... 690 691

Comentários a estes Manuais

Sem comentários