Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

HCS12 Datasheet(PDF) 354 Page - Freescale Semiconductor, Inc

Part # HCS12
Description  HCS12 Microcontrollers
PDF  452 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  FREESCALE [Freescale Semiconductor, Inc]
Direct Link  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

HCS12 Datasheet(HTML) 354 Page - Freescale Semiconductor, Inc

Back Button HCS12 Datasheet HTML 350Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 351Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 352Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 353Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 354Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 355Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 356Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 357Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 358Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 354 / 452 page
background image
S12CPUV2 Reference Manual, Rev. 4.0
354
Freescale Semiconductor
The Y index register is set to the base address for the fuzzy inputs and
outputs (in working RAM). Each rule antecedent is an unsigned 8-bit offset
from this base address to the referenced fuzzy input. Each rule consequent
is an unsigned 8-bit offset from this base address to the referenced fuzzy
output. The Y index register remains constant throughout execution of the
REV instruction.
The 8-bit A accumulator is used to hold intermediate calculation results
during execution of the REV instruction. During antecedent processing, A
starts out at $FF and is replaced by any smaller fuzzy input that is
referenced by a rule antecedent (MIN). During consequent processing, A
holds the truth value for the rule. This truth value is stored to any fuzzy
output that is referenced by a rule consequent, unless that fuzzy output is
already larger (MAX).
Before starting to execute REV, A must be set to $FF (the largest 8-bit
value) because rule evaluation always starts with processing of the
antecedents of the first rule. For subsequent rules in the list, A is
automatically set to $FF when the instruction detects the $FE marker
character between the last consequent of the previous rule and the first
antecedent of a new rule.
The instruction LDAA #$FF clears the V bit at the same time it initializes A
to $FF. This satisfies the REV setup requirement to clear the V bit as well
as the requirement to initialize A to $FF. Once the REV instruction starts, the
value in the V bit is automatically maintained as $FE separator characters
are detected.
The final requirement to clear all fuzzy outputs to $00 is part of the MAX
algorithm. Each time a rule consequent references a fuzzy output, that fuzzy
output is compared to the truth value for the current rule. If the current truth
value is larger, it is written over the previous value in the fuzzy output. After
all rules have been evaluated, the fuzzy output contains the truth value for
the most-true rule that referenced that fuzzy output.
After REV finishes, A will hold the truth value for the last rule in the rule list.
The V condition code bit should be one because the last element before the
$FF end marker should have been a rule consequent. If V is zero after
executing REV, it indicates the rule list was structured incorrectly.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com