A good read from Atmel on their 8-bit microcontroller single-phase energy meter design. Link here (PDF)
This application note describes a single-phase power/energy meter with tamper logic. The design measures active power, voltage, and current in a single-phase distribution environment. It differs from ordinary single-phase meters in that it uses two current transducers to measure active power in both live and neutral wires. This enables the meter to detect, signal, and continue to measure reliably even when subject to external attempts of tampering.