
VMX51C1020
_________________________________________________________________________________________________
www.ramtron.com
page 77 of 80
WDT Initialization and Use Example
Program
ORG 0000H
;RESET & WD IRQ VECTOR
LJMP
START
;*************************************
;* MAIN PROGRAM BEGINNING *
;*************************************
ORG 0100h
;*** Initialize WDT and other peripherals***
MOV
DIGPWREN,#40H
;ENABLE WDT OPERATION
;*** INITIALIZE WATCHDOG TIMER RELOAD VALUE
MOV
WDTREL,#04FH
;The WDTREL register is used to
;define the Delay Time WDT.
;Bit
;prescalng value
;Bit 6:0 of WDTREL defines the
;upper 7 bits reload value of the
;watchdog Timer 15-bit timer
;*** PERFORM A WDT REFRESH/START SEQUENCE
SETB
IEN0.6
;Set the WDTR bit first
SETB
IEN1.6
;Then without delay (instruction)
;set the WDTS bit right after.
;No Delays are permitted between
;setting of the WDTR bit and
;setting of the WDTS bit.
;This is a security feature to
;prevent inadvertent reset/start of
;the WDT
;IF other interrupt are enabled,
;It is recommended to disable
;interrupts before refreshing the
;WDT and reactivate them after
;*** Wait WDT Interrupt
WAITWDT:
NOP
;*** If the two following code lines below are put "in-comment", the ;***WDT will
trigger a reset, and the program will restart.
;*** PERFORM A WATCHDOG TIMER REFRESH/START SEQUENCE
;SETB
IEN0.6
;Set the WDTR bit first
;SETB
IEN1.6
;Then without delay (instruction)
LJMP
WAITWDT
;set the WDTS bit right after.
;No Delays are permitted between
;setting of the WDTR bit and
;setting of WDTS bit.
;This is a security feature to
;prevent inadvertent reset/start of
;the WDT
;It is recommended to disable
;interrupts before refreshing the ;WDT
and reactivate them after
7
of
WDTREL
define
clock
VMX51C1020 Programming
When the PM pin is set to 1, the I2C interface
becomes the programming interface for the
VMX51C1020’s Flash memory.
An In-circuit programming interface is easy to
implement at the board level. See VMIX APP-
Note001.
Erasing and programming the VMX51C1020’s
Flash
memory
requires
programming voltage of 12V. This programming
voltage
is
supplied/controlled
programming hardware/tools.
The VMX51C1020 can be programmed using
the Ramtron In-Circuit Programmer.
an
external
by
the
F
IGURE
48:
VMX51C1020
P
ROGRAMMING
VERSA-ICP
Target PC Board
R
5V (optional)
SCL
SDA
VPP 12V
PM
RES - (RESET)
GND