js
Full Member level 5
---------------------------------------------------
#define iiMAX 100
unsigned char xdata Signals[iiMAX][2];
...
unsigned char Diff1;
unsigned int Difference;
indexArray=100;
Difference=0;
while (indexArray)
{
Diff1 = Signals[indexArray][0] - Signals[indexArray][1];
Difference = Difference + Diff1;
indexArray--;
}
---------------------------------------------------
I need this loop too be as speeder as possible ..... but if possible without assembly!
What you suggest?
p.s.
I need difference of two signal sampled 100 times.....
#define iiMAX 100
unsigned char xdata Signals[iiMAX][2];
...
unsigned char Diff1;
unsigned int Difference;
indexArray=100;
Difference=0;
while (indexArray)
{
Diff1 = Signals[indexArray][0] - Signals[indexArray][1];
Difference = Difference + Diff1;
indexArray--;
}
---------------------------------------------------
I need this loop too be as speeder as possible ..... but if possible without assembly!
What you suggest?
p.s.
I need difference of two signal sampled 100 times.....