AN2263 Freescale Semiconductor / Motorola, AN2263 Datasheet - Page 24

no-image

AN2263

Manufacturer Part Number
AN2263
Description
PC Master Software: Creation of Advanced Control Pages
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2263/D
24
/* PC master software initialization */
pcmasterInit();
/* ITCN initialization */
/* SCI initialization */
ioctl(SCI_0, SCI_INIT, NULL);
archEnableInt();
N = 16;
mi = __fixed2int(0.001);
D = 10;
A1 = __fixed2int(0.5);
A2 = __fixed2int(0.4);
d_omg1 = __fixed2int(0.06);
d_omg2 = __fixed2int(0.09);
while(1)
{
ioctl(ITCN,
ioctl(ITCN,
/* initialization */
/* recorder routine call -> simulate periodical call
of pcmasterRecorder routine e.g. in timer interrupt */
pcmasterRecorder();
/* delay */
for (j=0 ; j<10000 ; j++ );
/* signal generation */
/* ----------------- */
/* shift of input buffers x and d */
for (i=N-1 ; i > 0 ; i--)
{
}
for (i=MAX_ORDER-1 ; i > 0 ; i--)
{
}
/* new input sample */
x[0] = d[D];
/* new desired response sample */
omg1 = omg1 + d_omg1;
omg2 = omg2 + d_omg2;
d[0] = __mult(A1,fcnSinPIx(omg1)) + __mult(A2,fcnSinPIx(omg2));
x[i] = x[i-1];
d[i] = d[i-1];
ITCN_INIT_GPRS, NULL);
ITCN_INIT_IPR, NULL);
PC Master Software: Creation of Advanced Control Pages
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
/* set GPR and IPR according to the */
/* definition in appconfig.h */
/* enable all maskable interrupts */
MOTOROLA

Related parts for AN2263