Well, the 877 has A/D converters so it's not that difficult. All you have to do is convert whatever you want to measure to a suitable voltage range (0-5V usually).
To measure 0-20V simply divide the voltage using two resistors.
To measure current, use a shunt resistor (something like 0.01ohm, perhaps even less), and amplify the voltage over this resistor using an opamp.
To mesure voltage, use 877's ADC with a divider using 2 resistors ( Uout must be Uin/4 )
To mesure current, use a low impedance shunt and comparator ( TLV3701 is very fine and tou must obtain this one for free ), you must amplify the signal, or use different voltage references, since U = R*I