Appendix B Programming The Watchdog Timer - Advantech Celeron M Universal Network Controller with PC/104 Extension UNO-2170 User Manual

Celeron m universal network controller with pc/104 extension
Hide thumbs Also See for Celeron M Universal Network Controller with PC/104 Extension UNO-2170:
Table of Contents

Advertisement

Appendix B Programming the Watchdog Timer

Bellow is a sample of programming code for controlling the Watchdog
Timer function.
-----------------------------------------------------------------------------------
Enter the extended function mode, interruptible double-write |
-----------------------------------------------------------------------------------
MOV DX,2EH
MOV AL,87H
OUT DX,AL
OUT DX,AL
-----------------------------------------------------------------------------
Configured logical device 8, configuration register CRF6 |
-----------------------------------------------------------------------------
MOV DX,2EH
MOV AL,2BH
OUT DX,AL
MOV DX,2FH
IN AL,DX
AND AL.OEFH;Setbit 4=0 Pin 89=WDTO
OUT DX,AL
MOV DX,2EH
MOV AL,07H; point to Logical Device Number Reg.
OUT DX,AL
MOV DX,2FH
MOV AL,08H; select logical device 8
OUT DX,AL;
MOV DX,2EH
MOV AL,30H;Set watch dog activate or inactivate
OUT DX,AL
MOV DX,2FH
MOV AL,01H; 01:activate 00:inactivate
OUT DX,AL;
MOV DX,2EH
MOV AL,F5H; Setting counter unit is second
OUT DX,AL
MOV DX,2FH
MOV AL,00H
OUT DX,AL;
MOV DX,2EH
MOV AL,F6H
OUT DX,AL
MOV DX,2FH
MOV AL,05H; Set 5 seconds
OUT DX,AL
;------------------------------------------
; Exit extended function mode |
;------------------------------------------
MOV DX,2EH
MOV AL,AAH
OUT DX,AL
UNO-2170 User Manual
32

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Celeron M Universal Network Controller with PC/104 Extension UNO-2170 and is the answer not in the manual?

Table of Contents

Save PDF