Table Example 2: Compressed Table - Motorola MC68340 User Manual

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

The table instruction is executed with the following bit pattern in Dx:
31
NOT USED
Using this information, the table instruction calculates dependent variable Y:
5.3.4.2 TABLE EXAMPLE 2: COMPRESSED TABLE. In Example 2 (see Figure 5-8), the
data from Example 1 has been compressed by limiting the maximum value of the
independent variable. Instead of the range 0
The table has been compressed to only five entries, but up to 256 levels of interpolation
are allowed between entries.
Y
Extreme table compression with many levels of interpolation is
possible only with highly linear functions. The table entries
within the range of interest are listed in Table 5-14.
MOTOROLA
Freescale Semiconductor, Inc.
16
Table Entry Offset
Interpolation Fraction
Y = 1669 + (128 (1679 – 1669)) / 256 = 1674
256
512
INDEPENDENT VARIABLE
Figure 5-8. Table Example 2
NOTE
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
15
1
0
1
0
0
0
1
1
Dx [8:15] = $A3 = 163
Dx [0:7] = $80 = 128
X = 65535, X is limited to 0
786
1024
X
0
1
0
0
0
0
0
0
0
X
1023.
5- 31

Advertisement

Table of Contents
loading

Table of Contents