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

X  

HCS12 Datasheet(PDF) 368 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) 368 Page - Freescale Semiconductor, Inc

Back Button HCS12 Datasheet HTML 364Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 365Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 366Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 367Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 368Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 369Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 370Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 371Page - Freescale Semiconductor, Inc HCS12 Datasheet HTML 372Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 368 / 452 page
background image
S12CPUV2 Reference Manual, Rev. 4.0
368
Freescale Semiconductor
In cycle 2.0, three internal 16-bit temporary registers are cleared in
preparation for summation operations, but there is no bus access. The WAV
instruction maintains a 32-bit sum-of-products in TMP1 : TMP2 and a 16-bit
sum-of-weights in TMP3. By keeping these sums inside the CPU, bus
accesses are reduced and the WAV operation is optimized for high speed.
Cycles 3.0 through 9.0 form the 7-cycle main loop for WAV. The value in the
8-bit B accumulator is used to count the number of loop iterations. B is
decremented at the top of the loop in cycle 3.0, and the test for zero is
located at the bottom of the loop after cycle 9.0. Cycle 4.0 and 5.0 are used
to fetch the 8-bit operands for one iteration of the loop. X and Y index
registers are used to access these operands. The index registers are
incremented as the operands are fetched. Cycle 6.0 is used to accumulate
the current fuzzy output into TMP3. Cycles 7.0 through 9.0 are used to
perform the eight by eight multiply of Fi times Si, and accumulate this result
into TMP1 : TMP2. Even though the sum-of-products will not exceed 24 bits,
the sum is maintained in the 32-bit combined TMP1 : TMP2 register
because it is easier to use existing 16-bit operations than it would be to
create a new smaller operation to handle the high order bits of this sum.
Since the weighted average operation could be quite long, it is made to be
interruptible. The usual longest latency path is from very early in cycle 6.0,
through cycle 9.0, to the top of the loop to cycle 3.0, through cycle 5.0 to the
interrupt check.
If the WAV instruction is interrupted, the internal temporary registers TMP3,
TMP2, and TMP1 need to be stored on the stack so the operation can be
resumed. Since the WAV instruction included initialization in cycle 2.0, the
recovery path after an interrupt needs to be different. The wavr
pseudo-instruction has the same opcode as WAV, but it is on the first page
of the opcode map so there is no page prebyte ($18) like there is for WAV.
When WAV is interrupted, the PC is adjusted to point at the second byte of
the WAV object code, so that it will be interpreted as the wavr
pseudo-instruction on return from the interrupt, rather than the WAV
instruction. During the recovery sequence, the PC is readjusted in case
another interrupt comes before the weighted average operation finishes.
The resume sequence includes recovery of the temporary registers from the
stack (1.1 through 3.1), and reads to get the operands for the current
iteration. The normal WAV flow is then rejoined at cycle 6.0.
Upon normal completion of the instruction (cycle 10.0), the PC is adjusted
so it points to the next instruction. The results are transferred from the TMP
registers into CPU registers in such a way that the EDIV instruction can be



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