Hello Group,
I did a little work on the clip indicator to see if I could improve it, but is is more complicated than I thought. I programmed "overrange2", an average of the fraction of packets returned from the hardware that had the overrange bit set, 0.0 to 1.0.
I connected a 7.2 MHz sin wave to HL2, and varied the level. As expected, overrange2 started at zero, and at the clip level rapidly moved to 1.0. So every packet had a clip. But there was no distortion visible on the graph until I increased the level further. The ADC level reported by the bandscope was 2% for OK, 4% for OK, and 6% for barely clipping. The ADC level stayed at 6% for the higher levels that distorted. It looks like the ADC is clipping only on the positive and negative peaks, and all the intermediate levels are OK. So a bit of clipping would just flatten the sin tops, and not do much damage. For serious clipping, the lower parts of the sin wave would still be OK. But it is suspicious that the bandscope ADC level maxes out at 6%.
I then connected an antenna and tuned to 7.2 MHz. I varied the preamp gain and was able to see clipping at maximum gain. The overrange2 changed rapidly from 0.0 to 0.8 as clipping was reached. I thought maybe I could display intermediate values, but they seem irrelevant. At max preamp gain, overrange2 was 0.9, so most packets had clipping, but no distortion was visible in the graph, and the audio was unaffected. It looks like when the HL2 barely clips, the tops of the waveform are just flattened a bit. It is only when the waveform is badly chopped off that communication is affected.
So firmware changes are need to improve the clip indication; namely, a fraction of samples that are clipped, and a measurement of how much they are clipped (not much, chopped off by half, etc.). The former is inconvenient, and the second is impossible, as it requires measuring the ADC level above its maximum level. So I don't think I can improve the clip indication. It is not very useful, as a large amount of clipping can be tolerated before communication suffers.
Next I will work on the bandscope ADC level. It should act more like the overrange2 I programmed.
Jim
N2ADR