I want to use 1701 and 1452 to make a level detector to detect the signal strength,
but I don't know how to use blocks to make led brightness will follow the signal strength.
The led brightness level will follow the signal strength, if signal is stronger the led will more bright, the other side, the lower signal level will cause lower led brightness
(I think this may use the PWM to make led bright level)
any tips for making this function?
PWM can be done by comparing the signal in question to a ramp or triangle waveform. The example shown below performs this function. Incoming audio passes through a DC Block Filter to remove residual DC caused by the A/D converters -- use this filter anytime you're making level measurements; otherwise this DC, which typically measures about -45 dB, shows up with no input. Peak Envelope blocks measure the left and right signal levels. The Sawtooth Oscillator's output goes from -1 to +1; taking its absolute value provides a 1 KHz triangle wave spanning 0 to +1. The two ABCD Comparatorsperform the PWM -- I show their logic inverted simply to make the schematic appear neater, and re-using the level signal for the logic "high" level saves a DC source. The GPIOs accept any nonzero input as a logic "high." The attached project runs on a ADAU1701MINIZ board.
If I want to make more limit on signal detect (PWM light function),
like I want to avoid the noise, because the noise will make led has a very weak brightness on LED.
the only way is adjust the DC1 block? (I mean the 5.23 format block)
or anything that I can change?
The triangle wave "carrier" signal sets the PWM min and max levels. Presently it ranges from exactly zero to one. If you raise this waveform off the floor by adding a small DC level, then the PWM will ignore tiny amounts of audio. For example, inserting an adder and a 0.01 DC source between the Absolute Value block and the comparators would provide a -40 dB floor before the LED would light.
I follow your advise and I adjusted the pwm cell to this:
the adder is at the top side and it add with the sawtooth (after absolute value),
I am not sure this is correct, but it works!