Stepping down negative and positive voltage
It's called a "DC clamp" circuit:







simulate this circuit &ndash; Schematic created using CircuitLab

The Schottky diodes prevent the right-hand side from dropping below 0V or rising above 5V. If the left-hand side exceeds this range, the diodes conduct, and the excess voltage is dissipated in the resistor.

The forward voltage drop of the diodes is about 0.3V, so the final voltage range you get is -0.3V to +5.3V, which is usually acceptable to equipment that nominally requires a "0 to +5V" range.