AR-B7041 User¡¦s Guide
2-5
2.3.3 Enable the Software Write Protect
Write 80h to the base port+0 address
Example 1: (in assembly language)
MOV DX, 220H ; If the AR-B7041’ s base I/O address is 220H
MOV AL, 80H ; Enable byte = 80h
OUT DX, AL
Example 2: (in BASICA language)
OUT &H220, &H80; REM If the AR-B7041’ s base I/O address is 220h
Example 3: (in Turbo C language)
outportb(0x220,0x80); /*If the AR-B7041’ s base I/O address is 220h*/
2.3.4 Disable the Software Write Protect
Write 0 to the base port+0 address
Example 1: (in assembly language)
MOV DX, 220H ; If the AR-B7041’ s base I/O address is 220h
MOV AL, 00H ; Disable byte=00h
OUT DX, AL
Example 2: (in BASICA language)
OUT &H220, &H00; REM If the AR-B7041’ s base I/O address is 220h
Example 3: (in Turbo C language)
outportb(0x220,0x00); /*If the AR-B7041’ s base I/O address is 220h*/
2.4 WATCHDOG TIMER
This section describes how to use the Watchdog Timer, disabled, enabled, and trigger.
The AR-B7041 is equipped with a programmable time-out period watchdog timer. User can use the program to
enable the watchdog timer. Once you have enabled the watchdog timer, the program should trigger it every time
before it times out. If your program fails to trigger or disable this timer before it times out because of system hang-
up, it will generate a reset signal to reset the system. The time-out period can be programmed to be 3 to 42
seconds.
Watchdog
Register
Time Base
Counter
and
Compartor
Enable (D7)
Time Factor (D0-D2)
Write and Trigger
Watchdog
LED
RESET
Figure 2-1 Watchdog Block Diagram