%Step 1: Get the b0, b1, b2, a0, a1, a2 parameters from the formula Audio-EQ-cookbook. %Step 2: Normalize the b0, b1, b2, a0, a1, a2 to get the b0_a0, b1_a0, b2_a0, a0_a0, a1_a0, a2_a0, k b0_a0=(b0/a0); %1.31 format b1_a0=(b1/a0)/2; %2.30 format b2_a0=(b2/a0); %1.31 format k1=max(abs([b0_a0,b1_a0,b2_a0])); % Divide by the max value to avoid overflow if k1>0.99999988079071044921875; k=k1/0.99999988079071044921875; b0_a0=b0_a0/k; b1_a0=b1_a0/k; b2_a0=b2_a0/k; else k=1; end a0_a0=(a0/a0); a1_a0=(a1/a0)/2; %2.30 format a2_a0=(a2/a0); %1.31 format % Fill b0_a0, b1_a0, b2_a0, a0_a0, a1_a0, a2_a0 in PPC3 for configuration. % if you want to translate the coefficent to Hex vaule rather than % using our PPC3, you can use following formulat to get the HEX coefficient % and then wirte them to related register Step 3: Transfer the b0_a0, b1_a0, b2_a0, a1_a0, a2_a0 to 32bit 2's complement [B0,B1,B2,A1,A2] = dec2hex(mod(min(round(2^(32-1)*[ b0_a0, b1_a0, b2_a0, a1_a0, a2_a0]),2^(32-1)-1),2^32)); Step 4: Write the [B0,B1,B2,A1,A2] to the right register address, multiply the value ‘k’ back in the step 2 to the volume register or the b0, b1, b2 of 15th BQ.