OP7100
Hardware 27
main(){
...
}
...
char dummy[24];
...
#define INT1_BIT
0
; bit 0
#INT_VEC INT1_VEC power_fail_isr
#asm
power_fail_isr::
ld sp,dummy+24
; force stack pointer
; to top of dummy vector
; to prevent overwriting
; code or data
do whatever service, within allowable execution time
loop:
call hitwd
; make sure no watchdog reset
; while low voltage
ld bc,INT1
; load the read INT1 register
; to bc
in a,(c)
; read the read INT1 register
; for /PFO
bit INT1_BIT, a
; check for status of /PFO
jr nz,loop
; wait until the brownout
; clears
timeout:
; then...a tight loop to
; force a watchdog timeout,
jp timeout
; resetting the Z180
#endasm
Of course, if the
DC
input voltage continues to decrease, then the OP7100
will just power down.
Call the Dynamic C function
hitwd
during the power-failure service
routine to make sure that the watchdog timer does not time out and thereby
reset the processor. The controller can continue to run at low voltages, and
so it might not be able to detect the low-voltage condition after the
watchdog timer resets the processor.
Watchdog Timer
To increase reliability, the ADM691’s watchdog timer forces a system reset if
a program does not notify the supervisor nominally at least every second. The
assumption is that if the program fails to “hit” the watchdog, the program
must be stuck in a loop or halted. The Dynamic C function for hitting the
Summary of Contents for OP7100
Page 1: ...OP7100 Serial Graphic Display User s Manual 019 0065 070831 O ...
Page 10: ...OP7100 x About This Manual ...
Page 16: ...OP7100 16 Overview ...
Page 74: ...OP7100 74 Software ...
Page 82: ...OP7100 82 Graphics Programming ...
Page 88: ...OP7100 88 Installation ...
Page 98: ...OP7100 98 Specifications ...
Page 108: ...OP7100 108 Memory I O Map and Interrupt Vectors ...
Page 112: ...112 Serial Interface Board 2 OP7100 ...
Page 113: ...OP7100 Backup Battery 113 APPENDIX E BACKUP BATTERY ...
Page 116: ...OP7100 116 Backup Battery ...
Page 124: ...OP7100 124 Index ...
Page 126: ...XX0000 Schematics ...