|
| |
Set “Low” sample code (Assembly): |
| |
mov | dx,GPIO_Port + 38h | ;GPIO_Port is 480h |
in | al,dx |
|
newiodelay |
| |
and | al,not 11000000b | ;GPIO 38, 39 pull low to disable |
out | dx,al |
|
Set “Low” sample code (C Language):
//Set Low
dataIn = inportb(0x480+0x38); dataIn &= 0x3f; outportb(dataIn, 0x480+0x38);
Watch Dog Function:
Support 1~255 second or minute selectable timeout interval.
Watch Code:
1)Enter configuration mode: MOVDX,4EH
MOV AL,87H
OUT DX,AL OUT DX,AL
2)Logical Device 8
MOV DX,4EH |
| |
MOV | AL,07H |
|
OUT | DX,AL | ;point to Logical Device Number Reg. |
MOV DX,2FH |
| |
MOV | AL,08H | ;select Logical Device 8 |
OUT | DX,AL |
|
3) Enable WDTO# and set to KBRST# | ||
MOV | DX,2EH | ;CR 30h: bit0 fill in 1 |
MOV | AL,30H |
|
OUT | DX,AL |
|
MOV DX,2FH |
| |
MOV AL,01H |
| |
OUT DX,AL |
| |
MOV | DX,2EH | ; CR F7h: bit4 fill in 0(clear event) |
MOV | AL,F7H |
|
OUT | DX,AL |
|
MOV DX,2FH