Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding
the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and
specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters can and do vary in different
applications. All operating parameters, including “Typicals” must be validated for each customer application by customer’s technical experts. Motorola does not
convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems
intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola
product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or
unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims,
costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such
unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. M is a
registered trademark of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.
TO OBTAIN ADDITIONAL PRODUCT INFORMATION:
USA/EUROPE: Motorola Literature Distribution;
P.O. Box 20912; Phoenix, Arizona 85036. 1-800-441-2447
JAPAN: Nippon Motorola Ltd.; Tatsumi-SPD-JLDC, Toshikatsu Otsuki,
6F Seibu-Butsuryu-Center, 3-14-2 Tatsumi Koto-Ku, Tokyo 135, Japan. 03-3521-8315
HONG KONG: Motorola Semiconductors H.K. Ltd.; 8B Tai Ping Industrial Park,
51 Ting Kok Road, Tai Po, N.T., Hong Kong. 852-26629298
MFAX: RMFAX0@email.sps.mot.com - TOUCHTONE (602) 244-6609
INTERNET: http://www.mot.com
160 ; + b*x`(n)
161
162 00071E 27B6 aslm ;compensate for data scaling
of
163 ;PID coefficients (multiply
by 2).
164 000720 27B4 tmer ;transfer result to AccE
rounded.
165 000722 377A 001C ste Yn ;Yn is output of filter
166
167 *Now the pwm value must be limited to an 8-bit value.
168
169 000726 27FB ted
170 000728 BC0A bge Ypositive ;IF Y(n) is negative
171 00072A FC7F addd #$007F ; add $007F to Y(n)
172 00072C BC14 bge get_Y ; IF result is negative
173 00072E 37B5 FF81 ldd #$FF81
174 000732 37FA 001C std Yn ; Y(n) = $FF81 (minimum val-
ue—
175 ; PWM interface module always
176 ; needs a PWM edge to do cy-
cle-
177 ; by-cycle current limiting)
178
179 000736 B00E bra Y_loaded ; ENDIF
180 ;ELSE
181 000738 Ypositive
182 000738 37B0 0080 subd #$0080 ; subtract $0080 from Y(n)
183 00073C BD04 blt get_Y ; IF result is zero or posi-
tive
184 00073E 37B5 007F ldd #$007F
185 000742 37FA 001C std Yn ; Y(n) = $007F (maximum PWM
allowed)
186 ; ENDIF
187 ;ENDIF
188 000746 get_Y
189 000746 37F5 001C ldd Yn
190 00074A 37B1 0080 Y_loaded addd #$0080
191 00074E 17FA F926 stab PWMA ;scale PWM so that 50% is
zero volts.
192
193 * We are done with PID filter at this point.