AN2263 Freescale Semiconductor / Motorola, AN2263 Datasheet - Page 16

no-image

AN2263

Manufacturer Part Number
AN2263
Description
PC Master Software: Creation of Advanced Control Pages
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2263/D
PC Master Software
ActiveX control in
Visual Basic
16
PC Master Software: Creation of Advanced Control Pages
The PC master software data can be accessed in Microsoft Excel using a
Visual Basic code that calls the PC master software ActiveX control functions.
Similar to the HTML based Control Panel, the PC master software ActiveX
object must be created first:
Public pcm As McbPcm
Set pcm = CreateObject("MCB.PCM")
The ActiveX functions can now be called. For example, to load an array of w(n)
coefficients use the ReadMemory function of the ActiveX object.
The address of the memory block to be read is the first parameter of the
ReadMemory function. This can be either an absolute numeric address or a
symbol name valid in the current PC master software project. The second
parameter is the size of the memory block to be read in bytes. The memory
data are returned to the variable that is the third parameter. The last parameter
is the variable for an error message in case of an error.
Usually, it is necessary to transform the data bytes into another data
representation. For example, into an array of 16-bit fractional values — get the
pairs of MSB (most significant) and LSB (least significant) bytes from the read
memory block and put these bytes together into a fractional value:
Freescale Semiconductor, Inc.
Dim succ As Boolean
succ = pcm.ReadMemory("w",16,data,msg)
If succ Then
Else
End If
For More Information On This Product,
For s = 0 To 7
Next s
MsgBox (msg)
Go to: www.freescale.com
MSB = data(2 * s + 1)
LSB = data(2 * s)
If MSB >= 128 Then
Else
End If
fracValue = (256 * MSB + LSB - 65535) / 32768
fracValue = (256 * MSB + LSB) / 32768
MOTOROLA

Related parts for AN2263