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
Содержание OP7100
Страница 1: ...OP7100 Serial Graphic Display User s Manual 019 0065 070831 O ...
Страница 10: ...OP7100 x About This Manual ...
Страница 16: ...OP7100 16 Overview ...
Страница 51: ...OP7100 Software 51 CHAPTER 4 SOFTWARE Chapter 4 describes the Dynamic C functions used with the OP7100 ...
Страница 74: ...OP7100 74 Software ...
Страница 82: ...OP7100 82 Graphics Programming ...
Страница 88: ...OP7100 88 Installation ...
Страница 98: ...OP7100 98 Specifications ...
Страница 108: ...OP7100 108 Memory I O Map and Interrupt Vectors ...
Страница 112: ...112 Serial Interface Board 2 OP7100 ...
Страница 113: ...OP7100 Backup Battery 113 APPENDIX E BACKUP BATTERY ...
Страница 116: ...OP7100 116 Backup Battery ...
Страница 124: ...OP7100 124 Index ...
Страница 126: ...XX0000 Schematics ...