Hi,
I have two fractional numbers, one is in Q1.23 format and the other is in Q1.15 format. I want to multiply this two numbers and the result should be again in Q1.23.
unsigned char A[3]; // 24 bit, Q1.23
unsigned int B; // 16 bit Q1.15
unsigned long result;
Does MPY32 module support this operation? Because the code below is not working.
MPY32CTL0 = MPYFRAC + MPYSAT;
MPYS32L = (unsigned int)A[1] << 8 | A[0];
MPYS32H_B = A[2];
OP2 = B;
result = (unsigned long)RES2 << 16 | RES1;
Regards,
BP.