User`s manual
- 60 -
Appendix
C language Code
/*----- Include Header Area -----*/
#include "math.h"
#include "stdio.h"
#include "dos.h"
/*----- routing, sub-routing -----*/
void main()
{
outportb(0x2e, 0x87); /* initial IO port twice */
outportb(0x2e, 0x87);
outportb(0x2e, 0x2B); /* select CR2B */
outportb(0x2e+1, 0x00); /* update CR2B bit4 to 00h */
/* Set PIN89 as WDTO */
outportb(0x2e, 0x07); /* point to logical device selector */
outportb(0x2e+1, 0x08); /* select logical device 8 */
outportb(0x2e, 0x30); /* select CR30 */
outportb(0x2e+1, 0x01); /* update CR30 to 01h */
outportb(0x2e, 0xf0); /* select CRF0 */
outportb(0x2e+1, 0x00); /* update CRF0 to 00h */
outportb(0x2e, 0xf5); /* select CRF5 to set timer unit */
outportb(0x2e+1, 0x00); /* update CRF5 bit2, 0:sec; 1:Min. */
outportb(0x2e, 0xF6); /* select CRF6 */
outportb(0x2e+1, 0x05); /* update CRF6 to 05h (5 sec) */
outportb(0x2e, 0xAA); /* stop program W83627HF, Exit */
}