How to correctly find the RMS on ARM 7 LPC micro-controller?
The above code gives a 20 ms delay. With a sine wave at 50 Hz, this
  should give the same value on every reading, since the period of such
  a sine wave is also 20 ms. However this is not the case and I can see
  no visible pattern in my results.


Hmm...


  Am I missing something obvious here or could there be some other
  variables I am not taking into consideration? Any ideas would be
  appreciated.


A 20 ms intersample time is no good for 50 Hz measurements and yes, because the AC frequency is not constant (and neither is your clock) measurements made might be drifting in an out of phase seemingly randomly.

Look at this sinewave sampled at nearly the same period: -



It produces aliasing i.e. the blue output should be constant but slight differences in sampling frequency and sinewave cause the blue waveform to undulate up and down at the "difference" frequency.

If you want to properly measure RMS by sampling you should be sampling at around 1 kHz or greater especially if you are trying to measure the RMS of an AC current (harmonic distortions can be significant).