
Appendix
EC41812CLDNA
25
tmp_reg = inportb(DATA_PORT);
pm_base = tmp_reg;
outportb(INDEX_PORT, 0x61);
tmp_reg = inportb(DATA_PORT);
pm_base = pmbase<<8+tmp_reg; /*Get the variable pm_base for
subsequent program using*/
(2)
Setup WDT operating mode, reset mode or interrupt mode:
a.
Reset Operating Mode
outportb(0x47, 0x0C);
b.
Interrupt Operating Mode
unsigned int irq;
irq = IRQ_NO; /*Please use the interrupt number need to be used to
replace the constant IRQ_NO and evaluate the variable irq. The former parts of the
document has listed the available range of the interrupt number*/
irq = irq<<4;
outportb(0x47, 0x80);
outportb(0x67, irq);
(3) WDT
Timer selection: minute or second:
a.
Select to time by minute:
outportb(0x65, 0x00);
b.
Select to time by second:
outportb(0x65, 0x80);