ELECTROSURGICAL GENERATOR

Abstract: An electrosurgical generator having a source (12) of electrosurgical energy connected to a patient (24) and including control circuitry (16) for decreasing the output power from the source with increasing patient impedance, the rate of power decrease being substantially greater than that which would result if the output voltage from the source were maintained constant over the range of increasing patient impedance. The control circuitry may, in particular, decrease the output power over the range of increasing patient impedance in accordance with the square of the impedance.

Description: ELECTROSURGICAL GENERATOR This invention relates to electrosurgical generators and in particular to such generators including means for controlling the output power level thereof. The invention further relates to the use of such generators with bipolar forceps or handpieces. Bipolar electrosurgery refers to the use of a handpiece having two small electrodes to apply electrosurgical current instead of a single small active and a large return electrode as is used in monopolar electrosurgery. The advantages of bipolar electrosurgery over monopolar are: (1) A lower power level is used which translates directly to less tissue destruction. (2) The only tissue destroyed is that located between the bipolar electrodes so that there is virtually no danger of alternate site burns. (3) The applied voltage can be much lower. This prevents tissue charring and scarring due to sparks at the elec troves. Bipolar electrosurgery is used extensively in surgical procedures on the eye and brain where the delicate tissue can be easily damaged by excessive heat or sparking. In an effort to improve the effects of bipolar electrosurgery, studies have been conducted on the variation of tissue impedance during desiccation. The results showed two phases of desiccation. The first phase begins as soon as electrosurgical power is applied. The tissue temperature rises, cell walls are ruptured and the impedance of the tissue shows a decrease. The temperature continues to rise and the water is driven off as steam. As tissue dries out, the resistance rises. The output voltage goes up somewhat as the resistance rises and at this point sparking, excessive heating of the forceps, or sticking of forceps to tissue may occur. According to a first aspect of the invention there is provided an electrosurgical generator comprising: a source of electrosurgical energy; means adapted for connecting said source to a patient; and control means for decreasing the output power from said source with increasing patient impedance, the rate of power decrease being substantially greater than that which would result if the output voltage from the source were maintained constant over the range of increasing patient impedance. Thus it will be seen that the power diminishes towards the end of the desiccation stage. Preferably the arrangement is such that the power decreases as the inverse of the square of the patient's tissue impedance. According to a second aspect of the invention there is provided an electrosurgical generator comprising: an adjustable source of electrosurgical energy; means adapted for connecting said source to a load including a patient; and control means for adjusting the actual power delivered to said load from said source including: means for determing the impedance of said load; means for Computing a correction factor depending on the value of said impedance, said correction factor corresponding to a required load power; and means responsive to said correction factor for adjusting said source of electrosurgical power so that said actual power follows said required power. Preferably the arrangement is such that, for impedances above a predetermined value, one of two different modes of operation may be selected. Preferably one of the selected modes provides a constant voltage characteristic, and the other the characteristic described above where the power is decreased in accordance with the square of the load impedance. In a preferred embodiment, the generator is operable to compute a required power for different load impedance ranges, and includes circuitry for conforming the actual output power to the computed required power. According to a third aspect of the invention there is provided an electrosurgical generator comprising: an adjustable source of electrosurgical energy; means adapted for connecting said source to a load including a patient; and control means for adjusting the power delivered to said load from said source including: means for selecting first and second modes of operation of said generator when said load impedance exceeds a predetermined value; means for maintaining the voltage across said load substantially constant for all values of load impedance in excess of said predetermined value in response to said first mode being selected, and means for reducing the power delivered to said load in accordance with the inverse of the square of the load impedance for all values of load impedance in excess of said predetermined value in response to said second mode being selected. U.S. patents 3,96,87; 3,980,085; 4,18-8,927, and 4,092,986 disclose means for reducing the output current in accordance with increasing load impedance. In particular, these patents teach the use of constant voltage outputs whereby the current is decreased with increasing load impedance. However, there is not disclosure in these patents that output power be inversely varied in accordance with the square of the load impedance. In general, there is no disclosure that output power be decreased at a rate which is substantially greater than that which results in the constant voltage outputs of these patents. In order that the invention may be better understood an embodiment thereof will now be described by way of example only and with reference to the accompanying drawings in which: Figure 1 is a block diagram of an embodiment of an electrosurgical generator in accordance with the invention Figure 2 is a graph illustrating different modes of operation of the generator of the present invention; Figure 3 is a flow chart of the program executed by and stored in the microprocessor controller of Figure 1; and Figures 4A and 4B are a schematic diagram of the switching power supply, the generator and the voltage and current sensing circuitry of Figure 1. Referring to Figure 1, an illustrative electrosurgical generator in accordance with the invention includes a switching regulated power supply 10, an unregulated DC voltage source 11, an RF generator 12, voltage and current sensors 14, a microprocessor controller 16, a nominal power indicator 18, and a footswitch 20. Electrosurgical current is applied from the generator to forceps 22, which are diagramatically shown in contact with a patient 24. The power delivered to the load is a function of the voltage from DC supply 10 and the load impedance. As will be described in more detail hereinafter, sensors 14 develop sensing signals proportional to the load voltage and current which are respectively applied over lines 15 and 17 to controller 16. The controller digitizes the sensing signals and computes the load impedance and the actual power being delivered to the load. A required load power is also calculated which is a function of the calculated load impedance and the nominal power selected by the operator at 18. A graph of the required load power for a nominal power of 50 watts is illustrated in Figure 2. At low load impedances less than typically 70 ohms, the computed required power is reduced to prevent damage or overheating of the RF output. In particular, the control voltage applied over line 19 to supply 10 controls the output power in such a manner as to maintain the load current constant over this low value impedance range. Over a mid range extending from about 70 to 100 ohms, the computed required power is held constant at the selected nominal power. At impedances above 100 ohms, one of two modes may be chosen by the operator. As indicated in Figure 2, the computed required power is reduced in the first of these modes with the voltage being held constant, this effect being similar to that of known generators. In the second mode the computed required power is reduced at a rate which is substantially greater than that which occurs when the voltage is held constant. Preferably, the computed required power is reduced, in the second mode, as the square of the load impedance. Thus, for example, the computed required power for a load having impedance of 200 ohms is one-fourth that required for a load impedance of 100 ohms. When the impedance is increased to about 800 ohms, for example, in the second mode of operation, a constant voltage characteristic may be implemented since at this level, the power levels may become impractically small. After the required power has been calculated for a given nominal power and load impedance range, a comparison is then effectively made between the required power and the actual power to adjust the control voltage applied to line 19 by the correct amount to cause the actual power to match the required power. The load impedance varies continuously, during electrosurgery due to differing amounts of tissue contact, tissue heating, etc. The microprocessor controller 16 accordingly repeats the measurement, calculation and correction process approximately every 20 milliseconds as long as the foot switch 20 or bipolar handswitch (not shown) is closed. Reference should now be made to Figure 3, which is a generalized flow chart of the program executed by microprocessor controller 16 where the microprocessor may be an INTEL 8039, a member of the 8048 family of single-chip microcomputers and where the program may be stored on an INTEL 2716 programmable memory. After certain initialization routines (not shown), program control pases to routine COLDST 26 (COLD START), which calculates certain parameters and initiates certain functions. First it calculates IMAXr which is the current value which should occur at 70 ohms for a given nominal power selected by the operator. For example, if the operator selects a nominal power of 70 watts, the current delivered to a 70 ohm load will be 1 ampere and thus IMAX is 1 ampere in this case. The nominal power range available to the operator typically extends from 0 to 70 watts. The nominal power selected by the operator is termed PMAX and occurs over the mid range impedance extending from 70 to 100 ohms. Since the maximum power occurs over the 70 to 100 ohm range, and since the largest current which will occur in this range occurs at 70 ohms, IMAX is calculated at 70 ohms as described above. In general, IMAX=(PxAX/70) where PMX equals the nominal power selected by the operator and 70 corresponds to a 70 ohm load. COLDST also calculates the initial parameter Vmax in the following manner. Assume the operator selects a nominal power of 25 watts. The voltage occuring across a 100 ohm load for this wattage corresponds to VMAX, thus in this case VMAX would be 50 volts. As stated above PMX occurs over the 70 to 100 ohm range. Further, the maximum voltage will occur with a 100 ohm load. Accordingly, VMAX is calculated in the foregoing manner. In general, VMAX@(100 PMAX)1/2=10(PMAX)1/2. After the calculations of VMAX and IMAX COLDST applies a small control voltage AFB over line 19 to supply 10 to turn on RF generator 12. It then waits for about 0.01 second to allow the RF output to become stable before transferring a control to the control routines, GETPWR 28 and CNTLP 30. GETPWR detects the load voltage signal VSEN occuring at line 15 and the load current signal risen occuring at line 17. The load power P is calculated as VSENISEN Furthermore, the load impedance ZLOAD is calculated as VSEN A determination is also made as to which impedance range the load impedance occurs in. Thus, a first impedance range flag (not shown) is set if the load impedance range is less than 70 ohms, a second flag is set if it is between 70 and 100 ohms, and a third flag is set if it is above 100 ohms. It should be understood a substantial amount of tolerance may be employed in the selection of the impedance range may extend from 60 to 115 ohms, for example. As stated above the operator may select between one of two different modes in the high impedance range. Depending upon the selected mode, a further flag will be set by COLDST indicating the selected mode. The routine CNTLP inspects the above flags and determines which of the following algorithms should be executed. These algorithms are LOZ 32, MIDZ 36, ZOL 38, and HIZR2 40 as can be seen in Figure 3. All of these algorithms eventually pass control to a routine AFBADJ 34. Each of these routines will now be individually discussed. Assuming the load impedance is measured as 40 ohms, CNTLP will transfer control to LOZ 32. A correction factor will be computed which will implement the constant current characteristic described above for the low impedance range. In particular, if ISEN=1.2 amps and if TMAX-1 amp (for example), then the correction factor is computed as IMAX'1SEN Thus, the calculated factor equals 1.0/1.2. After calculation of the correction factor control is passed to AFBADJ 34 which raises or lowers the control voltage AFB based on the computed correction factor. Thus, if the value of AFB-- is 10 volts, it will be reduced by the correction factor of 1.0/1.2. In this manner the current is main tamed constant at the value of IMAX (1.0 amp) over the low impedance range. Note in this example that ISEN exceeds IAX. Whether it exceeded it or not, the correction factor is calculated as IMXJIsEN over the entire low impedance range by the LOZ routine. After the corrected control voltage is applied over line 19 to supply 10, a test is made to determine if the operator is still enabling the generator to apply electrosurgical power to the forceps. This test is conducted at 42. If the generator is so enabled, control is returned to GETPWR. Execution of the routines from GETPWR through AFBADJ requires at most about 20 milliseconds and thus the power delivered to the load is constantly being adjusted depending upon the sensed load conditions. If there are no more enables, the routine may return to an initialization mode where the output is set off and certain self-test routines are executed while waiting for the next enable. This feature is not shown in the flow chart of Figure 3. As stated above the impedance of the tissue will tend to increase as desiccation proceeds. Hence, assume the next load measured by the GETPWR routine is 80 ohms. The MIDZ flag would be set and the load power calculated. the routine CNTLP would again determine the actuated flags and transfer control to the MIDZ routine 36. There a correction factor is calculated in accordance with the expression (PMAX/PLOAD)1/2 where PMAX equals the nominal power selected by the operator and PLoAD= = VSENISEN as calculated in GETPWR. Thus, if PLOAD' the actual load power, is 60 watts and PMAX the nominal power is 70 watts, the calculated correction factor is (7/6)1/2. Once this correction factor has been determined, control is passed to the AZBADJ routine 34 where the correction factor is multiplied by the previous value of control voltage AFB applied to line 19. The adjust ment of the control voltage and the application over line 19 is executed in the same manner as described above for the LOZ routine. With the passage of further time the impedance continues to increase. Thus, assuming the desiccation mode is still enabled by the operator, control will be returned to GETPWR and CNTLP. Further, assuming the operator has selected mode one for the high range impedances, CNTLP 30 will transfer control to ZOL 38 after having sensed the appropriate flags. If the impedance calculated by GETPWR is now 200 ohms, the power delivered to it will have a constant voltage characteristic as described above with respect to Figure 2. In particular, the constant voltage will be VMAX as calculated by the COLDST routine. In order to implement this constant voltage characteristic ZOL calculates a correction factor determined by the expression VMAX/VsEN where VSEN equals the load voltage sensed by GETPWR. If the sensed voltage is 70 volts while VMAX is 50 volts, the correction factor will be 5/7. AFBADJ utilizes this correction factor in the same manner as discussed above for LOZ and MIDZ to adjust the control voltage applied to line 19. If the operator has selected mode 2, this will be sensed by the CNTLP together with the fact that the impedance is now in the high impedance range. Assume that the impedance at this time is 200 ohms while PMAX is 50 watts and t60 watts. The correction factor is computed as (10,000MAX /Z LOAD)/pLOA31/2 Thus, in the above instance, it equals [ (l0,000)(50)/(40,000)/60) l/2=(5/24)l/2. Again, after computation of the correction, control is passed to AFBADJ to adjust the line 19 control voltage. Attached hereto as Appendix I is a program listing for the Figure 3 flowchart where the listing also includes various initialization, testing, and error programs. Reference should now be made to Figures 4A and 4B which is a schematic diagram of switching power supply 10, high efficiency RF generator 12, and current sensors 14 of Figure 1. The switching power supply includes a standard switching supply circuit 44 made by Silicon General. The remaining integrated circuits of the invention are also made by Silicon General and other such companies. The switching power supply is of conventional configuration and includes a switching transistor 46 and inductor 47, and an output line 48 which applies regulated high voltage to output transistor 52 of generator 12. The power supply voltage applied to line 48 originates from terminal 50, this voltage typically being about 100 volts. The voltage at terminal 50 is-regulated by switching transistor 46, inductor 47 and capacitor 49 where, in particular, the longer transistor 46 is switched off, the less the DC voltage applied to line 48 will be in magnitude. A voltage DC SENSE proportional to the line 48 voltage is applied to terminal 2 of circuit 44 via a voltage divider comprising resistors 54 and 56. This voltage is compared to and follows AFB on line 19. On-off pulses are applied to switching transistor 46 from circuit 44 via transistors 58 and 60. The repetition rate of these pulses is determined by resistor 62 and capacitor 64 connected to the RT and CT terminals of circuit 44. The width of these pulses and thus the on/off time of transistor 46 is a function of the difference between AFB and DC SENSE. Thus, in this manner the power supply voltage follows AFB as the impedance changes during a desiccation procedure. The output power is delivered to the load via lines 66 and 68 which in turn are connected to output transformer 70. The generator 12 is driven by a 750 KHz signal applied to terminal 72 where it is amplified and the applied to output transistor 52 which in turn drives primary winding 74 of transformer 70. The load current is sensed at transformer 76 and converted to a voltage representative of the current by the conversion circuitry indicated at 78. This voltage is applied over line 17 as the ISEN signal of the microprocessor 16. Furthermore, a voltage representative of the load voltage is derived from winding 80 of transformer 70. This signal is converted by signal conversion circuitry 82 to develop the load voltage at VSEN on line 19. The values given for the resistors are in ohms while those for the capacitances are microfarads unless otherwise specified, these values being illustrative of the embodiment of the invention. It should be noted that overall operation of the present invention is such that a very small heat sink is needed to dissipate heat, thus, a 3-4 watt sink connected to transistor 52 is suitable, such a sink being very small in size. This follows from the fact that the amplifier is essentially matched to a 100 ohm load and only in a limited impedance range around that value is the maximum delivered to the load. With the load impedance substantially removed from 100 ohms, the power is reduced as discussed above and shown in Figure 2. There is no need to generate substantial wattage at impedances removed from the impedance to which the amplifier is matched. Accordingly, even at impedances removed from 100 ohms only a small amount of power is involved whereby the small heat sink mentioned above is suitable for these smaller powers. It is to be understood that the above-detailed description of an embodiment of the invention is provided by way of example only. Thus, for example, the above principles are also applicable to monopolar as well as bipolar electrosurgery. APPENDIX I LINE ADDR 81 B2 B3 84 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 1 1 TITLE SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C700 2 * 3 . * TABLE SETS UP STORAGE LOCATIONS FOR RAM * 6 NLIST M 7 ORG 20H 8 0020 ECON DS 1 9 0021 VSEN DS 1 10 0022 ISEN DS 1 11 0023 UCSEN DS 1 12 0024 Z DS 1 IMPEDANCE OF LOAB.3.1250HMS/COUNT 13 0025 ZRANGE DS 1 14 0026 POWER DS 1 15 0027 PREO DS I COMPUTED NECESSARY POWER 16 0028 AF6 DS 1 17 0029 CORECT DS 1 CORRECTION FACTOR ON POWER 18 002A RTECON DS 1 19 002B IMAX DS 1 20 002C VMAXR2 DS 1 21 <RTI ID=14.13> 002D PIMAGE DS 1 PORT 1 IMAGE 22 002E DWNCNT DS 1 COUNT OF OF CONSECUTIVE DOWN COUNTS 23 002F MODES DS 1 KEYING INPUTS G+DSE+DS1F, DS2E 24 DOOB DAC EOU 05H 25 0000 CHECK EQU R5 26 002B VMAXRI EQU IMAX 27 0000 COUNT EQU R3 28 0008 DOG EQU 8 29 0001 KEY EQU 1 30 0002 RESET EOU 2 31 0004 SDN EQU 4 32 0010 IFLAG EQU 16 33 0020 FLAG EQU 32 34 0040 MAXD EQU 64 35 0080 ERLITE EQU 128 LINE ADDR B1 B2 B3 84 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 2 37 * 38 * MACRO DEFINITIONS FOLLOW: 39 * RECALL GETS FROM RAM STORAGE AN 8 BIT VALUE 40 * AND LOADS IT IN ACCUMULATOR. 41 * IF P=0, NOTHING ELSE IS DONE. 42 * IF P=1, THEN THE VALUE IS MOVED TO REGISTER RP. 43 * FORMAT: 44 * RECALL ECON,O 45 * OR 46 * RECALL VSEN,1,R4 47 * 48 RECALL MACRO VAL,P,RP 49 MOV R1, * VAL 50 MOV A,eR1 51 IF P 52 MOV RP,A 53 ENDIF 54 ENDM LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 3 5 58 * 59 * MACRO STDRE 60 * TAKES A VALUE FROM (1) THE ACCUMULATOR IF R=O 61 * 62 * OR FROM THE REGISTER RP IF P=1 63 * AND STORES IT IN LOCATION VAL. 64 * 65 * FORMAT: 66 * STORE ISEN,O 67 * OR 68 * STORE POWER, 1, K5 69 * 70 * 72 STORE MACRO VAL,R,RP 73 MDV R1,*VAL 74 IF R 75 MOV A,RP 76 ENDIF 77 MOV &commat;R1, 78 ENDM 79 * 80 * MACRO ROUND ROUNDS UP IHE ACCUMULATOR BASED ON MSB OF REGISTER 81 * FORMAT 82 * ROUND RA 83 * 84 ROUND MACRO RX 85 XCH A,RX 86 RLC A CARRY-ROUNDUP 87 CLR A 88 ADOC A,RX 89 ENDM LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 4 92 93 * 94 * ADC IS A MACRO WHICH 95 * TAKES CARE OF THE A TO D CONVERSION 96 * AND STORAGE FOR THE ANALOG INPUTS. 97 * 98 * FORMAT: ADC ECON 99 * 100 101 ADC MACRO WHAT 102 LOCAL WHERE 103 LOCAL WHO 104 MOV R1, WHAT-20H 105 MOV RO, WHAT 106 MOVX &commat;R1,A START CONVERSION 107 MOV 3,@8 108 WHO DJNZ R3, WHO WAIT FOR EDC TO GO DOWN 109 JNI WHERE 110 JMP S-2 WAITING FOR INTERRUPT 111 WHERE MOVX A,&commat;R1 112 MOY oRO,A STORE THE RESULT 113 ENDM 115 116 * 117 * WAIT IS A SIMPLE DELAY LOOP 118 * USING REGISTERS 3 AND 4 119 * 120 * CALLED BY THE COMMAND 121 * 122 * WAIT N 123 * WHERE N IS ANY INTEGER LESS THAN 256 124 * WILL DELAY 256*2*N MACHINE CYCLES. 125 127 WAIT MACRO N 128 IF N 129 MOV R4,@@@ 130 DJNZ R3,S 131 DJNZ R4,S-Z 132 ELSE 133 NOP 134 NOP 135 NOP 136 NOP 137 NOP 138 NOP 139 ENDIF 140 ENDM LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROl:22 NOVEMBER 1982:CHECKSUM C70 Page 5 142 143 * 144 145 * THIS IS A SIMPLE MINDED ROUTINE 146 * WHICH RESETS THE WATCHDOG TIMER. 147 * 148 150 WCHDOG MACRO 151 ORL P1,&num;DOG 152 WAIT 2 153 ANL P1,&num;255-DOG WCHDOG-O 154 WAIT 2 155 ENDM 156 157 158 * ROM CHECKSUM ROUTINE 159 * 160 * THIS ROUTINE SUMS UP ALL POSSIBLE ROM LOCATIONS 161 * AND IF THE ANSWER IS NOT ZERO, JUMPS OUT TO 162 * ERROR: WHICH HANGS UP THE PROCESSOR. 163 * 164 166 ROMCHK MACRO Q, R 167 LOCAL LOOPA 168 MDV COUNT,4tO 169 LOOPA MOV A,COUNT 170 MOVP A,&commat;A 171 ADD A,CHECK 172 MOV CHECK,A 173 DJNZ COUNT,LOOPA 174 IF 0-1 175 JMP R NEXT ROMCH 176 ELSE 177 RET 178 ENDIF 179 ENDM 180 181 * 182 * SUBTR 183 * 184 * SUBTRACTS A REGISTER EROM 185 * THE ACCUMULATOR IN 2S COMPLEMENT 186 * NOTATION 187 * CARRY SET IF ANSWER IS POSITIVE 188 * 189 190 SUBTR MACRO RX 191 LOCAL WHO 192 XCH A,RX 193 JNZ WHO 194 INC A 195 INC RX 196 WHO CPL A 197 INC A 2S COMPLEMENT A 198 ADD A,RX 199 ENDM LINE ADDR B1 B2 B3 B4 SSE; BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 6 201 202 * 203 * PORT MACRO 204 * WRITES TO PORT ONE, WITH THE 205 * VALUE OF KEY, SHUTDOWN OR RESET DESIRED. 206 * 207 * FORMAT 208 * PORT KEY,1 209 * OR, 210 * PORT SDN,O 211 * 212 214 PORT MACRO WHAT,N 215 RECALL PIMAGE,O 216 IF N 217 ORL A,&num;WHAT 218 ELSE 219 ANL A,&num;255-WHAT 220 ENDIF 221 OUTL P1,A 222 STORE PIMAGE,O 223 ENDM 224 *ENDMACROS* LINE ADD B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 7 226 227 * 228 * INITIALIZATION 229 * 230 * CLEAR THE OUTPUTS AND DAC 231 * RESET THE WATCHDOG 232 * RUN ROMCHK AND RAMCHK 233 * AND LOOK FOR KEYING INPUTS 234 * 235 236 * 237 * 238 ORG 00 239 0000 75 INIT ENTO CLR 240 0001 15 DIS I 241 0002 B9 08 MOV R1,&num;08H 242 0004 27 CLR A 243 0005 STORE AF8,O 249 0008 91 MOVX eR1,A CLEAR THE DAC 250 0009 WCHDOG 279 0019 PORT KEY,1 298 0022 PORT SDN,O NO KEY, SHUTDOWN 317 0028 PORT RESET,G RESETNOT IS ASSERTED HERE LINE ADDR 81 82 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 8 337 338 * 339 * RAMCHK ROUTINE 340 * 341 * THIS ROUTINE WRITES OO,THEN FFH IN RO TO CHECK IT 342 * 343 * THEN WRITES 00 THEN FFH TO EACH RAM LOCATION IN SUCCESSION. 344 * IF A READ OR WRITE IS NOT ACCOMPLISHED, 345 * THE ROUTINE JUMPS OUT TO ERROR 346 * WHICH SHUTS DOWN ALL PORTS AND HANGS THE PROCESSOR. 347 * 348 350 0034 B5 FF RAMCHK MOV R0,&num;0FFH ALL IS TO RO 351 0036 F8 MOV A,RO 352 0037 37 CPL A 353 0038 C6 3C JZ S+4 354 003A 44 23 JMP ERROR ALL IS ERROR 355 003C A8 MOV RO,A 356 003D F8 MOV A,RO 357 003E C6 42 JZ S+4 358 0040 44 23 JMP ERROR 359 0042 88 7F MOV R0,&num;07EH TOP RAM LOCATION 360 0044 37 CPL A 361 0045 AO LOOP6 MOV &commat;R0,A ALL ONES IN A 362 0046 FO MOV A,eRO 363 0047 37 CPL A A NOW HAS ALL ZEROS 364 0048 C6 4C JZ S+4 365 004A 44 23 JMP ERROR 366 004C AO MOV A,&commat;R0 367 004D FO MOV A,&commat; ;RO 368 004E C6 52 JZ S+4 369 0050 44 23 JMP ERROR 370 0052 37 CPL A ALL ONES BACK IN A 371 0053 E8 45 DJNZ RO,LOOP6 DEC RAM LOC AND CONTINUE 572 0055 23 01 MOV A,&num;0001H SDN,RESETNUT, KEYNOT 373 0057 STORE PIMAGE,0 RESTORE PIMAGE TO INITIAL CDX 379 005A 39 OUTL PI,A AND WRITE TO PORT LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER L982:CHECKSUM C70 Page 9 381 * 382 * THIS IS A SEQUENCE OF ROMCHECK 383 * ROUTINES, ONE FOR EACH PAGE OF MEMORY. 384 * 385 * NOW THE CALLUP FOR THE MAIN ROMCHK ROUTINE. 386 * 387 * 388 0058 23 DO ROM MOV A,&num;00 389 0050 AD MOV CHECK,A 390 005E 04 61 JMP LOOPB 391 0060 AD DB OADH THIS IS THE CHECKSUM CORRECTOR 392 0061 14 FO LOOPB CALL ROMST 393 0063 C6 65 ENDINT # COLDST EVERYTHING OK HERE 394 0065 C4 82 JMP KILL6 IF CHECKSUM NOT ZERO 395 * NOW DO ALL THE LITTLE ROMCHECKS. 396 * 397 * 398 ORG OFOH 399 DOFO ROMST ROMCHK &commat;,ROM1 411 ORG 01F4H 412 01F4 ROM1 ROMCHK 0,ROM2 424 ORG 02FOH 425 02F0 ROM2 ROMCHK 0,ROM3 437 ORG 03F4H 438 03F4 ROM3 ROMCHK 0,ROM4 450 ORG 04FOH 451 04FO ROM4 ROMCHK 0,ROM5 463 ORG 05FOH 464 05F0 ROM5 ROMCHK 0,ROM6 476 ORG 06FDH 477 06F0 ROM6 ROMCHK 0,ROM7 489 ORG 07FOH 490 07FD ROM7 ROMCHK 1,ROM@ BACK TO MAIN ROUTINE LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 10 503 504 * 505 * COLDST ROUTINE 506 * 507 * WHICH BRINGS THE MACHINE UP FROM A COLD START 508 * TO AN INITIAL VALUE DF 5 VOLTS 509 511 ORG ENDINT+2 512. 0065 COLDST WCHDOG 541 0075 B5 CLR FO RANGE 1 SETUP 542 0076 B8 Q6 MOV RO,&num;DAC SET DAC VOLTS TO ZERO 543 0078 27 CLR A 544 0079 90 MOVX &commat;R0,A 545 007A OA IN A,P2 546 007B 5370 ANL A,&num;70H DSE,DS2E,DSlE 5117 007D STORE MODES,0 553 0080 C6 65 JZ COLDST WAITING FOR INPUT 554 0082 AD MOV R5,A TEMP STORAGE OF ENABLES 555 0083 D3 70 XRL A,&num; ;70H ALL THREE MEAN TESTLOOP 556 0085 C5 93 JZ TST 557 0087 FD MOV A,R5 GETS ORIG.DATA BACK 558 0088 D3 60 XRL A,&num;60H DSE AND DS2E 559 008A C6 95 JZ RA2 560 008C FD MOV A,R5 561 008D D3 50 XRL A,*50H DSE AND DS1E 562 008F C6 96 JZ RAl 563 0091 04 65 JMP COLDST IF INVALID INPUTS 564 0093 E4 00 TST JMP TESTLP 565 0095 95 RA2 CPL to SETS RANGE2 FLAG 566 0096 RA1 ADC ECON 576 00A5 03 25 ADD A,&num;37 577 00A7 E6 AA JNC TMP 578 00A9 27 CLR A 579 OOAA 03 06 TMP ADD A,&num;219 RESTORE A TO 219 MAX 580 00AC AD MDV &commat; ;R0,A STORE THE NEW ECON 581 0DAD 74 8C CALL SORT SQUARE ROOT ROUTINE ON ECON 582 00AF STORE RTECON,O RA HAS RTECON LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 11 589 590 * 591 * NOW COMPUTE IMAX AND VMAX AND VMAXR2 592 * 593 595 00B2 AE MOV R6,A 596 00B3 DC D8 MOV 24,&num;008H 597 00B5 74 50 CALL MUL 598 00B7 2A XCH A,R2 599 0088 ROUND R2 604 008C STORE IMAX,O MAX ALLOWABLE CURRENT 610 *NOTE THAI VMAXR1 AND IMAX ARE REALLY THE SAME 611 * 612 *ONE AMPERE IS 200COUNTS, SO IS ONE HUNDRED VOLTS. 613 00BF FE MOV A,R6 614 OOCO 77 RR A 615 OOC1 67 RRC A 616 00C2 53 3F ANL A,&num;3FH 617 00C4 13 00 ADDC A,&num;0 ROUNDUP 618 00C6 STORE VMAXR2,0 MAX 1/R**2 VOLTAGE 624 00C9 23 0A MOV A,&num;10 625 OOCB STORE AFB,O 5 VOLTS IS AFBSET 631 OOCE 86 08 MOV R0,&num;DAC DAC OUTPUT ADDRESS 632 00D0 90 MOVX &commat;R0,A WRITE AFB 633 D0D1 PORT KEY,O 652 OODA PORT RESET,1 RESETNOT NOT ASSERTED 671 D0E3 WAIT lOH 684 00E9 24 00 JMP GETPWR 685 * NOW DO GETPWR FOR CLOSED LOOP LINE ADD B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 12 687 688 * 689 * GETPWR ROUTINE 690 * 691 * MEASURES V,1 692 * COMPUTES Z 693 * DETERMINES ZRANGE 694 * 695 * ZRANGE IS A WORD INTERPRETED 696 * OVOLT,OCCUR,VMAX,IMAX,ZDL,HIZ,MTDZ,LDZ 697 * 698 * DETERMINES OUTPUT POWER 699 * 700 * CALLS THE CONTROL LOOP 701 * 702 704 ORG lOON 705 0100 27 GETPWR CLR A 706 0101 AE MOV R6,A R6 IS TEMP ZRANGE REGISTER 707 0102 ADC VSEN 717 0111 AA MOV R2,A 718 0112 AD MOV R5,A TEMP SAVE VSEN 719 0113 F2 20 JB7 VFL IF V > 64 VLITE ON 720 0115 PORT VFLAG,O ELSE,LITE OFF 739 011E 24 29 JMP CKV 740 0120 VFL PORT VFLAG,1 759 0129 FO CKV MOV A,R5 GETS V BACK 760 012A 0337 ADD A 55 761 012C E6 32 JNC CKVMX CARRY IF OVOLTS 762 012E 2E . XCH A,R6 763 012F 43 80 ORL A,&num;80H OVERVOLTS FLAG 764 0131 2E XCH A,R6 765 0132 CKVMX RECALL VMAXRl,O 771 0135 37 CPL A -VMAXRl 772 0136 17 INC A 25 COMPLEMENT 773 0137 6A ADD A,R2 VSEN-VMAXR1, CARRY IF POSITIVE 774 0138 E6 3E JNC GET1 775 013A 2E XCH A,R6 776 013B 43 20 ORL A,&num;20H 777 013D 2E XCH A,R6 778 013E GET1 ADC ISEN 788 014D AC MOV R4,A 789 014E F2 5B JB7 IFL TURN ON ILITE IF I > 640 790 0150 PORT IFLAG,O ELSE OFF 809 0159 24 64 JMP CKI 810 0158 IFL PORT IFLAG,l 829 0164 FC CKI MOV A,R4 GETS I BACK 830 0165 03 37 ADD A,&num;55 831 0167 E6 60 JNC HOUSE CARRY IF I > lA 832 0169 2E XCH A,R6 833 016A 43 40 ORL A,&num; ;40H OCCURRENT FLAG 834 016C 2E XCH A,R6 SAVE ZRANGE 835 016D HOUSE RECALL IMAX,O 841 0170 37 CPL A -IMAX 842 0171 17 INC A 25 COMPLEMENT 843 0172 6C ADD A,R4 ISEN-IMAX,CARRY IF POSITIVE 844 0173 E6 79 JNC HOUSE 845 0175 2E XCH A,R6 846 0176 4310 ORL A,&num;10H SET IMAX FLAG 847 0178 2E XCH A,R6 LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 13 848 0179 27 HOUSE1 CLR A 849 017A 97 CLR C HOUSEKEEPING 850 017B BB 06 MOV COUNT,&num;06 851 0170 2A LOOP1 XCH A,R2 852 017E 67 RRC A 853 017F EB 7D DJNZ COUNT,LOOP1 DIVIDES R2 BY 8 854 0181 74 66 CALL DIV R2: :A/R4=V/1/8 855 0183 STORE Z,O 861 0186 E6 BE JNC LOOPZ CARRY IF Z > 800 862 0188 2E XCH A,R6 863 0189 43 08 ORL A,&num;8 ,&num;8 HIGH Z FLAG 864 018B 2E XCH A,R6 865 018C 24 A6 JMP ZRSTO 866 018E 03 OF LOOPZ ADD A,&num;223 CARRY IF Z > 100 OHMS 867 0190 E6 98 JNC MIDZ 868 0192 2E XCH A,R6 869 0193 43 04 ORL A,&num;04 870 0195 2E XCH A,R6 871 0196 24 A6 JMP ZRSTO 872 0198 03 OA MIDZ ADD A,&num;10 CARRY IF Z > 70 OHMS 873 019A E6 A2 JNC LDZ 874 019C 2E XCH A,R6 875 019D 43 02 ORL A,&num;2 876 019F 2E XCH A,R6 SETS LDZ FLAG 877 01A0 24 A6 JMP ZRSTO 878 01A2 2E LDZ XCH A,R6 879 01A3 43 01 ORL A,&num; ;1 880 01A5 2E XCH A,R6 881 01A6 ZRSTO STORE ZRANGE,1,R6 887 O1AA FD MOV A,R5 VOLTS FOR POWER COMP 888 01AB 74 50 CALL MUL R4*A GOES TO R2:A 889 01AD 97 CLR C 890 01AE F7 RLC A POWER BIT 7 IN CARRY 891 01AF 2A XCH A,R2 BITS 16-8 IN A 892 01B0 F7 RLC A 2 TIMES POWER 893 01B1 ROUND R2 898 01B5 STORE POWER,O 904 01B8 44 00 JMP CNTLP LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 14 906 907 * 908 * CNTLP 909 * 910 * ONCE WE HAVE THE POWER AND IMPEDANCE INFORMATION 911 * THIS ROUTINE DECIDES WHAT FEEDBACK MODE TO USE. 912 * 913 915 ORG 200H 916 0200 CNTLP RECALL ZRANGE,O OVOLT,OCCUR,VMAX,IMAX,ZDL,HIZ, M1D2,LJZ 922 0203 C6 23 JZ ERROR ZRANGE NUMBER SHOULDNT BE ZERO 923 0205 F2 IF JB7 OVOLT V > 100 924 0207 D2 21 JB6 OCCUR I > 1 925 0209 92 27 JB4 CLOZ 1 > IMAX 926 0208 82 17 JB5 VMAX 927 020D 12 27 LOOP2 JBO CLOZ 928 020F 32 33 JB1 CMIDZ MID RANGE CALC. 929 0211 72 25 JB3 ZOL Z > 800 930 0213 86 38 JFO HIZR2 Z > 100 AND RANGE 2 931 0215 44 25 JMP ZOL ELSE,Z > 100 AND RANGE1 932 0217 B6 18 VMAX JFO VMAX2 V > VMAX,AND RANGE2 933 0219 44 25 JMP ZOL NI2 TREATMENT R1 934 0218 52 3B VMAX2 JB2 HIZR2 IF 100 < Z < 800 935 021D 44 OD JMP LOOP2 BACK UP TO MAIN LOOP 936 021F 84 00 OVOLT JMP OVOLT4 OVOLT IS ON PAGE 4 937 0221 84 47 OCCUR JMP OCCUR4 938 0223 A4 00 ERROR JMP ERROR5 DITTO OCCUR AND ERROR 939 0225 44 58 ZOL JMP Z0L2 ZOL2 ON PAGE 2 LINE ADDR 61 82 83 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 15 941 942 * 943 * CLOZ ROUTINE 944 * 945 * COMPUTES tl.CORECT WHERE 946 * F1=1 OR O AND CORECT IS LESS THAN 1 947 * 948 * ROUTINE USES THE LAST HALF OF THE 949 * NIZ ROUTINE FOR CONMONALITY 950 * 951 953 0227 A5 CLOZ CLR F1 DOWN FLAG 954 0228 RECALL ISEN, 1, R4 960 022C AB MOV R3,A SAVE ISEN 961 022D RECALL IMAX,l,R2 967 0231 44 68 JMP R2ZOL REST OF ROUTINE IS COMMON 968 * WITH ZOL ROUTINE LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 16 970 971 * 972 * ROUTINE MID 2 973 * SETS PREQ EQUAL TO ECON 974 * WHICH IS TRUE,MDRE OR LESS 975 * 970 * 977 * 979 0233 CMIDZ RECALL ECON,O 985 0236 STORE PREQ,O 991 0239 84 88 JMP POWCOM LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUN C70 Page 17 993 994 * 995 * NIZ 996 * 997 * THIS ROUTINE COMPUTES POWER PREQ 998 * FOR THE HIGH IMPEDANCE REGION AND THE 999 * l/R**2 MODE 1000 * 1001 1003 023B HIZR2 RECALL Z, 1 R4 1009 023F 7450 CALL MUL R2=Z**2 1010 0241 F7 RLC A 1011 0242 27 CLR A 1012 0243 7A ADDC A,R2 A=Z**2+ROUNDUP 1013 0244 AC MOV R4,A 1014 0245 RECALL ECON, 0 1020 0248 97 CLR C 1021 0249 BA 00 MOV R2,&num;00 1022 0248 BB 04 MOV COUNT,&num;04 1023 024D F7 LOOPS RLC A 1024 024E 2A XCH A,R2 1025 024F EB 4B DJNZ COUNT,LOOPS 1026 0251 74 66 CALL DIV 1027 0253 STORE PREQ,O 1033 0256 84 88 JMP POWCOM LINE ADDR B1 B2 B3 S4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Pege 18 1035 1036 * 1037 * ROUTINE ZOL 1038 * 1039 * AIMS FOR A CONSTANT VOLTAGE 1040 * VMAXR1 OR VMAXR2 AS SET BY tO 1041 * CORECT IS F1.CORECT WHERE F1 IS 1 OR O 1042 * CORECT IS A VALUE LESS THAN 1 1043 * 1044 * CORECT=VREQ/VOUT 1045 * 1046 1048 0258 A5 ZOL2 CLR F1 DOWN FLAG 1049 0259 RECALL VSEN,1,R4 1055 025D AB MOV R3,A SAVE VSEN 1056 025E RECALL VMAXR2,1,R2 IF RANGE 2 1062 0262 B6 68 JFO R2ZOL 1063 0264 RECALL VMAXR1,1,R2 IF 1/R RANGE 1069 0268 R220L SUBTR R3 A=VMAX-VSEN,CARRY IF POS 1077 0270 E6 74 JNC NEWSET IF NEG,DIVIDE R2/R4 1078 0272 B5 CPL F1 POSITIVE ANSWER, CORRECT > 1 1079 0273 2A XCH A,R2 VMAX-VSEN IN R2 1080 0274 27 NEWSET CLR A R2:00/R4 1081 0275 74 66 CALL DIV 1082 0277 E6 7B JNC CORGET 1083 0279 23 FF MOV A#OFF# NEED LOTS VOLTS 1084 027B CORGET STORE CORECT,O 1090 027E C4 00 JMP AFBADJ LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 19 1092 HERE IS THE DATA FILE 1093 CONTAINING RTECON BASE 1094 *FOR ALL &num;5 FROM O TO 256 IN 1095 INCREMENTS OF 4 1096 ORG 300H 1097 0300 00 DR 00 1098 0301 20 20 37 40 DB 32,45,55 64 1099 0305 48 4E 55 56 DB 72,78,85,91 1100 0309 60 65 6A 6F DB 96,101,106,111 1101 030D 7378 7C 80 DB 115,120,124,128 1102 0311 84 88 SB 8F DB 132,136,139,143 1103 0315 93 96 99 9D DB 147,150,153,157 1104 0319 AD A3 A6 A9 DB 160,163,166,169 1105 031D AC AF B2 B5 DB 172,175,178,181 1106 0321 B8 DB DB CO DB 184,187,189,192 1107 0325 C3 C5 C8 CA DB 195,197,200,202 1108 0329 CD CF 02 D4 DB 205,207,210,212 1109 032D D7 D9 OBOE DB 215,217,219,222 1110 0331 ED E2 E5 E7 DB 224,226,229,231 1111 0335 E9 El ED EF DB 233,235,237,239 1112 0339 F2 F4 F6 F8 DB 242,244,246,248 1113 0330 FA FC FE FF DB 250,252,254,255 LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 20 1115 1116 * * 1117 * MULTIPLY ROUTINE (8 X 8) * 1118 * * 1119 1120 * * 1121 * IN: A : MULTIPLICAND * 1122 * R4 = MULTIPLIER * 1123 * * 1124 * OUT: A = LOVER 8 BITS OF PRODUCT * 1125 * R2 = UPPER 8 BITS OF PRODUCT * 1126 * * 1127 1129 ORG 0350H 1130 0350 BA 00 MUL MOV R2&num;DD 1131 0352 BB 08 MOV R3 &num;8 1132. 0354 12 5E MPY8LP JBO MPY8A 1133 0356 2A XCH A, R2 1134 0357 97 CLR C 1135 0358 67 RRC A 1136 0359 2A XCH A,R2 1137 035A 67 RRC A 1138 035B EB 54 DJNZ R3,MPY8LP 1139 035D 83 RET 1140 035E 2A MPY8A XCH A,R2 1141 035F 6C ADD A,R4 1142 0360 67 RRC A 1143 0361 2A XCH A,R2 1144 0362 67 RRC A 1145 0363 EB 54 DJNZ R3,MPY8LP 1146 0365 83 RET LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 21 1148 ******************************** 1149 * * 1150 * DIVIDE ROUTINE (16 X 8 BITS) * 1151 * * 1152 1153 * * 1154 * IN A = (R2: :A) / R4 * 1155 * * 1156 t OUT: A - QUOTIENT * 1157 * R2 = REMAINDER * 1158 * * 1159 1161 0366 2A DIV XCH A,R2 1162 0367 8B 08 MOV R3&num;8 1163 0369 37 CPL A 1164 036A 6C ADD A,R4 1165 036B 37 CPL A 1166 036C F6 71 JC DIVIA 1167 036E A7 CPL C 1168 036F 64 8A JMP DIVIB 1169 0371 6C DIVIA ADD A,R4 1170 0372 97 DIVILP CLR C 1171 0373 2A XCH A,R2 1172 0374 F7 RLC A 1173 0375 2A XCH A,R2 1174 0376 F7 RLC A 1175 0377 E6 7E JNC DIVIE 1176 0379 37 CPL A 1177 037A 6C ADD A,R4 1178 037B 37 CPL A 1179 037C 64 86 JMP DIVIC 1180 037E 37 DIVIE CPL A 1181 037F 6C ADD A,R4 1182 0380 37 CPL A 11B3 0381 E6 86 JNC DIVIC 1184 0383 6C ADD A,R4 1185 0384 64 87 JMP DIVID 1186 0386 1A DIVIC INC R2 1187 0387 EB 72 DIVID DJNZ R3,DIVILP 1188 0389 97 CLR C 1189 038A 2A DIVIB XCH A,R2 1190 0385 83 RET LINE ADDR B1 82 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 22 1192 * 1193 * 1194 * SORT ROUTINE 1195 * 1196 * THIS ROUTINE COMPUTES THE 1197 * SQUARE ROOT OF THE VALUE IN THE ACCUMULATOR 1198 * BY USING A 6BIT LOOKUP AND LINEAR INTERPOLATION 1199 * RETURNS THE VALUE IN THE ACCUMULATOR 1200 * 1201 * 1202 1204 038C AD SORT MDV R5,A HOLD X FOR LATER 1205 038D 77 RP A 1206 038E 77 RP A 1207 038F 53 3F ANL A&num;03FH 6BITS OF X 1208 0391 A5 MOV R6,A 1209 0392 17 INC A BASE ADDR +1 1210 0393 E3 MOVP3 A,eA LOOK UP RTECON BASE+1 1211 0394 2E XCH A,R6 F6=BASE RTECON+1 1212 0395 E3 MOVP3 A,eA RT1FCON 1213 0396 AA MOV R2,A SAVE THE BASE 1214 0397 37 CPL A NEGATE BASE 1215 0398 17 INC A TWOS COMPLEMENT 1216 0399 6E ADD A,R6 BASE+1 MINUS BASE 1217 039A AC MOV R4,A R4 HAS DIFF .1218 0398 FO MOV A,R5 X 1219 039C 53 03 ANL A&num; ;03H 1220 039E C5 A5 JZ LOOPE 1221 03AD AB MOV R3,A 1222 03A1 27 CLR A 1223 03A2 6C LOOPF ADD A,R4 SUM THE DIFF 1224 03A3 ED A2 DJNZ R3,LOOPF 1,2,0R 3 TIMES 1225 03A5 77 LOOPE RR A 1226 03A6 67 RRC A DIFF/4,CARRY IN CARRY. 1227 03A7 53 3F ANL A&num;3FH 1228 03A9 7A ADDC A,R2 A=RTECON BASE + INTERP.+CARRY 1229 03AA 83 RET LINE ADDR B1 B2 83 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 23 1231 1232 * 1233 * OVOLT ROUTINE 1234 w 1235 * CALLED FROM GETPWR IF V > 100 VOLTS 1236 * PROCEDURE 1237 * 1238 * SHUTDOWN = 1 1239 * WAIT 20 MSEC 1240 * AFB=AFB/2 1241 * SHUTDOWN - O 0 1242 * IF VOLD < =VNEW 1243 * THEN GOTO ERROR 1244 * ELSE 1245 * GOTO GETPWR 1246 * 1247 ****************** 1249 DRG 400% 1250 0400 OVOLT4 PORT RESET,O 1269 0409 RECALL AFB,O 1275 040C 97 CLR C CARRY = O FOR SHIFT OP. 1276 040D 67 RRC A AFB/2 1277 040E 96 11 JNZ S+3 1278 0410 17 INC A MAKE SURE AFB > O 1279 -0411 88 OB MOV RO&num;DAC 1280 0413 90 MOVX eRO,A NEW DAC VOLTAGE 1281 0414 STORE AFB,O 1287 0417 WAIT 20&num; SETTLING TIME 1300 041D PORT RESET,1 UNASSERT RESET 1319 0426 RECALL VSEN,1,R4 1325 042A ADC YSEN NEW V IN RA 1335 0439 SUBTR R4 A HAS NEWV-OLDV,CARRY IF POS. 1343 0441 E6 45 JNC S+4 1344 0443 44 23 JMP ERROR 1345 0445 24 00 JMP GETPWR IF OLDV > NEWV, WE ARE OK LINE ADDR B1 82 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 24 1347 1348 * 1349 * OCCUR ROUTINE 1350 * 1351 * CALLED FROM GETPWR IF 1 > 1 AMP 1352 * PROCEDURE 1353 * 1354 * SHUTDOWN = 1 1355 * WAIT 20 MSEC 1356 * AFB=AFB/2 1357 * SHUTDOWN = O 0 1358 * IF IOLD < =INEW 1359 * THEN GOTO ERROR 1360 * ELSE 1361 * GOTO GETPWR 1362 * 1363 1365 0447 OCCUR4 PORT RESET,O 1384 0450 23 OA MOV A O SET DACVOLTS TO 5 FOR RESTART 1385 0452 B8 08 MOV RO&num;DAC 1386 0454 90 MOVX ORO,4 NEW DAC VOLTAGE 1387 0455 STORE AFB,O 1393 045B WAIT 60H SETTLING TIME 1406 045E PORT RESET,1 UNASSERT RESET 1425 0467 RECALL ISEN,1,R4 1431 046B ADC ISEN NEW 1 IN RA 1441 047A SUBTR R4 A HAS NEW I-OLDI,CARRY IF POS. 1449 0482 E6 86 JNC S+4 1450 0484 44 23 JMP ERROR 1451 0486 24 00 JMP GETPWR IF 0LDI > NEWI, WE ARE OK LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 25 1453 LIST S 1454 1455 * 1456 * ROUTINE POWCOM 1457 * 1458 * THIS ROUTINE COMPUTES CORECT AS 1459 1460 * SORT(PREG/POWER)-1 1461 * IF CORECT > 1, F1 IS SET 1462 * IF CORECT < 1, F1 CLEARED 1463 * 1464 * ROUTINE THEN GOES TO AFBADJ 1465 * 1466 * 1467 1469 0488 POWCOM RECALL P0WER,1,R4 1475 048C RECALL PREQ,D 1481 048F 89 04 MOV COUNT&num; ;4 AF WILL DIVIDE PREQ BY 4 1482 0491 67 LOOPH RRC A BY SHIFTING RIGHT TWICE 1483 0492 2A XCH A,R2 1484 0493 El 91 DJNZ C0UNT,LOOPH 1485 0495 2A XCH A,R2 1486 0496 53 CO ANL A,&num;OCON 1487 0498 2A XCH A,R2 1488 0499 53 3F ANL Af3FH A,R2=00XXXXXX,XX000000 1489 0498 2A XCH A,R2 R2,A=00XXXXXX,XX000000 1490 049C 7466 CALL DIV 1491 049F E6 A9 JNC ROOTER IF CARRY, NEED LOTS POWER 1492 04AO A5 CLR F1 1493 04A1 85 CPL F1 F1 SET FOR UP 1494 04A2 23 FF MOV A,&num; ;0FFH MAX CORECT 1495 04A4 STORE CORECT,O 1501 04A7 C4 00 JMP AFBADJ 1502 04A9 74 8C ROOTER CALL SORT GET PREQ/**POWER**1/2 1503 04AB 97 CLR C 1504 04AC F7 RLC A DOUBLE THE ANSWER 1505 04AB A5 CLR F1 F1=0 FOR CORECT < 1 1506 04AE E6 R1 JNC CORSET If CORECT < =1 1507 04BO B5 CPL F1 IF CORECT > 1 1508 04B1 CORSET STORE CORECT,O 1514 0484 04 00 JMP AFBADJ LINE ADDR M B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 26 1516 1517 * 1518 * ROUTINE AFBADJ 1519 * 1520 * CHECKS THE VALUE OF DWNCNT 1521 * IF F1 IS CLEAR (CORRECTION IS DOWN) 1522 * INCREMENTS DWNCNT. DWKCNT > 4 MEANS ERROR 1523 * IF F1 SET, DWNCNT SET TO ZERO. 1524 * 1525 * COMPUTES A NEW AFB BY THE FORMULA 1526 * 1527 * AFB = AFB+(F)+AFB*CORECT 1528 * 1529 * WHERE CORECT IS LESS THAN ONE 1530 * AFB EQUALS ZERO AND AFS < ZERQ ARE LOCKED OUT 1531 * 1532 * IF AFB=1 AND 1527 IS SET, THE NEW AFB=O. 1533 1535 ORG 600H 1536 0600 AFBADJ RECALL POWER,O IF POWER LESS THAN 5 WATTS (15 COUNTS) 1542 0603 03 FO ADD A,&num;0F0W WE DONT WANT TO PANIC. 1543 0605 F6 OS JC TESTIT TESTIT CHECKS FOR UP OR DOWN CORRECTION 1544 0607 89 ZE MDV M,&num;SWNCNT STORAGE ADDRESS FOR CLRCNT 1545 0609 C4 21 JMP CLRCNT SETS DWNCNT TO ZERO 1546 0608 TESTIT RECALL DWNCNT,O IS&num;OF TIMES CORRECT IS < D 1552 060E 76 21 JF1 CLRCNT IF CORRECTION IS UP 1553 0610 17 INC A INCREMENT DWNCNT 1554 0611 Al MDV eR1,A STORE NEW DWNCNT 1555 0612 03 F6 ADD A,&num;0F6H CARRY SET IF DWNCNT > 10 1556 0614 F6 IF JC ERCALL IF DWNCNT > 10 1557 0616 03 06 ADD A,1&num; ;06 CARRY IF DWNCNT > 4 1558 0618 E6 23 JNC DLDAFB 1559 061A RECALL CORECT,O 1565 061D F2 23 J07 0LDAFB IF CORRECT > 0.5, WAIT SOME MORE 1566 061F A4 00 ERCALL JMP ERRORS IF DWNCHT > 10 OR CORECT < .5(AND) DWNCNT > 3 1567 0621 27 CLRCNT CLR A DWNCNT SET TO O IF CORRECTION UPD 1568 0622 Al MOV- eR1,A STORE NEW DWNCNT AND CONTINUE 1569 0623 OLDAFB PORT MAXD,O MAX DRIVE LITE OFF UNLESS 1588 062C RECALL AFB,1,R4 1594 0630 96 34 JNZ LOOPT 1595 0632 23 01 MOV A,&num;1 IF WAS ZERO IS NOW ONE 1596 0634 07 LOOPT DEC A IF AFB=1, A IS NOW O 1597 0635 96 3E JNZ GOON CONTINUE AS ALWAYS 1598 0637 17 INC A 1599 0638 17 INC A A IS NOW TWO 1600 0639 76 SC JF1 NEWANS IF UP FLAG SET. 1601 063B 07 DEC A RESTORE AFB TO ONE 1602 063C C4 SC JMP NEWANS 1603 063F GOON RECALL CORECT,O 1609 0641 74 50 CALL MUL A:R2=AFB(CORECT) 1610 0643 2A XCH A,R2 1611 0644 ROUND R2 1616 0648 B5 CPL F1 1617 0649 7659 JF1 DOWN 1618 064B 6C ADD A,R4 IF F1 WAS SET, ADD AFB TO AFB*CORECT 1619 064C E6 59 JNC DOWN 1620 064E PORT MAXD,1 MAXIMUM DRIVE LITE 1639 0657 23 FF MOV A&num;255 IF CARRY,AFB > 256 SO SET AFB=255 1640 0659 96 5C DOWN JNZ NEWANS 1641 0658 17 INC A IF WAS ZERO IS NOW ONE LINE ADD B1 B2 B3 84 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 27 1642 065C NEWANS STORE AFB,0 1648 065F B9 08 MOV R1 DAC 1649 0661 91 MOVX OR1,A 1650 0662 WCHDOG 1699 0672 RECALL MODES,1,R4 THIS IS LAST MODE NUMBERS 1685 0676 OA IN A,P2 GET NEW KEYING SIGNALS 1685 0677 53 70 ANL A,&num; ;70H DSE,DS1E,DS2E 1687 0679 37 CPL A 1688 067A 6C ADD A,R4 1689 0678 3? CPL A ZERO IF NO CHANGE 1690 067C C6 80 JZ WARMUP IF NO CHANGE 1691 067E 04 00 JMP INIT 1692 0680 24 00 WARMUP JMP GETPWR AND CONTINUE 1693 1694 1695 * KILL ROUTINE 1696 * SETS KEY OFF 1697 * SHUTDOWN ON 1698 * RESET ON 1699 * AFB TO ZERO 1700 * 1701 * BRANCH AND HANG 1702 * 1703 1705 0682 KILL6 PORT KEY,! 1724 0688 PORT RESET,O 1743 0694 WAIT 5 1756 069A PORT RESET,0 DUMMY INSTR. TO REMOVE SDN INST. 1775 06A3 27 CLR A 1776 06A4 89 08 MOV $R1,&num;DAC 1777 06A6 STORE AFB,O 1783 06A9 91 MOVX oR1,A SET DAC VOLTS TO ZERO 1784 06AA PORT ERLITE,1 TURN ON ERROR LED 1803 06B3 C4 82 JMP KILL6 BRANCH AND HANG LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM C70 Page 28/29 1805 1806 * ERROR ROUTINE 1807 * 1808 * THIS ROUTINE CHECKS THE CONDITION 1809 * OF THE DC SWITCHER TO DETERMINE IF 1810 * THE OUTPUT POWER IS CONTROLLABLE. 1811 * EXITS TO COLDST IF STILL ON, 1812 * TO KILL OTHERWISE. 1813 * 1814 1816 ORG 500H 1817 0500 ERROR5 PORT KEY,1 KEY OFF 1836 0509 WCHDOG 1865 0519 PORT RESET,1 1884 0522 PORT ERLITE,1 1903 052B ADC DCSEN DCVOLTAGE AT BPLUS 1913 053A AF MOV R6,A TEMP STORAGE FOR OLD DCSEN 1914 053B B9 08 MOV R1,*DAC 1915 0530 27 CLR A 1916 053E 91 MOVX OR1,A AFB EQUALS ZERO 1917 053F FE DC50 MOV A,R6 DCSEN 1918 0540 03 9B ADD A,&num;155 1919 0542 F6 46 JC DCCHK CARRY IF VOLTS > 50 1920 0544 A4 Al JMP COOLDN IF VOLTS LOW. 1921 0546 IF OA DCCHK MOV R7,&num;10 COUNTER RFO. 1922 0548 ADC DCSEN 1932 0557 AO MOV R5,A R5 IS NEWVOLTS 1933 0558 37 CPL A 1934 0559 6E ADD A,R6 A=OLD-NEW 1935 055A F6 7B JC RESET CARRY IF OLD > NEW 1936 055C FO MOV A,R5 1937 055D AE MOV R6,A OLDVOLTS UPDATE 1938 055E WAIT 10 1951 0564 WCHDOG 1960 0574 Er 46 DJNZ R7,DCCHK REPEAT 10 TIMES 1961 0576 A4 OB JMP KILLS IF NO IMPROVEMENT 1962 0578 RESETCK PORT RESET,1 RESET OFF 2001 0581 WAIT 100 2014 0587 ADC DCSEN 2024 0596 AD MOV R5,A 2025 0597 37 CPL A 2026 0598 6E ADD A,R6 OLD-NEW, CARRY IF POSITIVE 2027 0599 F6 Al JC COOLDN IF NO INCREASE 2028 059B 03 F5 ADD A,&num; ;245 MINUS 10 2029 059D F6 Al JC COOLON IF SMALL INCREASE 2030 059F A4 D8 JMP KILL5 OTHERWISE 2031 05A1 BF 64 COOLDN MDV R7,&num;100 COUNTER REG. 2032 05A3 COOL1 WCHDOG 2061 0583 ADC DCSEN 2071 05C2 O3 C8 ADD A,&num;200 2072 05C4 E6 00 JNC COOL2 IF VOLTS.LT.20 2073 05C6 WAIT 100 2086 05CC EF A3 DJNZ R7,COOL1 LOOP 100 TIMES 2087 05CE A4 D8 JMP KILL5 2088 0500 COOL2 PORT ERLITE,0 2107 05D9 04 65 JMP COLDST RESTART IF SWITCHER OK 2108 05DB 04 82 KILL5 JMP KILL6 PAGING PROBLEMS. LINE ADDR B1 B2 B3 B4 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982:CHECKSUM 670 Page 30 2111 2112 * 2113 * TEST LOOP 2114 * 2115 * THIS PROGRAM WAITS 5 SECONDS TO KILL 2116 * THE WATCHDOG TIMER 2117 * THEN READS ONE OF FOUR ADC CHANNELS 2118 * AND DUMPS IT TO THE DAC 2119 * REPEATS FOR EACH CHANNEL FOREVER 2120 * 2121 2122 ORG 0700H 2123 0700 TESTLP PORT KEY,1 2142 0709 PORT RESET,O 2161 0712 PORT SDN,O 2180 071B BD 20 MOV R4,&num;20H 2181 071D LOOP10 WAIT 255 2194 0723 ED ID DJNZ R5,LOOP10 WAIT 2000H CYCLES 2195 0725 B8 08 MOV RD&num;08 DAC ADDRESS 2196 0727 F9 LODPV MOV A,Rl ADC CHANNEL 2197 0728 17 INC A 2198 0729 53 03 ANL A&num;3 CHANNEL * 0 1 2 OR 3 2199 072B A9 MOV Rl,A 2200 072C BC 00 MOV R4,&num; ;00 2201 072E ES 34 ICNT DJNZ R3,LOOPU 2202 0730 IC INC Rk HI BYTE OF LOOP COUNTER 2203 0731 FC MOV A,R4 2204 0732 72 27 JB3 LOOPV IF COUNTER=8*266 2205 0734 91 LODPU MOVX OR,A ADC CONVERSION 2206 0735 SD 08 MOV R5,&num;8 WAIT FOR EDC TO DROP 2207 0737 ED 37 LOOPW DJNZ R5,LOOPW 2208 0739 86 3D JN1 LOOPX IF EDC DOWN 2209 0738 E4 39 JMP S-2 2210 073D 81 LDOPX MOVX A,OR1 GET ADC VALUE 2211 073E 90 MOVX ORO,A DUMP It TO DAC 2212 073F OA IN A,P2 2213 0740 43 8F ORL A,&num; ;BFW 2214 0742 37 CPL A ZERO IF DSE,DS1E AND DS2E 2215 0743 C6 2E JZ ICNT 2216 0745 04 00 JMP INIT 2217 0747 E4 2E JMP ICNT LOOP THROUGH AGAIN 2218 0749 END ASSEMBLER ERRORS - O 0 SSE4 BIPOLAR CONTROL:22 NOVEMBER 1982: :CHECKSUM C70 Page 31 SYMBOL TABLE AFB 0028 AFBADJ 0600 CkI 0164 CKV 0129 CKVMX 0132 CLOZ 0227 CLRCNT 0621 CMIDZ 0233 CNTLP 0200 COLDST 0065 COOL1 05A3 COOL2 0500 COOLDN 05A1 CORECT 0029 CORGET 0278 CORSET 0481 DAC 0008 DC50 053f DCCHK 0546 DCSEN 0023 DIV 0366 DIVIA 0371 DIVIB 038A DIVIC 0386 DIVID 0387 DIVIE 037E DIVILP 0372 DOG 0008 DOWN 0659 DWNCNT 002E ECON 0020 ENDINT 0063 ERCALL 061F ERLITE 0080 ERROR 0223 ERROR5 0500 GETI 013E GETPWR 0100 GOON 063E HIZR2 0238 HOUSE 016D HOUSE1 0179 ICNT 072E IFL 0158 IFLAG 0010 IMAX 0028 INIT 0000 ISEN 0022 KEY 0001 KILL5 05DB KILL6 0682 LOOP1 017D LOOP10 071D LOOP2 020D LOOP6 0045 LOOPS 0061 LOOPE 03A5 LOOP F 03A2 LOOPH 0491 LOOPS 024D LOOPT 0634 LOOPS 0734 LOOPV 0727 LOOPS 0737 LOOPX 073D L0OPZ 018E LDZ 01A2 MAXID 0040 MIDZ 0198 MODES 002F MPY8A 035E MPY8LP 0354 MUL 0350 NEWANS 065C NEWSET 0274 OCCUR 0221 OCCUR4 0447 OLDAFB 0623 OVOLT 021F OVOLT4 0400 PIMAGE 002D POWCOM 0488 POWER 0026 PREQ 0027 RZZOL 0268 RA1 0096 RA2 0095 RAMCHK 0034 RESET 0002 RESEIC 0578 ROM 0058 ROM1 01F4 ROM2 02F0 ROM3 03F4 ROM4 04FO ROM5 05FD ROM6 06FD ROM7 07FO ROMST OOFO ROOTER 04A9 RTECON 002A SDN 0004 SORT 038C TESTIT 0608 TESTLP 0700 TMP 0OAA TST 0093 VFL 0120 VFLAG 0020 VMAX 0217 VMAX2 0218 VMAXR1 0028 VMAXR2 002C VSEN 0021 WARMUP 0680 Z 0024 ZOL 0225 ZOL2 0258 ZRANGE 0025 ZRSTO 01A6

