Read analog envelope by 8051
You don't mention the specific part number that you have; I looked at the datasheet for the MB1310, which is an AE part in the XL series.  The last page of the datasheet shows sample waveforms for the "Analog Envelope" output - it is essentially the unfiltered output of the range sensor.  This would be useful if you want to process multiple return signals, at the expense of extra code complexity.

Here are the datasheet waveforms:



For your application, you may want to use the AN output, which is a voltage output that is ratiometric with distance.  Note that you'll need an extra analog input on your 8051 board to do this.

From the datasheet:


  Pin 3 - (AN) This pin outputs analog voltage with a scaling factor of
  (Vcc/1024) per cm. A supply of 5V yields ~4.9mV/cm., and 3.3V yields
  ~3.2mV/cm. Hardware limits the maximum reported range on this output
  to ~700 cm at 5V and ~600 cm at 3.3V. The output is buffered and
  corresponds to the most recent range data.