beautypg.com

Acrosser AR-ES6050FLD User Manual

Page 37

background image

Revision: 1.0

37

outportb(IO_Port_Address,0x2D);

// Point to Global Reg.

//

Select

Multi-Function pin, (Bit0=0 Watchdog Function)

outportb(IO_Port_Address+1,(inportb(IO_Port_Address+1)&0xFE));

outportb(IO_Port_Address,0x07);

// Point to Logical Device Number Reg.

outportb(IO_Port_Address+1,0x08); // Select logical device 8, (Watchdog Function)

outportb(IO_Port_Address,0x30);

// Device Active register

outportb(IO_Port_Address+1,0x01);

outportb(IO_Port_Address,0xF5);

// Select Watchdog count mode seconds or

minutes
outportb(IO_Port_Address+1,0x02); // Default is second and KBRST mode.

outportb(IO_Port_Address,0xF6);

// Set Watchdog Timer Value

outportb(IO_Port_Address+1,Time); // 0x00 to disable, max 0xFF

textcolor(YELLOW);
for(Temp=Time;Temp>0;Temp--)
{
outportb(IO_Port_Address,0xF6); // Read Watchdog Timer Value
Time=inportb(IO_Port_Address+1);

gotoxy(20,10);
cprintf(">>> After %3d Second will reset the system. <<<",Time);

delay(1000);
}

textcolor(LIGHTRED);
gotoxy(18,10);
cprintf("If you can see this message, Reset system is Fail");

return 1;
}

//====================================================================
=======
// Function : Show_Help()

//

Input

:

-

//

Change :

-

// Return : -

// Description : Show Help string.

//====================================================================
=======
void Show_Help()
{
clrscr();
printf("WatchDog Test for W83627EHF\n\n");
printf("Sample: \n");
printf(" WDT.EXE 10 \n");