Motorola HC12 Refrence Manual page 201

Table of Contents

Advertisement

MEM
Grade of Membership ⇒ M
Operation:
(Y) + $0001 ⇒ Y
(X) + $0004 ⇒ X
Description:
Accumulator A and index registers X and Y must be set up as follows be-
fore executing MEM.
The 4-byte membership function data structure consists of Point_1,
Point_2, Slope_1, and Slope_2, in that order.
A Slope_1 or Slope_2 value of $00 indicates a special case where the
membership function either starts with a grade of $FF at input = Point_1,
or ends with a grade of $FF at input = Point_2 (infinite slope).
When MEM is executed, X points at Point_1 and Slope_2 is at X + 3.
After execution, the content of A is unchanged. X has been incremented
by four to point to the next set of membership function points and slopes.
The fuzzy input (RAM location) to which Y pointed contains the grade of
membership that was calculated by MEM, and Y has been incremented
by one so it points to the next fuzzy input.
Condition Codes and Boolean Formulas:
S
H, N, Z, V, and C may be altered by this instruction.
Addressing Modes, Machine Code, and Execution Times:
Source Form
MEM
CPU12
REFERENCE MANUAL
Determine Grade of Membership
(Fuzzy Logic)
A must hold the current crisp value of a system input variable.
X must point to a 4-byte data structure that describes the trapezoidal
membership function for a label of the system input.
Y must point to the fuzzy input (RAM location) where the resulting
grade of membership is to be stored.
Point_1 is the X-axis starting point for the leading side of the trape-
zoid, and Slope_1 is the slope of the leading side of the trapezoid.
Point_2 is the X-axis position of the rightmost point of the trapezoid,
and Slope_2 is the slope of the trailing side of the trapezoid. The
trailing side slopes up and left from Point_2.
X
H
I
N
Z
?
?
?
Address Mode
Special
INSTRUCTION GLOSSARY
(Y)
V
C
?
?
Object Code
01
MEM
Cycles
Access Detail
5
RRfOw
MOTOROLA
6-141

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents