DMP Electronics eBOX-3350MX-AP Manual do Utilizador Página 106

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 112
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 105
Jan Yin Chan Electronics Co.,LTD. 386SX Single Chip PC
M6117D : System on a chip
DM&P
Jan Yin Chan Electronics Co,. LTD. M6117D 386SX Single Chip PC Page 105
8F-1,No.22,Wuchyuan 2RD.,Hsin Chuang city Taipei Hsien, Taiwan, R.O.C. Tel: 886-(02) 2298-0770 Fax: (02) 2299-1883
Example A: Set timeout 16 sec to generate a system reset. Reset watchdog timer
; Please use TASM to compiler the following program. Resets the watchdog timer periodically to prevent timeout.
; Execute under DOS environment.
;
.286 mov ax,0c513h ;Unlock configuration
register
.model small call writechip
.code mov ax,3c3ch ; reset watchdog timer counter
Start proc c call readchip
mov ax,0c513h ; Unlock config register or al,00100000b ; The counter is reset at
out 23h,al
call writechip xchg ah,al
mov ax,3737h ; Disable watchdog timer call writechip
call readchip mov ax,0013h ; Lock configuration register
and al,10111111b call writechip
xchg ah,al
call writechip
mov ax,083bh ; Set the expected counter value (the above code uses reachip and writechip procedures)
call writechip ; to [080000h]
mov ax,003ah ; 30.5usec * 080000h = 16 sec
call writechip
mov ax,0039h
call writechip
mov ax,3838h ; Select "System reset" as timeout actiom
call readchip
and al,00001111b
or al,11010000b
xchg ah,al
call writechip
mov ax,3737h ; Enable watchdog timer
call readchip
or al,01000000b
xchg ah,al
call writechip
mov ax,0013h ; Lock config register
call writechip
mov ax,4c00h
int 21h
endp
readchip proc c
out 22h,al
nop
nop
in al,23h
nop
nop
ret
endp
writechip proc c
out 22h,al
nop
nop
xchg ah,al
out 23h,al
nop
nop
xchg ah,al
ret
endp
end
Vista de página 105

Comentários a estes Manuais

Sem comentários