Claims: CLAIMS 1. An electosurgical generator comprising: a source of electrosurgical energy; means adapted for connecting said source to a patient; and control means for decreasing the output power from said source with increasing patience impedance, the rate of power decrease being substantially greater that that which would result if the output voltage from the source were maintained constant over the range of increasing patient impedance. 2. A generator as in claim 1 where said control means decreases the output power over the range of increasing patient impedance in accordance with the square of said impedance. 3. An electrosurgical generator comprising: an adjustable source of electrosurgical energy; means adapted for connecting said source to a load including a patient; and control means for adjusting the actual power delivered to said load from said source including: means for determining the impedance of said load; means for computing a correction factor depending on the value of said impedance, said correction factor corresponding to a required load power; and means responsive to said correction factor for adjusting said source of electrosurgical power so that said actual power follows said required power. 4. A generator as in claim 3 where said control means includes a microprocessor for adjusting the actual power delivered to said load from said source. 5. A generator as in claim 3 including means for selecting a nominal power to be delivered to said load where said correction factor also depends on the nominal power to compute the correction factor. 6. A generator as in claim 5 where said nominal power extends from 0 to 70 watts. 7. A generator as in claim 3 including a heat sink for said source of electrosurgical energy, the heat sink having a capacity of not more than about four watts. 8. A generator as in claim 3 where, for all load impedances less than a predetermined value, said correction factor computing means so computes the correction factor that the current through said load remains substantially constant. 9. A generator as in claim 8 including means for selecting a nominal power to be delivered to said load and where said correction factor equals 1MAX11SEN where IMAX is the current through an impedance of said predetermined value having said nominal power applied thereto and ISEN is the actual current through said load. 10. A generator as in claim 8 where said predetermined value is about 70 ohms. 11. A generator as in claim 3 where for all load impedances between predetermined first and second values, said correction factor computing means so computes the correction factor that the power delivered to said load remains substantially constant. 12. A generator as in claim 11 including means for selecting a nominal power to be delivered to said load and where said correction factor equals (PMAX/PLOAD where PMAX is the nominal power and PLEAD is the actual power delivered to said load. 13. A generator as in claim 11 where said first and second predetermined values are respectively about 70 and 100 ohms. 14. A generator as in claim 3 where, for all load impedances greater than a predetermined value, said correction factor computing means so computes the correction factor that the voltage across said load remains substantially constant. 15. A generator as in claim 14 including means for selecting a nominal power to be delivered to said load and where said correction factor equals VMAX/VSEN where VMAX is the voltage across an impedance of said predetermined value having said nominal power applied thereto and VSEN is the actual voltage across said load. 16. A generator as in claim 14 where said predetermined value is about 100 ohms. 17. A generator as in claim 3 where, for all impedances greater than a predetermined value, said correction factor computing means so computes the correction factor that the power delivered to said load is proportional to the inverse of the square of the load impedance. 18. A generator as in claim 17 including means for selecting a nominal power to be delivered to said load and where said correction factor equals 2 2 1/2 MAX LOAD)PL0AD) where PMAX is the nominal power, ZLOAD is the load impedance, and PLEAD is the actual power delivered to the load. 19. A generator as in claim 18 where said predetermined value is about 100 ohms. 20. An electrosurgical generator comprising: an adjustable source of electrosurgical energy; means adapted for connecting said source to a load including a patient; and control means for adjusting the power delivered to said load from said source including: means for selecting first and second modes of operation of said generator when said load impedance exceeds a predetermined value; means for maintaining the voltage across said load substantially constant for all values of load impedance in excess of said predetermined value in response to said first mode being selected, and means for reducing the power delivered to said load in accordance with the inverse of the square of the load impedance for all values of load impedance in excess of said predetermined value in response to said second mode being selected. 21. A generator as in claim 20 where said control means includes a microprocessor for adjusting the actual power delivered to said load from said source. 22. A generator as in claim 20 where said means for adjusting the power delivered to said load includes: means for computing a correction factor which is a function of the impedance of said load and the selected mode of operation; and means responsive to the correction factor for adjusting said source of electrosurgical current so that either said first or second mode of operation is implemented depending on the selected mode. 23. A generator as in claim 21 including means for selecting a nominal power to be delivered to said load and where said correction factor for said first mode of operation equals VMAX/VSEN where VMAX is the voltage across an impedance of said predetermined value having said nominal power applied thereto and VSEN is the actual voltage across said load and where the correction factor for said second mode of operation equals [(10,000PMAX/Z2LOAD)PLOAD]1/2 where PMAX is the nominal power, ZLOAD is the load impedance, and PLEAD is the actual power delivered to the load. 24. A generator as in claim 20 where said predetermined value is about 100 ohms.

Inventors: HARRIS, FRANK WERNER, HULETT III, FREDERIC MARSHALL
Applicants: VALLEYLAB, INC.
Application year: 1984
Main classification: A61B17
IPC codes: A61B18