RMS value calculation using micro-controller
You can digitize samples of the waveform at a high frequency, square them, then feed that into a low-pass filter. Take the square root of the output of the LPF. 

The cutoff frequency (and order) of the low pass filter is a trade-off between output ripple and response time (for example, after the input waveform changes). A simple IIR low pass filter might be sufficient. 

Since you know the mains frequency there are faster-responding filters such as the boxcar filter Andy suggests, assuming you have enough RAM to support that approach and arrange things to have an integer number of samples in a power line cycle.