Try this simple code ( http://www.picbasic.co.uk/forum/show...2927#post72927 ) , using 16F628A.