Biomedical Engineering Reference
In-Depth Information
A Event
Detected
V Event
Detected
DO A
CAP
DO V
CAP
Main
Timeout
DO
TIMEOUT
Figure 6.28
State machine diagram of the main loop of the responsive cardiac simulator.
subroutine is run and the user returns to the main loop. The ventricular capture action
fl
flag is used to disable ventricular events in the main loop. If a ventricular capture event
is seen but the action
flag is cleared.
• Checks to see if the PVC button was pressed (i.e., the LV_PVC_EVENT
fl
flag is not set to 1 (enabled), the event
fl
fl
flag is set).
If the event
flag (LV_PVC_ACTION_FLAG) is enabled,
the DO_LV_PVC subroutine is executed. After execution the subroutine returns to
the main loop. If the action
fl
flag is set to 1 and the action
fl
flag is cleared.
• Controls the value stored in the delay timer of time spent in the main loop through
main loop timeout. While inside the main loop the microcontroller checks continu-
ously for capture events. If no capture events are detected, the delay timer times out,
and the subroutine whose pointer is stored in TIMEOUT_INDX is executed. The
delay timer is decremented once every millisecond in the TIMER1 interrupt service
routine.
fl
flag is not set, the event
fl
The interrupt service routine is comprised of two main sections. The
fi
first section is the
TIMER1 interrupt routine, which is executed once every 1 ms.
Z delay timer . A delay is used from the start of a ventricular event such as a pace
detect event to the beginning of the impedance waveform output. This delay is set to
66 ms for a PVC event or 96 ms for a normal ventricular event. The Z delay timer is
decremented and tested for a value of zero each time the TIMER1 interrupt occurs.
The Z delay timer is
fi
first decremented and if found equal to zero, the impedance out-
1), which starts the output of the impedance waveform
data from the microprocessor to the impedance D/A converter.
LVP window timer . The left ventricular pacing pulse from the device under test
must be completed within 180 ms after a right-ventricular event (either paced or
intrinsic). The LV_P_WIN_TIMER is loaded with a value of 180 by the
DO_V_CAP (capture event) or the DO_V_INTRIN (intrinsic event) routines. Each
time through the TIMER1 interrupt service routine, the LV_P_WIN_TIMER is
decremented by 1 and the LV pacing input (LV_P_TRIG) is checked to see if it has
transitioned from a high to a low state (1 to a 0). If the LV_P_TRIG input does tran-
sition from a high state to a low state within the 180-ms period, the LV_P_ON sub-
routine is executed setting the LV_P_LED output to a 1. The purpose of this test is
to verify that the LV pacing pulse output by the device under test does not exceed
put
fl
flag is set to 1 (Z_FLAG
Search WWH ::




Custom Search