Thanks Ioannis,

I changed it to counts, Unfortunatly no difference, but at least if it was working I wouldn't have seen it anyway. Thanks for the tip.

I also Added

ANSELH.2 = 0

This then worked, however I must say when I read the datasheet for the 18F14K22 I interpret it that it should be digital so it wouldnt be necessary to add this statement so I am a bit confused. Maybe another 40 or 50 reads and it might sink in!!!

regards
aajgss