Acrosser AR-N8601FL User Manual Page 22

  • Download
  • Add to my manuals
  • Print
  • Page
    / 37
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 21
Revision: 1.0
22
if ( argc != 3 )
{ Show_Title(); return 1; }
clrscr();
textcolor(YELLOW+BLINK);
Time=atoi(argv[1]);
Time_Format=argv[2][0];
if(Time_Format=='m' || Time_Format=='M')
Format=0x05; // Minutes
if(Time_Format=='s' || Time_Format=='S')
Format=0x01; // Seconds
// Set Watchdog
outportb(IO_Port_Address,0x87); // (EFER) Extended Functions Enable Register
outportb(IO_Port_Address,0x87);
outportb(IO_Port_Address,0x29); // Point to Global Reg.
outportb(IO_Port_Address+1,0x20); // Select Multi-Function pin, (Bit[5,6]=01 Watchdog Function)
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,0xF3); // Select Watchdog count mode seconds or minutes
outportb(IO_Port_Address+1,Format); // Default is second
outportb(IO_Port_Address,0xF4); // Set Watchdog Timer Value
outportb(IO_Port_Address+1,Time); // 0x00 to disable, max 0xFF
while(1)
{
outportb(IO_Port_Address,0xF4); // Read Watchdog Timer Value
Time=inportb(IO_Port_Address+1);
Page view 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 36 37

Comments to this Manuals

No comments