That's an interesting operation. Splitting the equation up into two parts for DIV32 seems to work...
Code:
LEDBrVal = ((compVal - 0) * (MaxDuty - MinDuty))
LEDBrVal = DIV32 (MaxADCVal - 0) + MinDuty
Is it safe to do something like that or would you suggest making the DIV32 statement simpler so that you know it immediately follows the multiplication (I don't know what the OP's intent for the " - 0" part of the above is for)?